qt_focus
Set focus on a specific UI element in a running Qt application, enabling subsequent automated interactions. Works best with QWidget; QML may require in-app focus handling.
Instructions
Set focus on a UI element.
Best effort: QWidget focus works directly; some QML items may need an explicit focus request from within the app and report ok without changing focus.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>",
"element_id": "<element_id>"
},
"name": "qt_focus"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| element_id | Yes | ||
| session_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |