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

QTest::mouseClick with QPushButton and QCheckBox

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 4.6.3
    • None
    • Windows XP SP3, Qt Creator v4.7.0 (32-bit)

      The issue is that when using QTest::mouseClick() with a QCheckBox, the QCheckBox must be visible (call QCheckBox::show() ) for the mouse click to register. However, for QPushButton, QPushButton::show() does not need to be called first. This behavior seems inconsistent

      Please see forum post here for code samples:

      http://developer.qt.nokia.com/forums/viewthread/1282/

      Also, if it turns out that a ::show() call is needed on every QWidget before using QTest::mouseClick(), this documentation here should be updated:

      http://doc.trolltech.com/4.6/qtestlib-tutorial3.html

        1. tst_finallytest.cpp
          2 kB
        2. finally.pro
          0.3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            jimpacyga Jim Pacyga
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes