Now button does even more stuff

This commit is contained in:
altffour 2019-12-03 18:19:24 +03:00
parent 830394f161
commit 4d584b6ec6
No known key found for this signature in database
GPG Key ID: 2E7B9E061AF66FC3
1 changed files with 12 additions and 4 deletions

View File

@ -1,17 +1,25 @@
from PyQt5.QtWidgets import QWidget, QPushButton
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import pyqtSlot
from PyQt5 import QtWidgets, uic
class mainWin(QtWidgets.QMainWindow):
equval = "Linear"
def __init__(self):
super(mainWin, self).__init__()
self.ui = uic.loadUi("ui/mainWindow.ui", self)
# Get runBtn, and connect it to stuff.
self.runBtn = self.findChild(QtWidgets.QPushButton, "runBtn")
self.runBtn.clicked.connect(self.runBtnPressed)
# Get equCbo, and connect it to stuff.
self.equCbo = self.findChild(QtWidgets.QComboBox, "equCbo")
self.equCbo.activated[str].connect(self.onEquCboChanged)
self.ui.show()
def runBtnPressed(self):
print("Test")
print(self.equval)
def onEquCboChanged(self, text):
self.equval = text