How do I get the position of a popup

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
Search

Post Reply
5 posts • Page 1 of 1
User avatar
fmulder
Posts: 330
Joined: Wed Feb 03, 2010 9:46 am

How do I get the position of a popup

Post by fmulder »

Does anyone know how to get the position of a child panel ?
We are automating testing and I need to figure out where a popup is opened so that I can a separate tool to click on one of the buttons.

I'd need the position of the popup in absolute screen coordinates.

Thanks

share the fun
Frenk Mulder

User avatar
mkoller
Posts: 741
Joined: Fri Sep 17, 2010 9:03 am

Re: How do I get the position of a popup

Post by mkoller »

1) you can define the position of the child panel when you open it
2) use the panel attribute windowFrameGeometry or windowGeometry (and then there is also the panel function mapToGlobal)

User avatar
fmulder
Posts: 330
Joined: Wed Feb 03, 2010 9:46 am

Re: How do I get the position of a popup

Post by fmulder »

Thanks. this worked.

Is there also a function to figure what popups are currently open ?

User avatar
mkoller
Posts: 741
Joined: Fri Sep 17, 2010 9:03 am

Re: How do I get the position of a popup

Post by mkoller »

no. You need to know the name, then you can check via isPanelOpen()

laurensnoorland
Posts: 4
Joined: Thu May 17, 2018 10:28 am

Re: How do I get the position of a popup

Post by laurensnoorland »

Hey all,

The panel attribute windowFrameGeometry does not work correctly under Windows 10 or higher.
This is a QT problem. If i use windowFrameGeometry and windowGeometry i can determine the frame size.
Under Windows 7 this works.
But under Windows 10 the function will return a 8 and 31 instead of 1 and 31 pixels.

Best regards,
Laurens

Post Reply
5 posts • Page 1 of 1