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

QTestLib::keyClick(QKeySequence)

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Duplicate
    • P3: Somewhat important
    • None
    • 4.2.2
    • Testing: qtestlib
    • None

    Description

      There should be overloads that take a QKeySequence.

      If you want to write code that e.g. tests redo() (which has different keys on different platforms) you now have to do stuff like this:

      int val = QKeySequence(QKeySequence::Redo)[0];
      Qt::KeyboardModifiers mods = (Qt::KeyboardModifiers)(val & Qt::KeyboardModifierMask);
      QTest::keyClick(widget, val & ~mods, mods);

      Attachments

        Issue Links

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

          Activity

            People

              liaqi Liang Qi
              rve Anders Bakken
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes