Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.9.7
-
None
-
Kubuntu 18.04 mostly update, Qt 5.9.7
Description
I try to implement intelligent tab bar on tool bar. My intention is tab bar with tabs oriented west when tool bar is on the left of the window, oriented east when it is on the right, and north oriented when tool bar is on the top or on the bottom.
In order to do this I need to know x() tool bar coordinate relative to it's parent (main window). But I it seems that
parentWidget()->pos().x()
always return global (relate to screen) coordinate. Confirm of this bug is:
parentWidget()->mapFromGlobal(parentWidget()->pos()).x()
Which always returns 0 (as expected for globals).
I attach full working example to proof this bug. I also attach meaning full screenshot in order to visualize this bug.
Such values as x() == 1450 is simple impossible in relative to main window - it makes sense only as global coordination.