Skip to content Skip to sidebar Skip to footer

QtCore.SIGNALS Not Working On My Code

Can someone me explane how should like my code, or what I'm doing wrong ? I want to use button 'btn_run' to run 'view_splash' function. But somethink going wrong, but 'view_splash'

Solution 1:

You need to create and connect the signals differently.

class AThread(QtCore.QThread):
    view_splash = QtCore.pyqtSignal()

    def run(self):
        ...
        self.view_splash.emit()

class Window(QtGui.QMainWindow):

    def __init__(self):
        ...
        self.threadclass.view_splash.connect(self.view_splash)

Post a Comment for "QtCore.SIGNALS Not Working On My Code"