Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QPixmap fails in release
Forum Updated to NodeBB v4.3 + New Features

QPixmap fails in release

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.6k Views 1 Watching
  • 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.
  • I Offline
    I Offline
    ilgale
    wrote on last edited by
    #1

    In my application I use QPixmap to load some Jpeg files that I will show in QLabels.

    It works fine when I run my application in debug, but, when I recompile it in Release and I run the release executable manually or by QtCreator, QPixmap fails loadind jpeg file.

    I've seen someone suggests to copy the imageformats folder (with all dlls) in the same folder of the executable file but it doesn't work !

    Is there something I have to do in my source code ? I simply do that (and in debug works fine):
    @
    QPixmap l_Pixmap;
    bool l_boResult;
    l_boResult = l_Pixmap.load("C:\Users\Administrator\Desktop\Exe\Labels\3.jpg");
    @
    but I've seen someone loads plug-ins directly in the source cose...

    Are there other trick to be used ?

    Thanks a lot !!!

    [Edit: Added @ tags; mlong]

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rschaub
      wrote on last edited by
      #2

      you can use
      @
      QList<QByteArray> QImageReader::supportedImageFormats () [static]
      @

      to determine whether the necessary plugins have been loaded. You can print the result in a console or message box and you'll at least find out if there's a problem loading the image formats plugins.

      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