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. Qt can i set resources programatically?
Forum Updated to NodeBB v4.3 + New Features

Qt can i set resources programatically?

Scheduled Pinned Locked Moved General and Desktop
7 Posts 2 Posters 3.0k 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.
  • U Offline
    U Offline
    umen242
    wrote on last edited by
    #1

    in Qt c++ , is there any way to set resources programatically?
    i want to let the user to set the exe icon and his html file that will be loaded into the application(QtWebKit).
    so it will embedded in to the application that is currently are compiled using the resource Collection Files (.qrc)
    and for the exe icon im using rc file.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      AcerExtensa
      wrote on last edited by
      #2

      You can change window icon on the fly with "setWindowIcon":http://doc-snapshot.qt-project.org/4.8/qwidget.html#windowIcon-prop . Setting exe icon is very tricky.

      God is Real unless explicitly declared as Integer.

      1 Reply Last reply
      0
      • U Offline
        U Offline
        umen242
        wrote on last edited by
        #3

        well im looking for away to let the user to configure the app look and feel
        setWindowIcon , is ok but its be better somehow to make it embedded somehow to the app , not loaded in runtime.
        im sure there is way to do the icon thing , how does windows let you to set icon to exe ?

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

          Windows doesn't let you set icons for executables... Windows let you link icon with executable, or assign icon for a mime type. Icon is strictly compiled in binary file in TDATA section. You can edit it with programs like Restorator or you can do it by yourself programmatically, but it is really tricky...

          God is Real unless explicitly declared as Integer.

          1 Reply Last reply
          0
          • U Offline
            U Offline
            umen242
            wrote on last edited by
            #5

            is there some way ? to do this ? what is the tricky way you know ?

            1 Reply Last reply
            0
            • A Offline
              A Offline
              AcerExtensa
              wrote on last edited by
              #6

              Updating Resources MSDN -> http://msdn.microsoft.com/en-us/library/ms648008(v=vs.85).aspx#_win32_Updating_Resources
              P.S.: forum can't handle this link, so copy-paste it

              God is Real unless explicitly declared as Integer.

              1 Reply Last reply
              0
              • U Offline
                U Offline
                umen242
                wrote on last edited by
                #7

                Thanks i will try it , i hope it will work with Qt

                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