Hello,
when running my application in Debug mode of VS2008, there is output
QPainter::begin: Paint device returned engine == 0, type: 1
In source code, QPainter objects have never called begin(). Could anyone help?
Thanks
Hello,
when running my application in Debug mode of VS2008, there is output
QPainter::begin: Paint device returned engine == 0, type: 1
In source code, QPainter objects have never called begin(). Could anyone help?
Thanks
begin() is being called by the following constructor:In source code, QPainter objects have never called begin().
http://doc.trolltech.com/4.7/qpainter.html#QPainter-2
Are you painting in other threads than the main thread?
Last edited by high_flyer; 24th February 2011 at 09:35.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Hello,
I noticed that each time the program execute following line,
bitBlt( m_Label, QPoint(0,0), &pixmap2 );
the error message shows in output: "QPainter::begin: Paint device returned engine == 0, type: 1"
Both m_Label ( a QLabel object) and pixmap2 (a QPixmap object) are valid.
Is there any suggestion? BTW, I am using QT4.6.
Thank you,
Yes, please answer my question in my previous post.Is there any suggestion?
Also, the fact you are suing bitBlt() in Qt4.X is a sign for trouble!
It looks to me you are trying to paint outside a paintEvent() which is a "no no" in Qt4.x
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
also check if
Bookmarks