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

QTestLib::keyClick(QKeySequence)

XMLWordPrintable

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

      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);

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes