doijunior
23rd February 2010, 14:06
Hello I have some widgets that I need to save into a img, but I had some problems even before in the pixmap.
The widget is a QCalendarWidget derived class, but after had problems I tried doing this:
QCalendarWidget *c = new QCalendarWidget();
QPixmap pix;
pix.grabWidget(c);
if(pix.isNull()) qDebug("fail")
Myclass and even QCalendarWIdget, QWidget, etc.. always fail
I need to do something else inside the widget class to grab it? (I am not calling it graWidget on the paintEvent() )
The widget is a QCalendarWidget derived class, but after had problems I tried doing this:
QCalendarWidget *c = new QCalendarWidget();
QPixmap pix;
pix.grabWidget(c);
if(pix.isNull()) qDebug("fail")
Myclass and even QCalendarWIdget, QWidget, etc.. always fail
I need to do something else inside the widget class to grab it? (I am not calling it graWidget on the paintEvent() )