Qt custom Widget and data members

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
zere
Posts: 4
Joined: Thu Sep 01, 2016 9:55 am

Qt custom Widget and data members

Post by zere » Thu Sep 01, 2016 10:21 am

Hi,

I'm responsible to perform a Ranorex POC on our Qt application.
I have a custom widget which holds 2 data members which have no UI representation. Both are simply an int and string.
The int is used to count number of clicks on the custom widget.
The string is used as a unique identifier (something like GUID).

I cannot find a way to identify those members by Ranorex :cry:
What should I define in my code in order for those two data members to be recognized by Ranorex :?:

Thanks,
Zere

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Qt custom Widget and data members

Post by krstcs » Thu Sep 01, 2016 1:26 pm

Ranorex is a Functional User Interface Test Automation tool. If there is no interface element that presents the information, then you will likely need to have your developers create one, even if it is hidden. Ranorex is not designed to work with internal data structures of the SUT, only with the UI.

It might be possible to get the data some other way, but it would require a large amount of user code on your part, and it would probably be easier to just have your devs create a hidden UI element for each data element you need to validate.
Shortcuts usually aren't...

zere
Posts: 4
Joined: Thu Sep 01, 2016 9:55 am

Re: Qt custom Widget and data members

Post by zere » Thu Sep 08, 2016 7:04 am

HI,

Thanks for the reply.

After more investigation I've found out that:
By using Q_PROPERTY in your QWidget derived class you can export any piece of data you want without a dedicated UI element.
It will show in the Dynamic section Ranorex Spy

Hope it helps anyone.