0

I have a PyQt5 application with 2 windows. After a certain event in window #1 I want to uncheck a checkbox in window #2 using a pyqtSignal if it is possible. This is what I have so far: 2nd window:

class AnotherWindow(QWidget):
    def __init__(self):
        super().__init__()
        self.setFixedSize(600, 600)
        self.box = QCheckBox('some text', self)

    def disable_box(self):
        self.box.setChecked(False)

in the main window:

win2 = AnotherWindow()
worker.box_update.connect(win2.disable_box())

I get an error after this: TypeError: argument 1 has unexpected type 'NoneType'

elapidae
  • 39
  • 4

0 Answers0