Changes between Version 15 and Version 16 of wade/QT
- Timestamp:
- Oct 16, 2011, 3:41:46 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
wade/QT
v15 v16 8 8 * API Reference:http://doc.trolltech.com/latest/index.html 9 9 * C:/QtSDK/readme/index.html 10 * widget:如!QLineEdit、!QPushButton。 11 * layout:用來分配 widget 的排列方式。 12 10 13 11 14 = !PySide = 12 15 1. 手冊:http://developer.qt.nokia.com/wiki/PySideDocumentation/ 13 1. 環境:16 2. 環境: 14 17 * QT SDK 15 18 * Python 16 19 * !PySide 1.07 17 1. 測試:20 3. 測試: 18 21 {{{ 19 22 #!python … … 24 27 結果:1.0.7 25 28 26 1. 第一個 Hello World GUI 程式:29 4. 第一個 Hello World GUI 程式: 27 30 {{{ 28 31 #!python … … 49 52 }}} 50 53 51 1. 第二個程式,加入connect與程式連結:54 5. 第二個程式,加入connect與程式連結: 52 55 {{{ 53 56 #!python … … 76 79 }}} 77 80 81 6. 第三個程式:產生一個 dialog 應用程式 82 {{{ 83 #!python 84 #!/usr/bin/python 85 86 # Import PySide classes 87 import sys 88 from PySide.QtCore import * 89 from PySide.QtGui import * 90 91 92 # print hello 93 def say_hello(): 94 print 'hi.. wade' 95 96 class Form(QDialog): 97 def __init__(self, parent=None): 98 super(Form, self).__init__(parent) 99 self.setWindowTitle('My form') 100 101 if __name__ == '__main__': 102 app = QApplication(sys.argv) 103 form = Form() 104 form.show() 105 sys.exit(app.exec_()) 106 }}} 107 78 108 79 109 = Reference =