<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <font face="Courier New, Courier, monospace"><font color="#ffffff">Hello,<br>
        <br>
        It looks like the icon.source property of a QML Button is not
        working (PyQt 6.2.2). The referenced image is not shown. Example
        to reproduce:<br>
        <br>
        buttontest.py:<br>
        import sys<br>
        <br>
        from PyQt6.QtGui import QGuiApplication<br>
        from PyQt6.QtQml import QQmlApplicationEngine<br>
        <br>
        if __name__=="__main__":<br>
        <br>
        Â  app = QGuiApplication(sys.argv)<br>
        Â  engine = QQmlApplicationEngine()<br>
        Â  engine.quit.connect(app.quit)<br>
        Â  engine.load('buttontest.qml')<br>
        Â  <br>
        Â  sys.exit(app.exec())<br>
        <br>
        <br>
        buttontest.qml:<br>
        <span style="font-style: italic;">import</span> QtQuick
        <br>
        <span style="font-style: italic;">import</span> QtQuick.Controls
        2.15<br>
        <br>
        <span style="font-style: italic;">import</span>
        QtQuick.Controls.Material 2.15<br>
        <br>
        ApplicationWindow {<br>
        Â  visible: true<br>
        Â  width: 400<br>
        Â  height: 200<br>
        Â  title: "Button Test"<br>
        Â  Material.theme: Material.Dark<br>
        Â  color: "#111111"<br>
        <br>
        Â  ScreenA {<br>
        Â Â Â  id: <span style="font-style: italic;">screenA</span><br>
        Â  }<br>
        }<br>
        <br>
        ScreenA.qml:<br>
        <span style="font-style: italic;">import</span> QtQuick
        <span style="font-style: italic;">import</span> QtQuick.Controls
        2.15
        <span style="font-style: italic;">import</span>
        QtQuick.Controls.Material 2.15
        <br>
        Rectangle {<br>
        Â Â id: <span style="font-style: italic;">rectangle</span><br>
        Â Â width: 400<br>
        Â Â height: 200<br>
        Â Â color: "#000000"<br>
        Â Â border.color: "#000000"
        <br>
        <br>
        Â  Image {<br>
        Â  Â  id: <span style="font-style: italic;">btni<br>
          Â  Â </span> source: "./icon-arrow-down-red.png"<br>
        Â  }
        <br>
        Â  <br>
        Â  Button {<br>
        Â  Â  id: <span style="font-style: italic;">button</span><br>
        Â  Â  x: 200<br>
        Â  Â  y: 100<br>
        Â  Â  width: 48<br>
        Â  Â  height: 48<br>
        Â  Â  visible: true<br>
        Â  Â  display: Button.IconOnly<br>
        Â  Â  icon.source: "./icon-arrow-down-red.png"<br>
        Â  Â  icon.color: "transparent"<br>
        Â  Â  text: "Text"
        }
        <br>
        }
      </font><br>
      <br>
      The Image works well, the Button not.<br>
      <br>
      <br>
      Am I doing something wrong?<br>
      <br>
      <br>
      Â </font>
  </body>
</html>