Skip to content

Improve basic widget mouse support

Steven Pehrson requested to merge sbp/qttesting:improved-mouse into master

The buttons() state was not recorded correctly

We need additional data to synthesize the QMouseEvent properly. Using Json here to make the arguments easier to reason about when modifying the scripts manually, and when debugging problems. Continue to support old ad-hoc string serialization in existing scripts.

Admittedly, json is not pretty when encoded into an xml attribute because the quote charcter becomes &quote. We have been primarily using python based macro files. Still... It is more readable than the old ad-hoc string.

Here is how what an argument string looks like in a python macro

'{"key_modifiers":0,"local_pos":[7,243],"pressed_buttons":1,"trigger_button":1,"window_pos":[515,335]}'

Merge request reports