Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-60528

Changing IconImage's iconColor also affects its size

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 5.10.0 Alpha
    • 5.10
    • Quick: Controls 2
    • None
    • ea381fba363fcf9b9ef463f24eb90c5e5517fd01

      Can be seen by running the following code and switching between enabled and disabled:

      import QtQuick 2.9
      import QtQuick.Controls 2.3
      import QtQuick.Controls.impl 2.3
      
      ApplicationWindow {
          id: window
          width: 300
          height: 100
          visible: true
      
          Row {
              anchors.fill: parent
              anchors.margins: 8
              spacing: 20
      
              Switch {
                  id: enabledSwitch
                  text: "Enabled"
                  checked: true
              }
      
              IconImage {
                  color: enabledSwitch.checked ? "transparent" : "grey"
                  source: "qrc:/wifi.png"
                  sourceSize: Qt.size(20, 20)
                  onWidthChanged: print(width)
              }
          }
      }
      

        For Gerrit Dashboard: QTBUG-60528
        # Subject Branch Project Status CR V

            mitch_curtis Mitch Curtis
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes