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
Description:
Try this

  1. from PyQt4 import QtCore, QtGui
  2. from test import Ui_Dialog
  3. import sys
  4.  
  5. class ImageDialog(QtGui.QDialog, Ui_Dialog):
  6.     def __init__(self):
  7.         QtGui.QDialog.__init__(self)
  8.  
  9.         # Set up the user interface from Designer.
  10.         self.setupUi(self)
  11.  
  12.         # Make some local modifications.
  13.         self.colorDepthCombo.addItem("2 colors (1 bit per pixel)")
  14.  
  15.         # Connect up the buttons.
  16.         self.connect(self.okButton, QtCore.SIGNAL("clicked()"),
  17.                      self, QtCore.SLOT("test()"))
  18.         self.connect(self.cancelButton, QtCore.SIGNAL("clicked()"),
  19.                      self, QtCore.SLOT("reject()"))
  20.    
  21.     def test(self):
  22.        echo "test"; <- or whatever python use to echo.
  23.  
  24. app = QtGui.QApplication(sys.argv)
  25. window = QtGui.QDialog()
  26. ui = Ui_Dialog()
  27. ui.setupUi(window)
  28.  
  29. window.show()
  30. 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

 

Comments: 0