diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 76544d2524..9211a24efd 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -5188,6 +5188,8 @@ QPixmap QWidget::grab(const QRect &rectangle) if (testAttribute(Qt::WA_PendingResizeEvent) || !testAttribute(Qt::WA_WState_Created)) sendResizeEvents(this); + adjustSize(); + QRect r(rectangle); if (r.width() < 0) r.setWidth(width() - rectangle.x()); diff --git a/tests/auto/gui/image/qpixmap/qpixmap.pro b/tests/auto/gui/image/qpixmap/qpixmap.pro index bcd65897d2..fe156d547c 100644 --- a/tests/auto/gui/image/qpixmap/qpixmap.pro +++ b/tests/auto/gui/image/qpixmap/qpixmap.pro @@ -31,5 +31,3 @@ wince*: { } RESOURCES += qpixmap.qrc - -CONFIG += insignificant_test # QTBUG-21402