Advertisement
gregwa

FCM 73 - pytest.py

May 10th, 2013
285
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # -*- coding: utf-8 -*-
  2.  
  3. # Form implementation generated from reading ui file 'pytest1.ui'
  4. #
  5. # Created: Fri May 10 09:40:15 2013
  6. #      by: PyQt4 UI code generator 4.8.5
  7. #
  8. # WARNING! All changes made in this file will be lost!
  9.  
  10. from PyQt4 import QtCore, QtGui
  11.  
  12. try:
  13.     _fromUtf8 = QtCore.QString.fromUtf8
  14. except AttributeError:
  15.     _fromUtf8 = lambda s: s
  16.  
  17. class Ui_MainWindow(object):
  18.     def setupUi(self, MainWindow):
  19.         MainWindow.setObjectName(_fromUtf8("MainWindow"))
  20.         MainWindow.resize(500, 350)
  21.         MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Python Test1", None, QtGui.QApplication.UnicodeUTF8))
  22.         self.centralwidget = QtGui.QWidget(MainWindow)
  23.         self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
  24.         self.btnExit = QtGui.QPushButton(self.centralwidget)
  25.         self.btnExit.setGeometry(QtCore.QRect(200, 260, 97, 27))
  26.         self.btnExit.setText(QtGui.QApplication.translate("MainWindow", "Exit", None, QtGui.QApplication.UnicodeUTF8))
  27.         self.btnExit.setObjectName(_fromUtf8("btnExit"))
  28.         self.btnClickMe = QtGui.QPushButton(self.centralwidget)
  29.         self.btnClickMe.setGeometry(QtCore.QRect(200, 200, 97, 27))
  30.         self.btnClickMe.setText(QtGui.QApplication.translate("MainWindow", "Click Me!", None, QtGui.QApplication.UnicodeUTF8))
  31.         self.btnClickMe.setObjectName(_fromUtf8("btnClickMe"))
  32.         self.lblDisplay = QtGui.QLabel(self.centralwidget)
  33.         self.lblDisplay.setGeometry(QtCore.QRect(140, 130, 221, 20))
  34.         self.lblDisplay.setText(_fromUtf8(""))
  35.         self.lblDisplay.setAlignment(QtCore.Qt.AlignCenter)
  36.         self.lblDisplay.setObjectName(_fromUtf8("lblDisplay"))
  37.         MainWindow.setCentralWidget(self.centralwidget)
  38.         self.menubar = QtGui.QMenuBar(MainWindow)
  39.         self.menubar.setGeometry(QtCore.QRect(0, 0, 500, 25))
  40.         self.menubar.setObjectName(_fromUtf8("menubar"))
  41.         MainWindow.setMenuBar(self.menubar)
  42.         self.statusbar = QtGui.QStatusBar(MainWindow)
  43.         self.statusbar.setObjectName(_fromUtf8("statusbar"))
  44.         MainWindow.setStatusBar(self.statusbar)
  45.  
  46.         self.retranslateUi(MainWindow)
  47.         QtCore.QObject.connect(self.btnExit, QtCore.SIGNAL(_fromUtf8("clicked()")), MainWindow.close)
  48.         QtCore.QObject.connect(self.btnClickMe, QtCore.SIGNAL(_fromUtf8("clicked()")), self.SetLabelText)
  49.         QtCore.QMetaObject.connectSlotsByName(MainWindow)
  50.  
  51.     def retranslateUi(self, MainWindow):
  52.         pass
  53.  
  54.     def SetLabelText(self):
  55.         self.lblDisplay.setText(_fromUtf8("That Tickles!!!"))    
  56.        
  57. if __name__ == "__main__":
  58.     import sys
  59.     app = QtGui.QApplication(sys.argv)
  60.     MainWindow = QtGui.QMainWindow()
  61.     ui = Ui_MainWindow()
  62.     ui.setupUi(MainWindow)
  63.     MainWindow.show()
  64.     sys.exit(app.exec_())
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement