SIP4 python bindings for TQt
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tut4.py 656B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env python
  2. # TQt tutorial 4.
  3. import sys
  4. from python_tqt import qt
  5. class MyWidget(qt.TQWidget):
  6. def __init__(self, parent=None, name=None):
  7. qt.TQWidget.__init__(self, parent, name)
  8. self.setMinimumSize(200, 120)
  9. self.setMaximumSize(200, 120)
  10. quit = qt.TQPushButton("Quit", self, "quit")
  11. quit.setGeometry(62, 40, 75, 30)
  12. quit.setFont(qt.TQFont("Times", 18, qt.TQFont.Bold))
  13. self.connect(quit, qt.SIGNAL("clicked()"), qt.tqApp, qt.SLOT("quit()"))
  14. a = qt.TQApplication(sys.argv)
  15. w = MyWidget()
  16. w.setGeometry(100, 100, 200, 120)
  17. a.setMainWidget(w)
  18. w.show()
  19. sys.exit(a.exec_loop())