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. Embed icon into UI
Forum Updated to NodeBB v4.3 + New Features

Embed icon into UI

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 1.2k 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.
  • L Offline
    L Offline
    logithack
    wrote on last edited by
    #1

    Hey everyone,

    I've created a couple of actions and added icons to them and added the actions to a toolbar. When I load the UI everything works fine. However, when I move the icon files to a different directory, they're no longer displayed in the UI. It seems as though Qt Designer requires that the icons always be in the same directory so it has a reference to them.

    How can I sort of embed icons into an UI so that I can move or delete them as I like after I've finished creating the UI?

    Any help is greatly appreciated!

    Kind regards,

    logithack

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

      Hi and welcome to devnet,

      Take a look at the Qt Resources System

      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
      • L Offline
        L Offline
        logithack
        wrote on last edited by
        #3

        Thanks for your reply. I've just had a look at the link and now I see how relative file paths are handled in Qt.

        The situation is as follows: I'd like to create a .ui file with Qt Designer which I can later use as the UI of a Python program. Now, I'm struggling with the creation of the resources file. I've got Qt Designer open now and I can see the actions editor in the bottom right corner and the "resources" tab right next to it. However, if I click on "resources", I can only select an existing resource file but not create a new one.

        Any ideas?

        Kind regards,

        logithack

        jsulmJ 1 Reply Last reply
        0
        • L logithack

          Thanks for your reply. I've just had a look at the link and now I see how relative file paths are handled in Qt.

          The situation is as follows: I'd like to create a .ui file with Qt Designer which I can later use as the UI of a Python program. Now, I'm struggling with the creation of the resources file. I've got Qt Designer open now and I can see the actions editor in the bottom right corner and the "resources" tab right next to it. However, if I click on "resources", I can only select an existing resource file but not create a new one.

          Any ideas?

          Kind regards,

          logithack

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

          @logithack "File/New File or Project/Files and Classes/Qt/Qt Ressource File"

          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