Standard Qt classes¶
Squish test scripts can access methods and members of standard Qt classes.
Custom Qt classes¶
For custom Qt classes, their methods are accessible in test scripts if they have been declared as Qt slots or marked with Q_INVOKABLE. In addition properties that have been declared as QObject properties via Q_PROPERTY are available for both verifications and search by name.
Using properties for object name generation¶
Properties declared via Q_PROPERTY can be configured and used by the Squish name generator.
Dynamic properties set via
QObject.setProperty() can be queried via QObject.property() but are unfortunately not available as properties and automatic name generation.
(Also see Object Name Generation.)
In addition, the Q_ENUMS macro can be used to declare custom enum types to the (Qt) “moc” tool, which should make them accessible from Squish.
Please note that template based return types are not supported and the respective property or slot will not be listed in the
Methods views in the Squish IDE.
A possible workaround can be to return an object based on a non template based class.