HI I coded and SDL app with using some QT class (QString, qdom, qiodevice).
It happen that app crash with error write/read memory and a console message like as:
I haven't paint everywhere. this is a SDL app only....so what's happen? thanks
Printable View
HI I coded and SDL app with using some QT class (QString, qdom, qiodevice).
It happen that app crash with error write/read memory and a console message like as:
I haven't paint everywhere. this is a SDL app only....so what's happen? thanks
Do you create QWidget, QPixmap, QPicture or QPrinter instance anywhere in your program?
IMO it shouldn't. Maybe you create QPixmap somewhere?Quote:
Originally Posted by mickey
QImage, QPrinter, QPixmap etc are all derived from QPaintDevice. Therefore if you use a QImage object you must have a QApplication object.Quote:
Originally Posted by Qt Assistant
QImage isn't derived from QPaintDevice in Qt3.Quote:
Originally Posted by Methedrine
No.......that's strange....Quote:
Originally Posted by jacek
Agreed, my mistake. I didn't take a look at the Qt version he's using :cool:Quote:
Originally Posted by jacek
I'm thinkng the probme isn't QT class; the console error (and quit application) happen when I use a my GL function; probabily it crash ( anyway, I wondering why qt message...)...
QQLWidget inherits QWidget which again inherits QPaintDevice ... there is your problem explained. :)
Hi, I change the only QGLWidget:: in my code; the problem persists.....
Code:
QImage txthumb = img; //QImage txthumb = QGLWidget::convertToGLFormat(img); //what I wanted do!
Do you have a QGLWidget somewhere else in your code?
It's not just QGLWidget, but basically pay attention to what the Qt classes you are using inherit. The error message states quite clearly what does not work - constructing a QPaintDevice without a QApplication. And all QWidget based classes are using a QPaintDevice.
I haven't any QGLWIdget.....but the error occur only when I use a function that get the pick 2d mouse and return the 3d point in OPenGL coordinates (this function contain only glReadPixel and gluUnprojects). At the first pick in the window it return properly the 3d point; at the second pick, application crash inside this function...) thanks
Hi all,
I found problem; I was using a class that use <qmessagebox.h>!!! I don't remember it;
But I need use it; how can I use it in SDL app without error?? thanks
I have not really worked with SDL yet but the solution clearly contains a QApplication somewhere :-) Isn't there a Qt binding for SDL? If so, it should tell you about solving this problem.
Alternately get rid off the qmessagebox and replace it with some logging or output mechanism.