Hi everyone,
I have a problem with the size of a QWidget. Whenever its painted I try
to set the correct size but for some reason it doesnt work.
The following code:
***********************************************************
protected void paintEvent(QPaintEvent e) {
QPainter p = new QPainter(this);
p.setRenderHint(QPainter.RenderHint.SmoothPixmapTransform);
if (image_!=null) {
System.out.println(image_.width());
System.out.println(image_.height());
System.out.println(rect().width());
System.out.println(rect().height());
rect().setWidth(image_.width());
rect().setHeight(image_.height());
System.out.println(rect().width());
System.out.println(rect().height());
}
p.drawImage(rect(), image_);
}
**********************************************************
Delivers the following output:
992
907
365
364
365
364
For some reason it seems to ignore both set methods. Any ideas what
could have went wrong?
best regards
Florian
_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest