I am scripting automatic tests of Qt application using Squish framework. Spy in Squish IDE can view properties and methods of Qt widget selected by "spy picker". In Spy perspective enable Window -> Show View -> Methods.
I can see in Methods view something like void setParent(QObject*)
- method name, return and parameter types.
In runtime from Python test script I can get widget properties, for example isActiveWindow -> true
, by calling
aWidget = waitForObject("...")
aMap = object.properties( aWidget )
Widget methods are available from Python, for example I can call:
>>> aWidget.isModal()
0
But how to get list of widget methods signatures, as in Methods view in IDE? All I came up with is
>>> dir(this)
['BackButtonPressed', 'ButtonPressed', ...
But of course it lists only method names not signatures, there are no declared parameter types or return types. Spy somehow gets the signatures, how can I get them in runtime from Python?