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

Qt.labs.platform Menu does not show icons

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.2.5, 6.3.1, 6.4.0 Beta1
    • 6.2.4, 6.3.0
    • Quick: Controls 2
    • None
    • Windows 10
      macOS 12.3.1
    • All
    • fce525fc78 (qt/qtdeclarative/dev) fce525fc78 (qt/tqtc-qtdeclarative/dev) 3b1d3f2d41 (qt/qtdeclarative/6.3) 3b1d3f2d41 (qt/tqtc-qtdeclarative/6.3) 521fbbfd9e (qt/tqtc-qtdeclarative/6.2)

    Description

      Qt.labs.platform Menu does not show icons.

      import QtQuick
      import QtQuick.Window
      import Qt.labs.platform as Platform
      
      Window {
          visible: true
      
          Platform.Menu {
              id: menu
              Platform.MenuItem {
                  text: 'Smile!'
                  icon.source: 'qrc:/smile.png'
              }
          }
      
          TapHandler {
              acceptedButtons: Qt.RightButton
              onTapped: menu.open()
          }
      }
      

      Reproduced at least on Windows and macOS
      See full example in attachments.

      Steps to reproduce:
      1. Build and run attached project
      2. Right click in any place of Window
      3. Observe the menu

      Attachments

        1. reproducer.zip
          3 kB
          Vladimir Belyavsky

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              studiosus Vladimir Belyavsky
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes