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

ListView.onAdd and onRemove attached signals are not emitted for Menu delegates

    XMLWordPrintable

Details

    • All

    Description

      For example, in this code items would never be added to or removed from a size group:

      import QtQuick 2.15
      import QtQuick.Controls 2.15
      import QtQuick.Templates 2.15 as T
      import org.kde.kirigami 2.20 as Kirigami
      
      T.Menu {
          id: control
      
          Kirigami.SizeGroup {
              id: sizeGroup
              mode: Kirigami.SizeGroup.Width
          }
          delegate: MenuItem {
              ListView.onAdd: {
                  sizeGroup.items.append(this)
              }
              ListView.onRemove: {
                  sizeGroup.items.remove(this)
              }
          }
      
          contentItem: ListView {
              model: control.contentModel
          }
      }
      

      This is a stripped snippet from qqc2-desktop-style.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            ratijas ivan tkachenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes