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/qgis@8483 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed May 21, 2008
1 parent dd03d02 commit e59d0600682ce957c5628e6351440305a6f010f5
Showing with 1 addition and 3 deletions.
  1. +1 −3 src/gui/qgsdetaileditemdelegate.cpp
@@ -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 e59d060

Please sign in to comment.