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

Add public C++ API for verifying that a QQuickItem was polished

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 5.13.0 Alpha 1
    • Component/s: Testing: QuickTest
    • Labels:
      None
    • Commits:
      7a3cad0619662b992154e075ec6b840bfc8a46a7 (qt/qtdeclarative/dev)

      Description

      Verifying that an item was polished is quite common in Qt's auto tests:

      Any user applications that simulate user interaction will also need this API if they don't want to use unreliable qWait() calls.

      QQuickItem::polish() and QQuickItem::updatePolish() are both public functions, so the notion of polishing in Qt Quick is not new or hidden.

      I propose adding some functions that can be used to ensure that an item has been polished (and in my case, is ready for mouse events). Then, client code could look something like this:

      item->polish(); // May not be necessary...
      QVERIFY(QQuickTest::qIsPolishScheduled(item));
      QVERIFY(QQuickTest::qWaitForItemPolished(item));
      

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              mitch_curtis Mitch Curtis
              Reporter:
              mitch_curtis Mitch Curtis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes