发布时间:2022-08-09 文章分类:编程知识 投稿人:赵颖 字号: 默认 | | 超大 打印

Tutorial: Creating GUI Applications in Python with QT

by Alex Fedosov

Python is a great language with many awesome features, but its default GUI
package (TkInter) is rather ugly. Besides, who wants to write all that GUI
code by hand, anyway? Instead, a much better way to write GUI apps in
Python is to use Trolltech's QT Designer to WYSIWYG-ly create a
nice-looking interface, and then automatically generate the necessary code
for it with pyuic (which is a UI compiler for QT that comes
with the PyQT
package.) QT designer also makes it very easy to add Python code to your
project. (If you want your app to do anything useful, you will undoubtedly
need to write some code. :) )