Page 1 of 1

How do I get the position of a popup

Posted: Wed Dec 13, 2017 3:42 pm
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

Re: How do I get the position of a popup

Posted: Wed Dec 13, 2017 4:00 pm
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)

Re: How do I get the position of a popup

Posted: Wed Dec 13, 2017 4:15 pm
by fmulder
Thanks. this worked.

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

Re: How do I get the position of a popup

Posted: Wed Dec 13, 2017 4:39 pm
by mkoller
no. You need to know the name, then you can check via isPanelOpen()

Re: How do I get the position of a popup

Posted: Thu Aug 16, 2018 1:29 pm
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