Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QImage/QPixmap not initialized in Symbian device, working fine on desktop
Karunesh last edited by
I am trying to draw a few images using QPainter in a QGLWidget (like in the overpainting example), but the images are not initialized when doing so for a N8 device whereas it is fine with the desktop as the target.
I am doing something like this for initialization:
bool imageIsLoaded = gameImage.load(QString("../Start/Textures/Cube.png"));
if( !imageIsLoaded )
qDebug() << "Image aint loaded"; // turns out the image is not loaded
I have also tried using QPixmap, and it too does not work. But I am using QPixmaps as my textures (loaded into GLuints using bindTexture), and these work fine. I have verified that the image is in the folder I provided in the QString.
Has anyone drawn images this way in a QGLWidget? Is there some other way to draw images so that they can be used as controls in a game? Any comments are welcome.
ice2jorge last edited by
Texto original en español
Me sucedia algo similar con:
Lo solucione cuando coloque las imágenes en una carpeta directamente en donde se aloja el main del programa.
Cuando use archivos *.js era necesario colocar "../carpeta/archivo", pero al colocarlo en archivos *.qml solo coloque "/carpeta/archivo".
Something similar to:
@ image("../ folder/file") @
when you place the images in a folder directly in that it hosts the * main* program. When you use *.js files needed to put "../ folder/file", but to put it in files only *.qml put "/ folder/file".