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

Black icon in Button

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.10.0, 5.10.1
    • Quick: Controls 2
    • None
    • Linux : KDE Neon (based on Ubuntu 16.04) , Ubuntu 18.04 Alpha

      Hello,

      With QtQuick.Controls 2.3

      When adding a png or svg icon in a Button, from a resource file as well as a path, only the black silhouette is visible. Using Action with a Button does the same. Adding the icon in an Image renders it well.

      See the attached files for a test project and a screenshot.

      import QtQuick.Controls 2.3
      
      ToolButton {
      height: 70
      width: 70
      action: action
      
      }
      Action {
      id: action
      icon {
      source: "qrc:/tabletconnected.svg"
      width: 100
      height: 100
      }
      
      
      }

       Thank you!

      Regards,

      Cyril Jacquet

        1. button_icon_bug.tar.gz
          5 kB
          Cyril Jacquet
        2. Screenshot_20180205_115934.png
          47 kB
          Cyril Jacquet
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            cyril31 Cyril Jacquet
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes