Guest User

Untitled

a guest
Oct 22nd, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. import sys
  2. from PySide import QtGui
  3.  
  4. class PySideUI(QtGui.QMainWindow):
  5.  
  6. def __init__(self):
  7. QtGui.QMainWindow.__init__(self)
  8. self.resize(400,400)
  9. self.setupUI()
  10. self.setWindowTitle('Window Title')
  11. self.show()
  12.  
  13.  
  14. def setupUI(self):
  15. self.centralWidget = QtGui.QWidget(self)
  16. self.main_layout = QtGui.QVBoxLayout(self.centralWidget)
  17. self.main_layout.setSpacing(4)
  18.  
  19. self.button = QtGui.QPushButton(self)
  20. self.button.setText('Click Here')
  21. self.main_layout.addWidget(self.button)
  22.  
  23. self.setCentralWidget(self.centralWidget)
  24.  
  25.  
  26.  
  27. if __name__ == "__main__":
  28. application = QtGui.QApplication(sys.argv)
  29. mainWindow = PySideUI()
  30. QtGui.QApplication.processEvents()
  31. sys.exit(application.exec_())
Add Comment
Please, Sign In to add comment