[PyQt] Subclassing a Qt non-QObject class

Wallboy wallboy at wallboy.ca
Fri May 10 02:50:15 BST 2019


Hello,

I'm working with QNetworkCookieJar and QNetworkCookie in PyQt5. I would like
a custom QNetworkCookie class to add some additional attributes and methods
of my own. 

I would like it so that when I insert cookie/s into the QNetworkCookieJar
and retrieve them later from the cookie jar, they would return my custom
subclass instance. However it seems when I insert a cookie instance of my
subclass into the jar, the subclass information is lost later on when I
retrieve the cookies from the jar.

Is this because QNetworkCookie is not a QObject? I don't know the inner
details of how the PyQt bindings work when converting classes from PyQt->Qt
and vice versa.

Is there a way I could achieve what I want in PyQt?

Thanks



--
Sent from: http://python.6.x6.nabble.com/PyQt-f1792048.html


More information about the PyQt mailing list