示例#1
0
文件: gui.py 项目: 3WiseMen/python
class MyDialog(QtGui.QDialog):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_Dialog()
        self.ui.setupUi(self)
        self.ui.pushButton.clicked.connect(self.OK)
    def OK(self):
    	print ('OK Pressed')
示例#2
0
class MyDialog(QtGui.QDialog):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_Dialog()
        self.ui.setupUi(self)
        self.ui.pushButton.clicked.connect(self.OK)

    def OK(self):
        print('OK Pressed')
示例#3
0
 def __init__(self, parent=None):
     QtGui.QWidget.__init__(self, parent)
     self.ui = Ui_Dialog()
     self.ui.setupUi(self)
     self.ui.pushButton.clicked.connect(self.OK)
示例#4
0
文件: gui.py 项目: 3WiseMen/python
 def __init__(self, parent=None):
     QtGui.QWidget.__init__(self, parent)
     self.ui = Ui_Dialog()
     self.ui.setupUi(self)
     self.ui.pushButton.clicked.connect(self.OK)
示例#5
0
#
#app = QApplication(sys.argv)
#window = QDialog()
#ui = Ui_Dialog()
#ui.setupUi(window)
#
#window.show()
#sys.exit(app.exec_())

#or

import sys
from PyQt5.QtWidgets import QDialog, QApplication
from Form import Ui_Dialog


class ImageDialog(QDialog, Ui_Dialog):
    def __init__(self):
        super(ImageDialog, self).__init__()

        # Set up the user interface from Designer.
        self.setupUi(self)


app = QApplication(sys.argv)
window = ImageDialog()
ui = Ui_Dialog()

window.show()
sys.exit(app.exec_())