Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [Solved] Problem with Qt Resource System
Qt 6.11 is out! See what's new in the release blog

[Solved] Problem with Qt Resource System

Scheduled Pinned Locked Moved Qt Creator and other tools
13 Posts 2 Posters 5.4k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #4

    Do you also have the rc (not qrc) file for your application ?

    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
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #5

      Yep, I have.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • K Offline
        K Offline
        koahnig
        wrote on last edited by
        #6

        I have removed the .rc file and compiled the same result, but the application icon is missing as well ;(

        Vote the answer(s) that helped you to solve your issue(s)

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

          Well, at least we know that something is working if the icon disappeared...

          Can you post the rc and pro file ?

          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
          • K Offline
            K Offline
            koahnig
            wrote on last edited by
            #8

            bliblablo.pro
            @
            QT += core gui network
            greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

            TEMPLATE = app
            TARGET = bliblablo

            include(../../CompileSettings/blabla.inc)
            INCLUDEPATH += .
            ./Gui

            include(bliblablo.pri)

            win32:RC_FILE = bliblablo.rc

            HEADERS +=
            Gui/blobloProcessInformation.h

            SOURCES +=
            Gui/blobloProcessInformation.cpp
            @

            bliblablo.rc
            @
            IDI_ICON1 ICON DISCARDABLE "bliblablo.ico"
            @

            bliblablo.qrc
            @
            <RCC>
            <qresource prefix="/bliblablo">
            <file>pictograms-road_signs-stop_sign(16x16).ico</file>
            <file>pictograms-road_signs-stop_sign(32x32).ico</file>
            <file>pictograms-road_signs-stop_sign(48x48).ico</file>
            </qresource>
            </RCC>
            @

            The pixel sizes are given in the names. These icons are from open_icon_library. bliblablo.ico is self-generated icon. Do not remember any more how.

            Note: I have anonymized the names, but they are consistent.

            Vote the answer(s) that helped you to solve your issue(s)

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

              Just to rule out the obvious, is bliblablo.ico in the same folder as the rc file ?

              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
              • K Offline
                K Offline
                koahnig
                wrote on last edited by
                #10

                Yes. All icons are in the same folder as well as the (q)rc files.

                The problem is not bliblablo,ico which is shown in left corner of mainwindow and everywhere where it should appear. The problems are with the stop sign. They are loaded out of the qrc file with
                @
                QIcon icon ( ":/bliblablo/pictograms-road_signs-stop_sign(48x48).ico" );
                QTableWidgetItem *wgt = new QTableWidgetItem (icon, runName );
                ui->twProcessOverview->setItem ( cnt, _ActionCol, wgt );
                @

                No problem on development machine started inside and outside of creator with and without debug mode.
                When bringing to other machine, the application does work as expected. Only the stupid stop icons are not shown.

                Vote the answer(s) that helped you to solve your issue(s)

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

                  Woops sorry… I misunderstood you.

                  Is your ico plugin missing ?

                  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
                  • K Offline
                    K Offline
                    koahnig
                    wrote on last edited by
                    #12

                    Hpfff...
                    You hit the nail on the head.
                    Thanks a lot!

                    Vote the answer(s) that helped you to solve your issue(s)

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

                      You're welcome !

                      That's why I use png for images other than the required application icon, no plugin needed :)

                      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