Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-19479

QKeySequence - lack key() and modifiers()

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 4.7.3
    • None
    • Windows 7 32bit

    Description

      Problem is appear in following situation:
      We have class variable:
      QKeySequence mCommenting;
      And it's value is configured by user in options (shortcut editor).
      Then we have
      void Editor::keyPressEvent(QKeyEvent* aEvent)
      {
      if(QKeySequence(aEvent->key() + aEvent->modifiers()) == mCommenting)

      { // something important here }

      }
      It works but it is weird. I expected that this should be like that:
      if((aEvent->key() == mCommenting.key()) && (aEvent->modifiers() == mCommenting.modifiers()))

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            szyk Szyk
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes