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. upload icon on button
Qt 6.11 is out! See what's new in the release blog

upload icon on button

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 1.1k 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.
  • A Offline
    A Offline
    amarism
    wrote on last edited by
    #1

    Initially, I have 10 buttons I want to add icons for every button. How could i do this?

    JonBJ 1 Reply Last reply
    0
    • A amarism

      Initially, I have 10 buttons I want to add icons for every button. How could i do this?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @amarism
      http://doc.qt.io/qt-5/qpushbutton.html#QPushButton-2 or http://doc.qt.io/qt-5/qabstractbutton.html#icon-prop.

      1 Reply Last reply
      3
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi
        You can do it in Designer also if you use UI files.

        A 1 Reply Last reply
        0
        • mrjjM mrjj

          Hi
          You can do it in Designer also if you use UI files.

          A Offline
          A Offline
          amarism
          wrote on last edited by
          #4

          @mrjj But, I want to set icon dynamically not the system dependent. If my UI file send to the other system then my icon will be so in the proper place

          mrjjM 1 Reply Last reply
          0
          • A amarism

            @mrjj But, I want to set icon dynamically not the system dependent. If my UI file send to the other system then my icon will be so in the proper place

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @amarism
            Hi
            If you use QResource to hold the icons and set in designer
            it will always work regardless of what pc it runs on.

            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