socek

Untitled

May 29th, 2013
994
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. import sys
  4. from PySide import QtGui
  5.  
  6.  
  7. def new_window():
  8.     wid2 = QtGui.QWidget()
  9.     wid2.resize(250, 150)
  10.     wid2.setWindowTitle(u'Drugie okno')
  11.     wid2.show()
  12.  
  13. app = QtGui.QApplication(sys.argv)
  14.  
  15. wid = QtGui.QWidget()
  16. wid.resize(250, 150)
  17. wid.setWindowTitle('Simple')
  18. wid.show()
  19.  
  20.  
  21. button = QtGui.QPushButton(u'Nowe okno')
  22. button.clicked.connect(new_window)
  23.  
  24. layout = QtGui.QVBoxLayout(wid)
  25. layout.addWidget(button)
  26.  
  27. sys.exit(app.exec_())
Advertisement
Add Comment
Please, Sign In to add comment