Forum Discussion
Thanks Marsha! I checked the info in this link but can't find the solution to my problem.
To be more specific about the problem, we have a custom Qt control (or a derived class) which is derived from the base class "QWidget". When I go to "Object Mapping" in TestComplete, I can't find the base class "QWidget" and therefore cannot check the "derived classes" checkbox which may solve my problem. Under "Object Mapping" > "Qt Controls" > "Tree Widget", there is only one object "QTreeWidget".
Therefore my question is, how can I add my custom control or derived class which is derived from the base class "QWidget"? Or how can I make TestComplete catch the items inside of my custom control? Without this ability, my only option is to use xy coordinates on the control which makes my tests unstable and hard to maintain.
Thanks!
Hello,
I am trying to pick objects inside of a Qt control. Object spy catches the entire box but is unable to catch the objects inside of it.
Object spy returns this with the box selection:
Sys.Process("Abc").....QtObject("TreeView").QtObject("qt_scrollarea_viewport")
This is a custom Qt control (or a derived class) which is derived from the base class "QWidget". When I go to "Object Mapping" in TestComplete, I can't find the base class "QWidget" and therefore cannot check the "derived classes" checkbox which may solve my problem. Under "Object Mapping" > "Qt Controls" > "Tree Widget", there is only one object "QTreeWidget".
Therefore my question is, how can I add my custom control or derived class which is derived from the base class "QWidget"? Or how can I make TestComplete catch the items inside of my custom control? Without this ability, my only option is to use xy coordinates on the control which makes my tests unstable and hard to maintain.
I also explored the option of using the "Text Recognition Technology" in TestComplete by calling the "TextObject" method but it looks like It must use the class name returned by the WndClass property of the object and since my control is Qt object it only has QtClass and therefore it is not able to invoke the TextObject method. Is there a way to use the "Text Recognition Technology" with Qt objects?
Thanks in advance!
- Marsha_R4 years agoModerator
Since they are the same question, I combined your two posts here.
Let's see a screenshot of your object mapping where the qt items are.
- sameerjade4 years agoFrequent Contributor
Attaching screenshot of my Object Mapping window:
- Marsha_R4 years agoModerator
And what happens when you try to add your custom control?
Related Content
- 10 months ago
- 7 years ago
- 6 years ago
Recent Discussions
- 46 minutes ago
- 2 hours ago