PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 1097 - QtGui.QShortcut.setKey requires QKeySequence
: QtGui.QShortcut.setKey requires QKeySequence
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtGui
: HEAD
: PC Linux
: P1 normal
Assigned To: Paulo Alcantara
:
:
:
  Show dependency treegraph
 
Reported: 2011-12-20 13:55 EET by Joel B. Mohler
Modified: 2012-01-02 21:44 EET (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joel B. Mohler 2011-12-20 13:55:20 EET
PySide 1.0.8 appears to requires a QKeySequence object, but the documentation
at  http://developer.qt.nokia.com/doc/qt-4.8/qshortcut.html states it should be
able to take a Qt::CTRL + Qt::Key_P.  The precise python analog would be:

    del_key = QtGui.QShortcut(self)
    del_key.setKey(QtCore.Qt.CTRL + QtCore.Qt.Key_Delete)

This code worked in PyQt4 and I'm virtually certain that it worked in prior
versions of PySide.

In version 1.0.8, I need to insert a QtGui.QKeySequence:

    del_key = QtGui.QShortcut(self)
    del_key.setKey(QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_Delete))
Comment 1 Hugo Parente Lima 2011-12-20 19:51:50 EET
Thanks for reporting this regression.
Comment 2 Paulo Alcantara 2011-12-22 22:07:23 EET
Hi,

Thanks for the report!

This bug has been fixed on Shiboken commit
faf9f948deb70df76a8e7f91eba861fae78e5273.