The following members of QML type TestCase 已過時。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。
(obsolete)
|
mouseDoubleClick ( item , x = item.width / 2, y = item.height / 2, button = Qt.LeftButton, modifiers = Qt.NoModifier, delay = -1) |
This method is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Simulates double-clicking a mouse button with optional modifiers on an item . The position of the click is defined by x and y 。若 x and y are not defined the position will be the center of item 。若 delay is specified, the test will wait for the specified amount of milliseconds before pressing and before releasing the button.
The position given by x and y is transformed from the co-ordinate system of item into window co-ordinates and then delivered. If item is obscured by another item, or a child of item occupies that position, then the event will be delivered to the other item instead.
另請參閱 mouseDoubleClickSequence() , mousePress() , mouseRelease() , mouseClick() , mouseMove() , mouseDrag() ,和 mouseWheel() .