Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-19

QtGui.QAction.setShortcut parameters are wrongly restricted

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 1.1.0
    • PySide
    • None
    • Ubuntu linux with the 1.1.1 build built from the source as pulled on march 8.

    Description

      Note the following transcript from iPython with Qt 4.7.4 and PySide 1.1.0 on
      ubuntu. I believe the QAction.setShortcut call on "In [4]" should succeed
      (and, in fact, the error message itself seems to confirm that belief in an
      ironic twist). This seems like a twin of
      http://bugs.pyside.org/show_bug.cgi?id=1097

      In [1]: from PySide import QtCore, QtGui

      In [2]: app=QtGui.QApplication([])

      In [3]: act=QtGui.QAction("testing", None)

      In [4]: act.setShortcut(QtCore.Qt.Key_F9)
      ---------------------------------------------------------------------------
      TypeError Traceback (most recent call last)

      /home/joel/<ipython console> in <module>()

      TypeError: 'PySide.QtGui.QAction.setShortcut' called with wrong argument types:
      PySide.QtGui.QAction.setShortcut(PySide.QtCore.Qt.Key)
      Supported signatures:
      PySide.QtGui.QAction.setShortcut(PySide.QtGui.QKeySequence)

      In [5]: act.setShortcut(QtGui.QKeySequence(QtCore.Qt.Key_F9))

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            jbmohler Joel B. Mohler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes