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

MenuItem in QtQuick.Controls 2.3 show wrong checked state

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 5.11.0 RC 1, 5.11.0
    • Fix Version/s: 5.11.1
    • Component/s: Quick: Controls 2
    • Labels:
      None
    • Environment:
      Qt 5.11 rc1

      Windows 10

      msvc 2017 64bit

      Description

      MenuItem with checkable property set to true will always display as checked regardless the actual checked property.

       

      See the following code for the issue: (Material theme)

       

      import QtQuick 2.7
      import QtQuick.Controls 2.3
      
      ApplicationWindow {
          menuBar: MenuBar {
              Menu {
                  title: "Test"
                  MenuItem {
                      checkable: true
                      checked: false
                      text: "Simply Wrong"
                  }
              }
          }
      }

      It appears the CheckIndicator now using control.checkState property for testing whether it should display check mark, but unfortunately MenuItem does not have checkState property, thus the wrong appearance.

       

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            steve.k.chiu Steve K. Chiu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes