This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| fastdev:python_qt [2009/11/03 12:55] – created memeruiz | fastdev:python_qt [2009/11/11 11:35] (current) – memeruiz | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Python + Qt ====== | ||
| + | |||
| + | This explains how to program a very simple application with python and QT. | ||
| + | |||
| + | import sys | ||
| + | from PyQt4 import QtGui, | ||
| + | app=QtGui.QApplication(sys.argv) | ||
| + | main_widget=QtGui.QWidget() | ||
| + | button=QtGui.QPushButton(" | ||
| + | main_widget.show() | ||
| + | main_widget.setWindowTitle(" | ||
| + | def testprint(): | ||
| + | print " | ||
| + | QtCore.QObject.connect(button, | ||
| + | sys.exit(app.exec_()) | ||