2018-11-06 Python_編寫記錄-SpinBoxAn

2018-11-06  本文已影响0人  墨茗祺緲

import sys

from PyQt5.QtWidgets import *

from PyQt5.QtGui import *

from Dialog_MySignal_t1 import *

class MyFrom(QDialog,Ui_Dialog_MySignals):

    def __init__(self):

        super().__init__()

        self.setupUi(self)

        self.dial_thisA.setNotchesVisible(True)

        self.dial_thisA.valueChanged.connect(self.ChangV)

        self.spinBox_thisB.valueChanged.connect(self.ChangS)

    def ChangV(self):

        self.spinBox_thisB.setValue(self.dial_thisA.value())

    def ChangS(self):

        self.dial_thisA.setValue(self.spinBox_thisB.value())

if __name__ == "__main__":

    App = QApplication(sys.argv)

    From = MyFrom()

    From.show()

    App.exec_()

上一篇下一篇

猜你喜欢

热点阅读