Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. QImage/QPixmap not initialized in Symbian device, working fine on desktop

QImage/QPixmap not initialized in Symbian device, working fine on desktop

Scheduled Pinned Locked Moved Game Development
2 Posts 2 Posters 1.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Karunesh
    wrote on last edited by
    #1

    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.

    Thanks and regards
    Karunesh

    1 Reply Last reply
    0
    • I Offline
      I Offline
      ice2jorge
      wrote on last edited by
      #2

      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".

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved