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

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

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 5.13.0 Alpha 1
    • None
    • Testing: QuickTest
    • None
    • 7a3cad0619662b992154e075ec6b840bfc8a46a7 (qt/qtdeclarative/dev)

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

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes