QWidget :: mapToGlobal () when the widget is not displayed

can QWidget::mapToGlobalwork when the widget is not displayed? I find nothing in the manual. If this is not possible. Why?

+5
source share
1 answer

I just wrote a small program that calls a QWidget::mapToGlobal( QPoint( 0,0 ) )hidden widget. I found that the position that I changed depends on whether the widget has already been displayed on the screen before I request its position.

The QWidget :: mapToGlobal () documentation says:

Translates widget coordinates into global screen coordinates. For example, mapToGlobal (QPoint (0,0)) will give the global coordinates of the top left pixel of the widget.

, , , .

, , -, , , . , Qt.

+5

All Articles