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. Unable to display Qpixmap png images in release mode
Qt 6.11 is out! See what's new in the release blog

Unable to display Qpixmap png images in release mode

Scheduled Pinned Locked Moved General and Desktop
5 Posts 5 Posters 3.2k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hi,
    I know some people have asked this question before and I've tried the solutions suggested but they didn't work for me so I'm just gonna try to ask for help again here.
    I have images that will be displayed during runtime, they are ok when compiled in debug mode but when build in release mode, the images cannot be seen. I also have /imageformats dir with qmng.dll file in my application folder.

    My codes are simple as such:
    @
    void RadioUserWindow::verify_fields()
    {
    QPixmap red (":/icons/circle-red.png");
    if (//some condition)
    {
    ui->label_12->setHidden(false);
    ui->label_12->setPixmap(red);
    }
    }
    @

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      The standard questions in this case are: what's your folder structure exactly and which dlls did you copy there? Do you have multiple Qt versions installed and are you sure you didn't mix them? Are you sure you didn't copy dlls from Qt Creator directory instead of Qt directory? Do you have a custom qt.conf file in your app directory? I know you said you've got imageformats dir but many people think they got it right but they don't.

      If all these things check out you can use "Dependency Walker":http://www.dependencywalker.com/. Run it in profile mode and trigger the method above. DW will tell you which dll the app tries to load, where it is located and if it's found at all or something is missing.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        giesbert
        wrote on last edited by
        #3

        Hi,

        are you sure that qmng.dll is for png files?

        Nokia Certified Qt Specialist.
        Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          Weird... PNG does not require plugins; it is built into Qt directly.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            One thing you can try to find where it's failing is to open your file with QFile and check what error it returns

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            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