Skip to content

Commit 4c6626b

Browse files
author
timlinux
committed
Fixed / Removed kludge for getting detailed widget capture to layout out by calling show() on it quickly first.
git-svn-id: http://svn.osgeo.org/qgis/trunk@8483 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 9986a86 commit 4c6626b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/gui/qgsdetaileditemdelegate.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ void QgsDetailedItemDelegate::paint(QPainter * thepPainter,
5454
mpWidget->setData(myData);
5555
mpWidget->resize(theOption.rect.width(),mpWidget->height());
5656
mpWidget->setAutoFillBackground(false);
57-
mpWidget->show();
5857
mpWidget->repaint();
5958

6059
if (theOption.state & QStyle::State_Selected)
@@ -71,8 +70,7 @@ void QgsDetailedItemDelegate::paint(QPainter * thepPainter,
7170
myGradient.setColorAt(1, myColor2);
7271
thepPainter->fillRect(theOption.rect, QBrush(myGradient));
7372
}
74-
QPixmap myPixmap(mpWidget->size());
75-
mpWidget->render(&myPixmap);
73+
QPixmap myPixmap = QPixmap::grabWidget(mpWidget);
7674
thepPainter->drawPixmap(theOption.rect.x(),
7775
theOption.rect.y(),
7876
myPixmap);

0 commit comments

Comments
 (0)