Building and Installing

Q. Where can I get PyQt? Do I have to build it manually?
A. No. There are RPMs for Fedora, SuSE, and Mandriva, ebuilds for Gentoo and debs for Debian and Ubuntu. For PyQt4, there is even a windows installer. However, if you want to compile it yourself, instructions come with the source. Please follow them precisely. Here is the download page.

Q. When I try to configure sip, why does it say that Qt support is disabled?
A. Check whether the QTDIR environment variable is set to the correct directory (/usr/lib/qt3 in SuSE, /usr/share/qt3 in Debian) If you installed Qt from source, the installation process will tell you what QTDIR should be set to.

Q. How can I build PyKDE with KDE 3.5?
A. No answer yet.

Developing with PyQt

Q. With C++, I can use uic to create code from UIs created with Qt Designer. Can I do something like this for PyQt, too?
A. Yes. Just use pyuic, which is part of the PyQt distribution, instead of uic. You can subclass the generated classes as you would in C++.

Q. Can I use the code editor in Qt Designer for PyQt?
A. Yes. Just write Python instead of C++ code, pyuic will extract and include it into the base class.

Q. Can I use custom widgets written in Python with Qt Designer?
A. Yes, although you have to pay attention to some points. For a good introduction, read Custom widgets using PyQt by Roberto Alsina. With PyQt 4.2 and later, you can use Python custom widgets directly in Qt Designer - see Using_Python_Custom_Widgets_in_Qt_Designer.

Q. Are there IDEs that support PyQt development?
A. Yes. The natural choice is eric3 (DevelopmentWithEric3) or eric4, which are themselves written with PyQt. KDevelop3 has plugins for Python development, too. theKompany.com offers the commercial BlackAdder IDE for sale, that supports Python and Ruby, but has not been updated since 2004. The commercial Wing IDE has a How-To on Using Wing IDE with PyQt.

Q. Can I store a python object reference in a QVariant?
A. No., Yes since 2008-04-27

PyQtWiki: FrequentlyAskedQuestions (last edited 2011-06-07 21:48:47 by 124-168-246-207)