diff --git a/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp b/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp index e4febdb36bf..f068b7819f5 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/basicwidgets.cpp @@ -1294,7 +1294,12 @@ void QGroupBoxDeclarativeUI::collapse() m_oldMinHeight =gb->minimumHeight(); if (!m_expanded) return; - m_contens = QPixmap::grabWidget (gb, 5, 5, gb->width() - 5, gb->height() - 5); + +#if QT_VERSION < 0x050000 + m_contens = QPixmap::grabWidget(gb, 5, 5, gb->width() - 5, gb->height() - 5); +#else + m_contens = gb->grab(QRect(5, 5, gb->width() - 5, gb->height() - 5)); +#endif gb->setPixmap(m_contens,1); hideChildren(); m_expanded = false;