[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: pixmap/picture of a hidden QWidget?
From: Sandy Meier <smeier () kdevelop ! de>
Date: 2000-06-04 18:37:57
[Download RAW message or body]
Hi!
To get a "picture" of a QWidget a common way is to redirect the painting to a
QPixmap like in the following code:
void MyWidget:gePixmap(QPixmap* pm){
QPushButton* button = new QPushButton(0);
button->setText("Hello World");
QPainter::redirect( button, pm );
button->repaint();
QPainter::redirect( button, 0);
}
Unfortunately the QPushButton must be visible to get a "picture" of it. If I
set the button to hide() the repaint() doesn't nothing. :-(
Is it possible to repaint a hidden widget?
Sandy
--
email: smeier@kdevelop.de ICQ: 27681958
the KDevelop project: http://www.kdevelop.org
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic