Forget it. Now works fine, I don't know why. (maybe initialization and I forgot to rebuild)
Anyway, any idea about this:
"QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::setPen: Painter not active"
Thanks.
Can you trace that to which line in your code it points to ?
Do u get this message even after initialzing the variables ?
You can paste some qDebugs in your code (for example at the first lines of each suspected method with Q_FUNC_INFO, __FILE__ and __LINE__):
then you can maybe find when those QPainter warnings are printed.Qt Code:
qDebug() << Q_FUNC_INFO; // prints full method name qDebug() << "file:" << __FILE__ << " line:" << __LINE__; // prints file and line where this code isTo copy to clipboard, switch view to plain text mode
I would like to be a "Guru"
Useful hints (try them before asking):
- Use Qt Assistant
- Search the forum
If you haven't found solution yet then create new topic with smart question.
I used __FILE__ and __LINE__ with gcc on Linux, but I thought it's rather common and should work on VS for example.
And there is also Qt Meta Object system whick can give you some info. Every class which has a moc part (so inherits QObject and has a Q_OBJECT macro) has a metaObject() which returns QMetaObject, which has methods like classInfo(), className() - can be also useful :]
I would like to be a "Guru"
Useful hints (try them before asking):
- Use Qt Assistant
- Search the forum
If you haven't found solution yet then create new topic with smart question.
ricardo (4th May 2009)
Interesting. I'll use it, thanks.
Ran into the same error, it seems to be quite Random (at least in my case). The Error occured in debug mode, running the program in release mode, then again in debug mode fixed it.. Hope this helps to anyone. (Might be a bug...)
Bookmarks