This tutorial provides a practical hands-on introduction to the PyQt4 application development framework, the nicest and most powerful yet easy to use library for cross-platform Python GUI programming available today.

If you tried Tkinter (or some other GUI library) and didn't like it, have another go, this time using PyQt4---you'll get much better results than with Tkinter, since PyQt4 is far more flexible and powerful, and is much easier to program.

To get the most out of the tutorial you must be comfortable doing object oriented Python programming, but no GUI programming experience is assumed. You will need to bring a laptop with PyQt4 and Python 2.5 preinstalled, and you'll need a text editor of course---IDLE is fine for that. It doesn't matter what operating system you have, Windows, Mac OS X, BSD, Linux, or any Unix with X11 that has PyQt4 and Python installed is fine. (If you can't bring a laptop please contact the conference organizers; they have a limited number of machines available for loan.)

The first part of the tutorial is an introductory talk, covering PyQt and key concepts in PyQt and GUI programming. (This will be shorter and narrower in scope than the coverage given in my PyQt talk tomorrow, to give as much time to practical work as possible.)

After the introduction the tutorial proper will begin. This will start with the presentation of a couple of small example applications with a review of the key points/issues that the examples brings into focus. Then it will be your turn! You'll be given a small application to write, structurally similar to one of the examples. Once most people are finished, we will review a solution so that you can see how that compares with what you did.

We will then repeat this process two, three, or four times more, depending on how much time we have, with further examples being reviewed to introduce new concepts and techniques, and then you having the chance to try out what you've learned, hopefully culminating in you creating a complete custom widget---something not really possible with Tkinter.

GUI programming provides much finer control over the user interface than is possible in web programming and allows for the creation of large-scale applications that are not confined to the limitations of a web browser. And GUI programming can be a lot of fun too!

PyQtTutorial (last edited 2008-09-10 10:48:51 by 87)