[QGIS Commit] r8483 - trunk/qgis/src/gui

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed May 21 13:20:58 EDT 2008


Author: timlinux
Date: 2008-05-21 13:20:58 -0400 (Wed, 21 May 2008)
New Revision: 8483

Modified:
   trunk/qgis/src/gui/qgsdetaileditemdelegate.cpp
Log:
Fixed / Removed kludge for getting detailed widget capture to layout out by calling show() on it quickly first.


Modified: trunk/qgis/src/gui/qgsdetaileditemdelegate.cpp
===================================================================
--- trunk/qgis/src/gui/qgsdetaileditemdelegate.cpp	2008-05-21 17:17:26 UTC (rev 8482)
+++ trunk/qgis/src/gui/qgsdetaileditemdelegate.cpp	2008-05-21 17:20:58 UTC (rev 8483)
@@ -54,7 +54,6 @@
     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 @@
       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);



More information about the QGIS-commit mailing list