Juergen Spitzmueller a écrit :
Abdelrazak Younes wrote:
The problems seems to be that we try to initialize the QPainter object
multiple times (at least in QLPainter). This is not allowed:
http://doc.trolltech.com/4.1/qpainter.html#QPainter-2
Yep and that's why I erased all use of qp_ private member in
"QLPainter.C" (start() and end() do nothing).
Hmm, I would have suspected that exactly this change is what causes the error.
I am not sure because QLPainter is only painting onto a pixmap. The only
painting onto an X11 device is in QWorkArea::paintEvent.
Did you encounter some problems with the use of qp_?
Yes, I had big troubles making it works. I managed to get it working but
at the end, I just noticed that using a QPainter for each operation was
not that complicated and actually resulted in less code (please compare
it with qt2 version). Plus it's the recommended way to use QPainter in
Qt4 documentation because of that very problem.
Abdel.