Created
March 2, 2017 03:59
-
-
Save srcrip/253c52104deb4ab38beadb255bc702e6 to your computer and use it in GitHub Desktop.
PyQt Starter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt5 import QtCore, QtGui, QtWidgets | |
from design import Ui_MainWindow | |
class App(Ui_MainWindow): | |
def __init__(self, MainWindow): | |
Ui_MainWindow.__init__(self) | |
self.setupUi(MainWindow) | |
# Connect a widget | |
self.pushButton.clicked.connect(self.func) | |
def func(): | |
print ("Test") | |
if __name__ == '__main__': | |
app = QtWidgets.QApplication(sys.argv) | |
mw = QtWidgets.QMainWindow() | |
prog = App(mw) | |
mw.show() | |
sys.exit(app.exec_()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment