Today I learned: 'Hello World!' using PyQt (more info can be found here and here). There are a lot of well-written tutes that cover actual lessons. The snippet below is more for testing that your system works.
Code:
import sys
from PyQt4.QtGui import QLabel, QApplication
App = QApplication(sys.argv)
Label = QLabel('Hello World!')
Label.show()
App.exec_()
from PyQt4.QtGui import QLabel, QApplication
App = QApplication(sys.argv)
Label = QLabel('Hello World!')
Label.show()
App.exec_()
Voila!
Note: I had to paste code line-by-line into idle because it is fussy about carriage returns

No comments:
Post a Comment