[PyQt] [Bug report] PyQt5.QtCore.Alignment not hashable

Florian Bruhin me at the-compiler.org
Wed Apr 12 20:56:50 BST 2017


On Wed, Apr 12, 2017 at 01:16:56PM -0300, Gabriel Marcilio wrote:
> I am having issues with PyQt5.QtCore.Alignment values. I cannot use then as
> dict keys because those values are not hashable.

You could convert them to an int when inserting them to a dict,
and then use  Qt.Alignment(key)  to get a QFlags object back.

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: 833 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170412/056662fc/attachment.sig>


More information about the PyQt mailing list