Has the signal-slot behavior changed?

Detlev Offenbach detlev at die-offenbachs.de
Thu May 25 12:32:50 BST 2023


Am 25.05.23 um 12:19 schrieb Phil Thompson:
> On 25/05/2023 10:59, Detlev Offenbach wrote:
>> Hi,
>>
>> I am observing a strange behavior with the eric-ide code.
>>
>> Before upgrading to the latest PyQt6 version the following code was OK.
>>
>>     @pyqtSlot(float)
>>     def setZoomFactor(self, zoomFactor):
>>         <some code here>
>>
>> But with latest PyQt6/Qt6 it fails telling me, that the slot signature
>> (float) is not compatible. I had to change it like this
>>
>>     @pyqtSlot(float)
>>     @pyqtSlot("qreal")
>>     def setZoomFactor(self, zoomFactor):
>>         <some code here>
>>
>> What did I miss in the past?
>
> What signal are you connecting it to?

QPdfView.zoomFactorChanged(qreal zoomFactor)

Detlev

PS: Similar thing happens with QGraphicsScene.changed(const 
QList<QRectF> &region). I have to define a slot to be connected to this 
signal with

@pyqtSlot("QList<QRectF>")

-- 
Detlev Offenbach
detlev at die-offenbachs.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xBD1F26A5DA8A6150.asc
Type: application/pgp-keys
Size: 660 bytes
Desc: OpenPGP public key
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20230525/ab9e4b39/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20230525/ab9e4b39/attachment.sig>


More information about the PyQt mailing list