Windows Convenience API

Note: The Windows Convenience API is only available in the Squish for Windows editions.

Note: The Squish documentation uses the term widget when referring to GUI objects. Windows developers may be more familiar with the terms control and container, both of which are covered by the term widget in the Squish documentation.

GestureBuilder class

A sequence of touch interactions.

chooseFile

Automates a native file selection dialog.

clickButton

Clicks on a button.

clickItem

Clicks on an named item in a view.

collapse

Collapses a Tree Item or hides a Combo Box.

collapseItem

Collapses an item in a tree.

doubleClick

Double-clicks on a widget.

doubleClickItem

Double-clicks a named item in a view.

dragAndDrop

Performs a drag and drop operation.

expand

Expands a Tree Item, or drops-down a Combo Box.

expandItem

Expands an item in a tree.

focusedWindow

Returns a reference to the object with keyboard focus.

gesture

Plays a gesture.

installEventHandler

Installs a global event handler.

mouseClick

Clicks the mouse on the specified widget.

mouseDrag

Performs a mouse drag.

mousePress

Presses (without releasing) a mouse button.

mouseRelease

Releases the mouse button.

mouseWheel

Performs a mouse wheel operation.

nativeObject property

A reference to an object containing native properties and methods.

readGesture

Returns a GestureBuilder object after opening a Gesture file.

setFocusedWindow

Gives keyboard focus to a widget.

setForegroundWindow

Tries to bring a window into the foreground.

setValue

Sets the value of a spinbox, slider, or scrollbar.

type

Types text into an editable widget.

Windows Convenience Function Parameters

For all of the Windows Convenience API functions that take an objectOrName argument, this argument can be a reference to an object or the name of an object—the object must be (or name) a native Windows object.

Some of the Windows Convenience API functions can take a modifierState argument which indicates which special keys are pressed at the time of a mouse click. And some of the functions can also take a mouseButton argument which indicates which mouse button was clicked.

The modifierState can be one or more of the following: Modifier.NoModifier, Modifier.Alt, Modifier.Control, Modifier.Shift. If more than one is used they must be OR-d together, for example, Modifier.Alt|Modifier.Shift. The form shown here works e.g., Modifier::Control, and for Tcl use the enum function, e.g., enum Modifier Control.

The mouseButton can be any one of: MouseButton.NoButton, MouseButton.Wheel, MouseButton.LeftButton, MouseButton.MiddleButton, MouseButton.RightButton. MouseButton.XButton1. MouseButton.XButton2.

The form shown above works for Python and JavaScript.

For Perl use this: MouseButton::LeftButton, etc.

For Ruby use this: MouseButton::LEFT_BUTTON, etc.

For Tcl use this: enum MouseButton LeftButton, etc.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.

Search Results