Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
4.8.7
-
None
Description
https://doc.qt.io/qt-5/qwidget.html#geometry-prop says
This property holds the geometry of the widget relative to its parent and excluding the window frame
That's not true if the widget is a window. The documentation doesn't mention that.
https://doc.qt.io/qt-5/application-windows.html#window-geometry
No mention of windows either, or if it's relative or absolute coordinates.
https://doc.qt.io/qt-5/qwidget.html#mapToParent
Translates the widget coordinate pos to a coordinate in the parent widget.
Same as mapToGlobal() if the widget has no parent.
This is also not true if the widget is a window.
The only documentation (that I found) which addresses this is
https://doc.qt.io/qt-5/qwidget.html#pos-prop
This property holds the position of the widget within its parent widget
If the widget is a window, the position is that of the widget on the desktop, including its frame.
But to even realize that there's a connection, one needs to know that both pos() and geometry() refer to QWidget::data::crect internally.
I did not check any other methods or properties.
I found out about this in 4.8.7, but it seems to affect all versions.