Linux Today: Linux News On Internet Time.

Make Pretty GUI Apps Fast with Python-Qt

Jan 28, 2010, 20:04 (2 Talkback[s])
(Other stories by Akkana Peck)

"KDE users love the look of all those pretty applications. The key is the toolkit KDE uses: Qt.

"Qt's Python bindings -- called Python-Qt -- make it easy to build up a good-looking application quickly. The best way to get Python-Qt is via your distro: for instance, on Ubuntu, look for the package called python-qt4. To install from source, follow the links at Installing PyQt. You'll need to install sip first, if your distro doesn't already provide it.

"A minimal window

"Let's start with a very minimal window, with just a quit button.

"You'll need to import two PyQt modules: PyQt4.QtCore and PyQt4.QtCore. It's not always obvious which module will contain a particular object. So if you want to be able to copy other people's code, it's easiest to import everything from both those modules. You'll also need the sys module so you can access command-line arguments with sys.argv."

Complete Story

Related Stories: