Hi Wysota,
Thanks for the quick reply! Here are the answers to your questions:
- getUIPopUp() simply returns the widget. It is created previously
- The call to processEvents() ensures that the widget is visible before moving it
- The posWgt that is passed in is guaranteed to only live within in a dockbar. The do while loop goes through the parents until it finds a parent that has an orientation (the dock bar). The positioning changes based on the orientation of the dock bar.
- I'm getting results that I would not expect from the debug code that you gave me... See below for details...
I placed the debug code just before moving popupWgt and just after moving popupWgt. I ran two test cases, one with posWgt being in the Bottom-Right corner (this works) and one with posWgt being in the Top-Left corner (this doesn't work). However, In both cases I'm getting results that I didn't expect.
Bottom-Right (WORKS)
Before setGeometry() or move()
- getUIPopup()->geometry() //(805, 280, 310x521)
- getUIPopup()->window()->geometry() //(805, 280, 310x521)
After setGeometry() or move()
- getUIPopup()->geometry() //(1524, 456, 314x566)
- getUIPopup()->window()->geometry() //(1524, 456, 314x566)
There are two things that are confusing me:
- The width and height changes after the move
- The new x,y coordinates are not offset by the values of popPnt: (723, 221)
Top-Left (BROKEN)
Before setGeometry() or move()
- getUIPopup()->geometry() //(805, 280, 310x521)
- getUIPopup()->window()->geometry() //(805, 280, 310x521)
After setGeometry() or move()
- getUIPopup()->geometry() //(736, 74, 314x566)
- getUIPopup()->window()->geometry() //(736, 74, 314x566)
There are two things that are confusing me:
- The width and height changes after the move
- The new x,y coordinates are not offset by the values of popPnt: (-65, -161)




Reply With Quote

Bookmarks