Details
-
Bug
-
Resolution: Done
-
P4: Low
-
4.5.2, 4.6.0
-
None
-
951cceac68b4a6cf38da83b69dcde2c8109342a2
Description
The widget itself is painted in a correct size, but has a very thick border over the rest of the QPixmap.
Two possible workarounds are:
1) w.show(); and then call the grabWidget()
or
2) w.resize(..., ...); and then grabWidget()
Reproducible with the following code:
#include <QtGui>
#include <QDebug>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTreeWidget w;
QPixmap pixmap = QPixmap::grabWidget(&w);
pixmap.save("widget.png");
return 0;
}