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

Qt Quick Controls 2 ActionGroup is not working

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.10.0 Beta 2
    • 5.10.0 Beta 1
    • Quick: Controls 2
    • None
    • KDE Neon 
    • cb0519724e3d937feaa506f0ed65769347ad9de0

    Description

      The ActionGroup items are not working as described in the documentation.

      The first example in the documentation gives the QML error "Cannot assign to non-existent property", the second one just doesn't toggle the actions when activated.

       

       

      import QtQuick 2.10
      import QtQuick.Controls 2.3
      import QtQuick.Layouts 1.3
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          title: qsTr("ActionTime")
      
      
          ActionGroup {
              id: alignmentGroup
      
              Action {
                  id: aLeft1
                  checked: true
                  checkable: true
                  text: qsTr("Left")
              }
      
              Action {
                  id: aCenter1
                  checkable: true
                  text: qsTr("Center")
              }
      
              Action {
                  id: aRight1
                  checkable: true
                  text: qsTr("Right")
              }
          }
      
          ActionGroup { id: alignmentGroup2 }
      
          Action {
              id: aLeft2
              checked: true
              checkable: true
              text: qsTr("Left")
              ActionGroup.group: alignmentGroup2
          }
      
          Action {
              id: aCenter2
              checkable: true
              text: qsTr("Center")
              ActionGroup.group: alignmentGroup2
          }
      
          Action {
              id: aRight2
              checkable: true
              text: qsTr("Right")
              ActionGroup.group: alignmentGroup2
          }
      
          ColumnLayout {
              anchors.centerIn: parent
              RowLayout {
                  Button { action: aLeft1      }
                  Button { action: aCenter1 }
                  Button { action: aRight1 }
              }
              RowLayout {
                  Button { action: aLeft2   }
                  Button { action: aCenter2 }
                  Button { action: aRight2 }
              }
          }
      
      }
      
      
       
      

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            pyrrhula Ola Røer Thorsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes