[PyQt] Access QObject's staticQtMetaObject private member
Florian Bruhin
me at the-compiler.org
Wed Nov 25 17:55:39 GMT 2015
* Kernc <kerncece at gmail.com> [2015-11-25 18:34:06 +0100]:
> On Sun, Nov 15, 2015 at 9:48 AM, Florian Bruhin <me at the-compiler.org> wrote:
>
> >
> > FWIW, I have some code to do this which also works for values without
> > a staticMetaObject:
> >
> >
> > https://github.com/The-Compiler/qutebrowser/blob/master/qutebrowser/utils/debug.py#L91-L167
> >
> > https://github.com/The-Compiler/qutebrowser/blob/master/tests/unit/utils/test_debug.py#L125-L185
> >
>
> Seems like I can use this. Thanks!
>
> You may have a minor bug there on line 159:
>
> https://github.com/The-Compiler/qutebrowser/blob/master/qutebrowser/utils/debug.py#L159
>
> With condition not being less-than-or-equal, you miss 'LeftButton' in
> QFlags like:
>
> >>> flags = (Qt.LeftButton | Qt.LeftButton)
Indeed, thanks!
I noticed something was wrong when writing the tests, but never
bothered investigate because I use qflags_key seldom anyways :D
After this, 2 of 4 failing tests pass now :)
https://github.com/The-Compiler/qutebrowser/commit/951c2e8eb6ae68e988fd199484f36e98b5de19d2
Florian
--
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20151125/4090b364/attachment-0001.sig>
More information about the PyQt
mailing list