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

QTest mouse events are delivered to the center of the window even when pos 0,0 is specified

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.4.1, 5.7.0 Alpha
    • Fix Version/s: None
    • Component/s: Testing: qtestlib
    • Labels:
      None
    • Environment:

      Ubuntu Vivid 15.04, xfce on X server

      Description

      Bug description:
      Specifying QPointF(0,0) as arugment of QTest::mouseMove sends a move to the center of the window

      From the documentation:
      http://doc.qt.io/qt-5/qtest.html#mouseMove-1
      "If pos is not specified, the mouse pointer moves to the center of the window."

      The problem is
      https://github.com/qtproject/qtbase/blob/5.7/src/testlib/qtestmouse.h#L167
      uses "if (pos.isNull())" which is basically "if x==0 and y==0"
      so passing a pos of 0,0 is like not passing it at all.

      Additional concerns:
      am I wrong thinking that this prevents you from sending events to the top-left corner of your window?

        Attachments

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

          Activity

            People

            • Assignee:
              paeglis Gatis Paeglis
              Reporter:
              faenil Andrea Bernabei
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes