Last change
on this file since 1455 was
1306,
checked in by KelvinHsu, 11 years ago
|
Initial commit of early python tests
|
File size:
842 bytes
|
Rev | Line | |
---|
[1306] | 1 | #------------------------------------------------------------------------------- |
---|
| 2 | # Name: ParamGuiEdit2 |
---|
| 3 | # Purpose: |
---|
| 4 | # |
---|
| 5 | # Author: Kelvin |
---|
| 6 | # |
---|
| 7 | # Created: 27/11/2013 |
---|
| 8 | # Copyright: (c) Kelvin 2013 |
---|
| 9 | # Licence: <your licence> |
---|
| 10 | #------------------------------------------------------------------------------- |
---|
| 11 | |
---|
| 12 | import sys |
---|
| 13 | from PyQt4 import QtGui |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | class Example(QtGui.QWidget): |
---|
| 17 | |
---|
| 18 | def __init__(self): |
---|
| 19 | super(Example, self).__init__() |
---|
| 20 | |
---|
| 21 | self.initUI() |
---|
| 22 | |
---|
| 23 | def initUI(self): |
---|
| 24 | |
---|
| 25 | self.setGeometry(300, 300, 250, 150) |
---|
| 26 | self.setWindowTitle('Icon') |
---|
| 27 | self.setWindowIcon(QtGui.QIcon('web.png')) |
---|
| 28 | |
---|
| 29 | self.show() |
---|
| 30 | |
---|
| 31 | def main(): |
---|
| 32 | |
---|
| 33 | app = QtGui.QApplication(sys.argv) |
---|
| 34 | ex = Example() |
---|
| 35 | sys.exit(app.exec_()) |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | if __name__ == '__main__': |
---|
| 39 | main() |
---|
Note: See
TracBrowser
for help on using the repository browser.