[PyQt] Problem with QKeySequence

David Boddie david at boddie.org.uk
Sun Aug 24 16:01:47 BST 2008

On Sun Aug 24 15:05:32 BST 2008, Baz Walter wrote:

> But QKeySequences aren't meant to be iterable at all, right?
> This is using qt 4.4.1, pyqt 4.4.3, sip 4.7.7.

I doubt that they are supposed to be iterated over. :-)

I get slightly different results with Qt 4.3.2, SIP 4.7.0 and PyQt 4.3.0:

>>> for i in k:
...  print hex(i)
ASSERT failure in QKeySequence::operator[]: "index out of range", file 
kernel/qkeysequence.cpp, line 1167
Aborted (core dumped)

Note that the values it returns for me are all valid, though you might see
junk if it iterates past the end of the internal list of keys.


More information about the PyQt mailing list