December 17, 2009

Python - PyQt4 - Hello World

basic "Hello World" GUI application using Python and Qt (PyQt4)

#!/usr/bin/env python
import sys
from PyQt4 import Qt

app = Qt.QApplication(sys.argv)
lbl = Qt.QLabel('Hello World')


Pete said...

PyQt is great. I'm a bit torn between the Qt3 api, which had several handy shortcuts for programmatically creating interfaces. Qt4 exchanged that for more consistency. Ohwell, both are win for me.

Corey Goldberg said...

I've just been playing with Qt4 a bit, and it is nice. Though I still think wx is my fav GUI toolkit. and Tk looks pretty (finally) in the newer versions of Python (2.7/3.1)