Posted by skrot Sat 3rd Mar 2007 16:16 - Syntax is Lua - 51 views
Modification of posting from binks Sat 3rd Mar 2007 16:10
Download | New Post | Modify | Diff | Hide line numbers
      Modification of posting from binks Sat 3rd Mar 2007 16:10
Download | New Post | Modify | Diff | Hide line numbers
        Description:
Try this
      
Try this
- 
              from PyQt4 import QtCore, QtGui
- 
              from test import Ui_Dialog
- 
              import sys
- 
              
- 
              class ImageDialog(QtGui.QDialog, Ui_Dialog):
- 
              def __init__(self):
- 
              QtGui.QDialog.__init__(self)
- 
              
- 
              # Set up the user interface from Designer.
- 
              self.setupUi(self)
- 
              
- 
              # Make some local modifications.
- 
              self.colorDepthCombo.addItem("2 colors (1 bit per pixel)")
- 
              
- 
              # Connect up the buttons.
- 
              self.connect(self.okButton, QtCore.SIGNAL("clicked()"),
- 
              self, QtCore.SLOT("test()"))
- 
              self.connect(self.cancelButton, QtCore.SIGNAL("clicked()"),
- 
              self, QtCore.SLOT("reject()"))
- 
              
- 
              def test(self):
- 
              echo "test"; <- or whatever python use to echo.
- 
              
- 
              app = QtGui.QApplication(sys.argv)
- 
              window = QtGui.QDialog()
- 
              ui = Ui_Dialog()
- 
              ui.setupUi(window)
- 
              
- 
              window.show()
- 
              sys.exit(app.exec_())
PermaLink to this entry https://pastebin.co.uk/11338
        Posted by skrot Sat 3rd Mar 2007 16:16 - Syntax is Lua - 51 views
Modification of posting from binks Sat 3rd Mar 2007 16:10
Download | New Post | Modify | Diff | Hide line numbers
      Modification of posting from binks Sat 3rd Mar 2007 16:10
Download | New Post | Modify | Diff | Hide line numbers
 
    
Comments: 0