类似 Delphi 的 Python GUI 设计器 [英] Delphi-like GUI designer for Python
问题描述
有没有类似于 Delphi 的带有表单设计器的 Python GUI 工具包,例如可以拖放控件到表单,移动它们等.
Is there any GUI toolkit for Python with form designer similar to Delp eg where one can drag and drop controls to form, move them around etc.
推荐答案
我推荐 PyQt(现在来自诺基亚),它使用 Qt Designer.Qt 设计器生成 XML 文件 (.ui),您可以使用名为 pyuic
的实用程序将其转换为 Python 模块,也可以从 Python 程序动态加载.
I recommend PyQt (now from Nokia), which uses Qt Designer. Qt designer produces XML files (.ui) which you can either convert to Python modules using a utility called pyuic
, or load dynamically from your Python program.
您确实必须在不同的编辑器中编写 Python 代码,即 Designer 只是 GUI 设计器的一部分,而不是完整的 IDE.他们有一个名为 Qt Creator 的测试版 IDE,但我认为现阶段它对 Python 的支持不是很好.
You do have to write your Python code in a different editor, i.e. Designer is only the GUI designer part and not a complete IDE. They have an IDE in beta called Qt Creator, but I don't think it supports Python very well at this stage.
如果您更愿意使用 wxPython,wxGlade 将输出 Python 代码.
If you'd rather go with wxPython, wxGlade will output Python code.
这篇关于类似 Delphi 的 Python GUI 设计器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!