示例#1
0
            QtGui.QApplication.translate("MainWindow", "MainWindow", None,
                                         QtGui.QApplication.UnicodeUTF8))
        self.label.setText(
            QtGui.QApplication.translate("MainWindow", "Price", None,
                                         QtGui.QApplication.UnicodeUTF8))
        self.label_2.setText(
            QtGui.QApplication.translate("MainWindow", "Tax Price", None,
                                         QtGui.QApplication.UnicodeUTF8))
        self.calc_tax_button.setText(
            QtGui.QApplication.translate("MainWindow", "calc_tax_button", None,
                                         QtGui.QApplication.UnicodeUTF8))


class MainWindow(QtGui.QMainWindow, Ui_mainWindow):
    """def __init__(self,parent=None):
        super(Ui_mainWindow2,self).__init__(parent)
        self.setupUi(self)
    """
    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        Ui_MainWindow.__init__(self)
        self.setupUi(self)


import sys

app = QtGui.Application(sys.argv)
mainwindow = MainWindow()
mainwindow.show()
sys.exit(app.exec_())
 def run():
     app = QtGui.Application(sys.argv)
     GUI = Window()
     sys.exit(app.exec_())