0

Is it possible to get the valueChanged from a qDial and pass it to another method? I'm using Sypder 3.2.6 w/ QT deisgner 5.6.2.

My python code goes like this:

from PyQt5 import QtWidgets, uic

qtCreatorFile = "testDial.ui" # Enter QT file here.
Ui_MainWindow, QtBaseClass = uic.loadUiType(qtCreatorFile)

class App(QtWidgets.QMainWindow, Ui_MainWindow):

    def __init__(self):
    QtWidgets.QMainWindow.__init__(self)
    Ui_MainWindow.__init__(self)
    self.setupUi(self) 
    self.dial.valueChanged.connect(self.showDialValue)

    def showDialValue(self):
        pass
     #connect to the qDial and print out the new value

if __name__ == '__main__':
    import sys
    app = QtWidgets.QApplication.instance()
    if app is None:
        app = QtWidgets.QApplication(sys.argv)
    main = App()
    main.show()
    sys.exit(app.exec_())
eyllanesc
  • 235,170
  • 19
  • 170
  • 241
sallwine
  • 1
  • 4

0 Answers0