Answer the question
In order to leave comments, you need to log in
Where does PyQt get False for a function in a qt slot?
There is a button widget. Clicking on which is connected to the function
def func(self, a=None, b=None):
print('a =', a)
self.but.clicked.connect(self.anothe_object.func)
Answer the question
In order to leave comments, you need to log in
The solution is simple: you need to mark func with a decorator
@QtCore.pyqtSlot()
def func(self, a=None, b=None):
print('a =', a)
a
, which means the second type of signal is selected and False is passed in, as an indication that the button is released after being pressed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question