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. How to use resource files without using .ui or form files in Qt?
Forum Updated to NodeBB v4.3 + New Features

How to use resource files without using .ui or form files in Qt?

Scheduled Pinned Locked Moved Unsolved General and Desktop
12 Posts 6 Posters 748 Views 2 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.
  • Swati777999S Offline
    Swati777999S Offline
    Swati777999
    wrote on last edited by
    #1

    Hi All,

    I have a doubt about using resource files in Qt. How to use resource files without using .ui or form files? I don't want to implement the GUI part of Qt , so how can it be achieved?

    Any suggestion will be highly appreciated.

    Thanks!

    “ In order to be irreplaceable, one must always be different” – Coco Chanel

    eyllanescE 1 Reply Last reply
    0
    • Swati777999S Swati777999

      Hi All,

      I have a doubt about using resource files in Qt. How to use resource files without using .ui or form files? I don't want to implement the GUI part of Qt , so how can it be achieved?

      Any suggestion will be highly appreciated.

      Thanks!

      eyllanescE Offline
      eyllanescE Offline
      eyllanesc
      wrote on last edited by
      #2

      @Swati777999 To use Qt Resource (.qrc) it is not necessary to use .ui. Your question is unclear.

      If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

      Swati777999S 1 Reply Last reply
      0
      • Swati777999S Offline
        Swati777999S Offline
        Swati777999
        wrote on last edited by
        #3

        Re: How to use resource files without using .ui or form files in Qt?

        I checked https://doc.qt.io/qt-5/resources.html for help but am not sure about the RCC version in the following XML codes. Can you provide more clarity on it?

        <!DOCTYPE RCC><RCC version="1.0">
        <qresource>
        <file>images/copy.png</file>
        <file>images/cut.png</file>
        <file>images/new.png</file>
        <file>images/open.png</file>
        <file>images/paste.png</file>
        <file>images/save.png</file>
        </qresource>
        </RCC>

        “ In order to be irreplaceable, one must always be different” – Coco Chanel

        1 Reply Last reply
        0
        • eyllanescE eyllanesc

          @Swati777999 To use Qt Resource (.qrc) it is not necessary to use .ui. Your question is unclear.

          Swati777999S Offline
          Swati777999S Offline
          Swati777999
          wrote on last edited by
          #4

          @eyllanesc

          I checked this link: https://doc.qt.io/qt-5/resources.html but I am not sure about which version of RCC to use in the first line. Can you provide more clarity on the following XML codes?

          <!DOCTYPE RCC><RCC version="1.0">
          <qresource>
          <file>images/copy.png</file>
          <file>images/cut.png</file>
          <file>images/new.png</file>
          <file>images/open.png</file>
          <file>images/paste.png</file>
          <file>images/save.png</file>
          </qresource>
          </RCC>

          “ In order to be irreplaceable, one must always be different” – Coco Chanel

          eyllanescE jsulmJ 2 Replies Last reply
          0
          • Swati777999S Swati777999

            @eyllanesc

            I checked this link: https://doc.qt.io/qt-5/resources.html but I am not sure about which version of RCC to use in the first line. Can you provide more clarity on the following XML codes?

            <!DOCTYPE RCC><RCC version="1.0">
            <qresource>
            <file>images/copy.png</file>
            <file>images/cut.png</file>
            <file>images/new.png</file>
            <file>images/open.png</file>
            <file>images/paste.png</file>
            <file>images/save.png</file>
            </qresource>
            </RCC>

            eyllanescE Offline
            eyllanescE Offline
            eyllanesc
            wrote on last edited by
            #5

            @Swati777999 what is the problem?

            If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

            Swati777999S 2 Replies Last reply
            0
            • Swati777999S Swati777999

              @eyllanesc

              I checked this link: https://doc.qt.io/qt-5/resources.html but I am not sure about which version of RCC to use in the first line. Can you provide more clarity on the following XML codes?

              <!DOCTYPE RCC><RCC version="1.0">
              <qresource>
              <file>images/copy.png</file>
              <file>images/cut.png</file>
              <file>images/new.png</file>
              <file>images/open.png</file>
              <file>images/paste.png</file>
              <file>images/save.png</file>
              </qresource>
              </RCC>

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Swati777999 said in How to use resource files without using .ui or form files in Qt?:

              I am not sure about which version of RCC to use in the first line

              As shown in the link you posted it should be "1.0"...

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              Swati777999S 1 Reply Last reply
              0
              • eyllanescE eyllanesc

                @Swati777999 what is the problem?

                Swati777999S Offline
                Swati777999S Offline
                Swati777999
                wrote on last edited by
                #7

                @eyllanesc even after using these codes for XML files, I can't find pics as logos for the icons. .. :( don't know where the problem lies.

                “ In order to be irreplaceable, one must always be different” – Coco Chanel

                1 Reply Last reply
                0
                • jsulmJ jsulm

                  @Swati777999 said in How to use resource files without using .ui or form files in Qt?:

                  I am not sure about which version of RCC to use in the first line

                  As shown in the link you posted it should be "1.0"...

                  Swati777999S Offline
                  Swati777999S Offline
                  Swati777999
                  wrote on last edited by
                  #8

                  @jsulm Yes, I put it in my code, still not getting the desired result; pic for the icon logos.. :(

                  “ In order to be irreplaceable, one must always be different” – Coco Chanel

                  Pablo J. RoginaP 1 Reply Last reply
                  0
                  • VRoninV Offline
                    VRoninV Offline
                    VRonin
                    wrote on last edited by
                    #9

                    Did you add it to your project file (.pro or CMakeLists.txt)?

                    "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                    ~Napoleon Bonaparte

                    On a crusade to banish setIndexWidget() from the holy land of Qt

                    1 Reply Last reply
                    0
                    • Swati777999S Swati777999

                      @jsulm Yes, I put it in my code, still not getting the desired result; pic for the icon logos.. :(

                      Pablo J. RoginaP Offline
                      Pablo J. RoginaP Offline
                      Pablo J. Rogina
                      wrote on last edited by
                      #10

                      @Swati777999 said in How to use resource files without using .ui or form files in Qt?:

                      still not getting the desired result; pic for the icon logos

                      please show your code snippet where you are using/retrieving the icons from the resource component.

                      Upvote the answer(s) that helped you solve the issue
                      Use "Topic Tools" button to mark your post as Solved
                      Add screenshots via postimage.org
                      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                      1 Reply Last reply
                      0
                      • eyllanescE eyllanesc

                        @Swati777999 what is the problem?

                        Swati777999S Offline
                        Swati777999S Offline
                        Swati777999
                        wrote on last edited by
                        #11

                        @eyllanesc after successfully creating icons, i want to put the images for them and it's not done. :( My bad luck with Qt

                        “ In order to be irreplaceable, one must always be different” – Coco Chanel

                        Pl45m4P 1 Reply Last reply
                        0
                        • Swati777999S Swati777999

                          @eyllanesc after successfully creating icons, i want to put the images for them and it's not done. :( My bad luck with Qt

                          Pl45m4P Offline
                          Pl45m4P Offline
                          Pl45m4
                          wrote on last edited by
                          #12

                          @Swati777999

                          Show what you've done so far. Have you added your rc-file to your project?


                          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                          ~E. W. Dijkstra

                          1 Reply Last reply
                          1

                          • Login

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