PyQT installation /configuration

David Boddie david at boddie.org.uk
Sun Jul 16 08:50:04 EDT 2006


adrian_p_smith at yahoo.com wrote:
> David Boddie wrote:
>
> > However, you will have difficulty using the examples in that book
> > because it was written for PyQt3.
>
> Ah yes, it doesn't recognise "QApplication" now. Never mind.

QApplication is still there. You can access it via the Qt module and
create an application object in the following way:

  import sys
  from PyQt4 import Qt
  app = Qt.QApplication(sys.argv)

> > Work is underway to "port" the book
> > to PyQt4, but it will take some time. (You can help with this and learn
> > about PyQt4 at the same time, if you want.)
>
> Er...you might be overestimating my potential unless there's some
> *really* entry-level material to be dealt with there. Though they do
> say it's a good way to learn. Is there a forum?

Yes, it's at http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

> > There's plenty of learning material for Qt 4; the official
> > documentation at http://doc.trolltech.com/4.1 contains examples
> > and overviews that are readable if you already know C++.
>
> One of the reasons I chose Python was so I wouldn't have to, alas.

Much of the example code for Qt is readable even if you only
know Python. Some of the main differences between Qt and PyQt
are described in this document:

http://www.riverbankcomputing.com/Docs/PyQt4/pyqt4ref.html

Good luck!

David




More information about the Python-list mailing list