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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.4.1, 5.7.0 Alpha
    • Testing: qtestlib
    • None
    • 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

            Unassigned Unassigned
            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