This code:
self.buttonOk.clicked(self.accept())
self.buttonCancel.clicked(self.reject())
Shows this error:
TypeError: native Qt signal is not callable
How do I connect buttonOk's clicked() signal to accept() Slot?
There are a couple of things wrong with your code.
Firstly, you need to use the signal's connect()
method to make the connection; and secondly, you need to pass in a callable object (i.e. no parens).
So your code needs to look like this:
self.buttonOk.clicked.connect(self.accept)
self.buttonCancel.clicked.connect(self.reject)
An overview of PySide's signal and slot support can be found here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With