Posted By

akus85 on 06/18/12


Tagged

window python pyqt4


Versions (?)

First Window in PyQt4


 / Published in: Python
 

  1. from PyQt4 import QtGui, QtCore
  2. import sys
  3.  
  4. class Window(QtGui.QMainWindow):
  5. def __init__(self):
  6. QtGui.QMainWindow.__init__(self) #import all widgets and core functions
  7. self.resize(200,200)
  8. self.setWindowTitle('First Window')
  9.  
  10. app = QtGui.QApplication(sys.argv)
  11. main = Window()
  12. main.show()
  13. sys.exit(app.exec_()) #freeze screen

Report this snippet  

You need to login to post a comment.