Skip to content
Permalink
Browse files
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
  • Loading branch information
timlinux committed May 21, 2008
1 parent 9986a86 commit 4c6626b
Showing 1 changed file with 1 addition and 3 deletions.
@@ -54,7 +54,6 @@ void QgsDetailedItemDelegate::paint(QPainter * thepPainter,
mpWidget->setData(myData);
mpWidget->resize(theOption.rect.width(),mpWidget->height());
mpWidget->setAutoFillBackground(false);
mpWidget->show();
mpWidget->repaint();

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

0 comments on commit 4c6626b

Please sign in to comment.