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 557B

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