fork download
  1. # -*- coding: utf8 -*-
  2. import sys, time
  3. from PyQt4.QtCore import *
  4. from PyQt4.QtGui import *
  5.  
  6.  
  7.  
  8.  
  9. if __name__ == '__main__':
  10. # 建立 QT 應用程式
  11. app = QApplication(sys.argv)
  12. # 建立並顯示 form
  13. mWindow = QMainWindow()
  14. wgt = QWidget()
  15. addressLineEdit = QLineEdit()
  16. valueLineEdit = QLineEdit()
  17. addressLineEdit.setFocusPolicy(Qt.ClickFocus)
  18. valueLineEdit.setFocusPolicy(Qt.ClickFocus)
  19.  
  20. layout = QVBoxLayout()
  21. layout.addWidget(valueLineEdit)
  22. layout.addWidget(addressLineEdit)
  23. wgt.setLayout(layout)
  24. mWindow.setCentralWidget(wgt)
  25. mWindow.show()
  26.  
  27. # 執行主要的 QT loop
  28. sys.exit(app.exec_())
Runtime error #stdin #stdout 0.02s 4792KB
stdin
Standard input is empty
stdout
Standard output is empty