Details
-
Suggestion
-
Resolution: Invalid
-
Not Evaluated
-
None
-
4.7.0
-
None
-
Windows NT
Description
Hi,
for the unlikely case you want to extend the QWidget interface:
When I need to convert the widgets rectangle into global coordinates the code looks uggly:
QWidget actWidget;
QRect globalWidgetsRect = QRect(actWidget->mapToGlobal(QPoint(0,0)), actWidget->mapToGlobal(QPoint(actWidget->width(), actWidget->height())))
A new function
QRect QWidget::mapToGlobal(QPoint topLeftOffset, QPoint bottomRightOffset);
would help.
The method would return the widgets rectangle in global coordinates (plus the two offsets).
Offset of 0/0 would mean no offset.
Both offsets would be given in coordinates relative to the appropreate refference points.
Gerhard