QObject::disconnect(const QMetaObject::Connection &connection)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

QObject::disconnect(const QMetaObject::Connection &connection)

Maxime Lemonnier
Hi,

I'm trying to use https://doc.qt.io/qt-5/qobject.html#disconnect-4

to disconnect connections in a generic way (without keeping track of the
actual QObject, signals and slots involved). In C++ I would
store QMetaObject::Connection instances retruned by the connection methods.
In PyQt5, I have the QMetaObject.Connection in hand, but I can't
find QObject::disconnect(const QMetaObject::Connection &connection).

Is there a way do achieve what I want?

PyQt5==5.12.2
PyQt5-sip==4.19.17


Thanks!
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: QObject::disconnect(const QMetaObject::Connection &connection)

Kyle Altendorf


On 2019-07-15 13:35, Maxime Lemonnier wrote:

> I'm trying to use https://doc.qt.io/qt-5/qobject.html#disconnect-4
>
> to disconnect connections in a generic way (without keeping track of
> the
> actual QObject, signals and slots involved). In C++ I would
> store QMetaObject::Connection instances retruned by the connection
> methods.
> In PyQt5, I have the QMetaObject.Connection in hand, but I can't
> find QObject::disconnect(const QMetaObject::Connection &connection).
>
> Is there a way do achieve what I want?

https://www.riverbankcomputing.com/pipermail/pyqt/2017-December/039853.html

I don't recall this coming back up.  (until now :] )

Cheers,
-kyle
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: QObject::disconnect(const QMetaObject::Connection &connection)

Phil Thompson-5
In reply to this post by Maxime Lemonnier
On 15/07/2019 18:35, Maxime Lemonnier wrote:

> Hi,
>
> I'm trying to use https://doc.qt.io/qt-5/qobject.html#disconnect-4
>
> to disconnect connections in a generic way (without keeping track of
> the
> actual QObject, signals and slots involved). In C++ I would
> store QMetaObject::Connection instances retruned by the connection
> methods.
> In PyQt5, I have the QMetaObject.Connection in hand, but I can't
> find QObject::disconnect(const QMetaObject::Connection &connection).
>
> Is there a way do achieve what I want?

I think it just got forgotten when support for QMetaObject.Connection
was added. It will be in tonight's snapshot - but untested.

Phil
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: QObject::disconnect(const QMetaObject::Connection &connection)

Maxime Lemonnier
Thank you very much!

On Wed, Jul 17, 2019 at 6:30 AM Phil Thompson <[hidden email]> wrote:
On 15/07/2019 18:35, Maxime Lemonnier wrote:
> Hi,
>
> I'm trying to use https://doc.qt.io/qt-5/qobject.html#disconnect-4
>
> to disconnect connections in a generic way (without keeping track of
> the
> actual QObject, signals and slots involved). In C++ I would
> store QMetaObject::Connection instances retruned by the connection
> methods.
> In PyQt5, I have the QMetaObject.Connection in hand, but I can't
> find QObject::disconnect(const QMetaObject::Connection &connection).
>
> Is there a way do achieve what I want?

I think it just got forgotten when support for QMetaObject.Connection
was added. It will be in tonight's snapshot - but untested.

Phil

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt