[PATCH] Get rid of QPainter warnings

Rafael Fernández López ereslibre at kde.org
Fri Apr 4 00:22:32 BST 2008


Hi Germain,

Actually, the test is wrong from my understanding. You cannot start the 
painter there and then do the render on the pixmap.

Ideally, you should what the attached patch does, or if you create the 
QPainter on the beginning perform an end() and after rendering, a begin().

As said here:
http://doc.trolltech.com/4.3/qwidget.html#render

## QUOTE ##
Note: Make sure to call QPainter::end() for the given target's active painter 
(if any) before rendering. For example:
 QPainter painter(this);
 ...
 painter.end();
 myWidget->render(this);
## !QUOTE ##

The attached file does the same, but making this rule be obeyed.


Bye,
Rafael Fernández López

GPG Fingerprint: B9F4 4730 43F8 FFDD CC5E BA8E 724E 406E 3F01 D070
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tst.cpp
Type: text/x-c++src
Size: 534 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20080404/9d9ceb40/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20080404/9d9ceb40/attachment.sig>


More information about the kfm-devel mailing list