tests/auto/qscrollbar/tst_qscrollbar.cpp
changeset 33 3e2da88830cd
parent 18 2f34d5167611
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
   128     const QPoint pressPoint(verticalScrollBar->width() / 2, verticalScrollBar->height() - 10);
   128     const QPoint pressPoint(verticalScrollBar->width() / 2, verticalScrollBar->height() - 10);
   129     const QPoint globalPressPoint = verticalScrollBar->mapToGlobal(globalPressPoint);
   129     const QPoint globalPressPoint = verticalScrollBar->mapToGlobal(globalPressPoint);
   130     QMouseEvent mousePressEvent(QEvent::MouseButtonPress, pressPoint, globalPressPoint,
   130     QMouseEvent mousePressEvent(QEvent::MouseButtonPress, pressPoint, globalPressPoint,
   131                                 Qt::LeftButton, Qt::LeftButton, 0);
   131                                 Qt::LeftButton, Qt::LeftButton, 0);
   132     QApplication::sendEvent(verticalScrollBar, &mousePressEvent);
   132     QApplication::sendEvent(verticalScrollBar, &mousePressEvent);
   133     QTest::qWait(50);
   133     QTest::qWait(1);
   134     QMouseEvent mouseReleaseEvent(QEvent::MouseButtonRelease, pressPoint, globalPressPoint,
   134     QMouseEvent mouseReleaseEvent(QEvent::MouseButtonRelease, pressPoint, globalPressPoint,
   135                                   Qt::LeftButton, Qt::LeftButton, 0);
   135                                   Qt::LeftButton, Qt::LeftButton, 0);
   136     QApplication::sendEvent(verticalScrollBar, &mouseReleaseEvent);
   136     QApplication::sendEvent(verticalScrollBar, &mouseReleaseEvent);
   137 
   137 
   138     // Check that the action was triggered once.
   138     // Check that the action was triggered once.