QImage to Qpixmap conversion is too slow
-
Do you update your image from a different thread? If so you should learn about threading: Threading Basics
-
Do you update your image from a different thread? If so you should learn about threading: Threading Basics
HI, is this related to the crash?
-
HI, is this related to the crash?
-
@lansing
Hi
then something is wrong with the image then.
Else why crash on copy.can you try with Image that you are 100% sure is valid ?
Hi, I have set the image to one in my resource folder for testing, now it has crashed at line
m_frameImage = image
. I have changed the image argument fromconst QImage &
toQImage*
, I don't know if that have a effect on it. But in debug, it did show my image dimension.QImage *img= new QImage(":/cross.png"); myGLPainter->drawImage(img);
-
Hi, I have set the image to one in my resource folder for testing, now it has crashed at line
m_frameImage = image
. I have changed the image argument fromconst QImage &
toQImage*
, I don't know if that have a effect on it. But in debug, it did show my image dimension.QImage *img= new QImage(":/cross.png"); myGLPainter->drawImage(img);
-
Hi, I have set the image to one in my resource folder for testing, now it has crashed at line
m_frameImage = image
. I have changed the image argument fromconst QImage &
toQImage*
, I don't know if that have a effect on it. But in debug, it did show my image dimension.QImage *img= new QImage(":/cross.png"); myGLPainter->drawImage(img);
@lansing said in QImage to Qpixmap conversion is too slow:
myGLPainter
Where do you initialize this variable?
-
Hi, I have set the image to one in my resource folder for testing, now it has crashed at line
m_frameImage = image
. I have changed the image argument fromconst QImage &
toQImage*
, I don't know if that have a effect on it. But in debug, it did show my image dimension.QImage *img= new QImage(":/cross.png"); myGLPainter->drawImage(img);
@lansing said in QImage to Qpixmap conversion is too slow:
QImage *img= new QImage(":/cross.png");
myGLPainter->drawImage(img);That's the wrong thing to do as you will leak images doing so.
Beside the initialization issue pointed by @Christian-Ehrlicher can you provide the stack trace of your crash ?