如何使用基于 XML 的 GUI 布局生成 python GUI? [英] How do I generate a python GUI using an XML based layout of the GUI?

查看:33
本文介绍了如何使用基于 XML 的 GUI 布局生成 python GUI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Photoshop 中设计了一个定制的 UI,现在我想使用 XML 来创建 Python 的 GUI.我看到这个网站 http://wiki.xbmc.org/index.php?title=WindowXML 他们使用 WindowXML GUI Toolkit 来创建定制的 GUI.

I designed a customized UI in Photoshop and now I would like to use XML to create and GUI for python. I saw this website http://wiki.xbmc.org/index.php?title=WindowXML and they use WindowXML GUI Toolkit to create customized GUI.

有人做到了吗?我在哪里可以获得更多信息?

Has someone achieved this? where can I get more info?

我听说过 Qt 和 wxPython,但我发现的所有示例都可以使用 Tkinter 轻松实现.

I have heard of Qt and wxPython but All the examples I have found can be easily achieved with Tkinter.

请用一些例子和(或)细节回答这个问题.我知道很多 Python(新手)程序员都在寻找这样的东西.

Please answer this question with some examples and(or) details. I know that many python (newbie) programmers are looking for something like this.

推荐答案

我认为 glade 输出 GUI 结构作为一个 XML 文件,然后可以将其翻译成 Python(或其他语言).您可以直接使用 Glade 构造函数来设计 GUI,但由于您已经使用 Photoshop 完成了它,您可以尝试以与 Glade 输出的相同模式编写布局.完成此操作后,glade 工具链应该能够为您将其转换为 Python.

I think glade outputs the GUI construction as an XML file which can then be translated into Python (or other languages). You can use the Glade constructor directly to design the GUI but since you've already done it using Photoshop, you can try to write the layout in the same schema that glade outputs. Once you do that, the glade toolchain should be able to convert it into Python for you.

这篇关于如何使用基于 XML 的 GUI 布局生成 python GUI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆