QImage/QPixmap not initialized in Symbian device, working fine on desktop
-
Hi
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:
@
QPoint position;
QImage gameImage;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.
-
Texto original en español
Me sucedia algo similar con:
@image("../carpeta/archivo")@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".Traducción
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".