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. Setting On Off QIcons in Designer doesn't work
Qt 6.11 is out! See what's new in the release blog

Setting On Off QIcons in Designer doesn't work

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 727 Views
  • 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.
  • InTheBeningingI Offline
    InTheBeningingI Offline
    InTheBeninging
    wrote on last edited by InTheBeninging
    #1

    So I want a PushButton to show distinct QIcons depending on the Checkstate.
    qicon_doesnt_work.png
    When I preview my Widgets UI it does work, but when i build and open the whole application the buttons icon wont change as intended and stays the same, although you can clearly see the QPushButton changing its state. Where am I wrong, is this a bug? Using QtCreator 14.0.1 and Qt 5.15 MSVC 2019 64Bit. Already tried deleting the build folder for a clean rebuild.

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      What style do you use in your application?

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      InTheBeningingI 1 Reply Last reply
      0
      • InTheBeningingI Offline
        InTheBeningingI Offline
        InTheBeninging
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • Christian EhrlicherC Christian Ehrlicher

          What style do you use in your application?

          InTheBeningingI Offline
          InTheBeningingI Offline
          InTheBeninging
          wrote on last edited by
          #4

          @Christian-Ehrlicher

              // Set the dark style
              a.setStyle(QStyleFactory::create("Fusion"));
          
          1 Reply Last reply
          0
          • Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Try with 'windows' style to see if it makes a difference.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            InTheBeningingI 1 Reply Last reply
            0
            • Christian EhrlicherC Christian Ehrlicher

              Try with 'windows' style to see if it makes a difference.

              InTheBeningingI Offline
              InTheBeningingI Offline
              InTheBeninging
              wrote on last edited by
              #6

              @Christian-Ehrlicher It works with Windows style and with no style specified/default.How do i get it to work with fusion?

              Christian EhrlicherC 1 Reply Last reply
              0
              • InTheBeningingI InTheBeninging

                @Christian-Ehrlicher It works with Windows style and with no style specified/default.How do i get it to work with fusion?

                Christian EhrlicherC Offline
                Christian EhrlicherC Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @InTheBeninging said in Setting On Off QIcons in Designer doesn't work:

                How do i get it to work with fusion?

                Fix the fusion style.

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                1 Reply Last reply
                0
                • InTheBeningingI InTheBeninging has marked this topic as solved on

                • Login

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