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

Make ButtonGroup.buttons property a default one, add examples, adjust docs

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P4: Low
    • None
    • 6.1.2
    • Quick: Controls 2
    • None
    • All

    Description

      As discussed at QTBUG-95944 and associated Gerrit change https://codereview.qt-project.org/c/qt/qtdeclarative/+/366399, it may be practical in some cases to define controls / buttons in a directly in a ButtonGroup, and later use its ::buttons list property as a children value for some layout etc.

      Therefore, defining buttons in a button group may and should be simplified by making group's buttons property a default one. It would also remove an extra level of indentation from user's code.

      Backward compatibility concern

      ButtonGroup inherits directly from a QtObject, not from an item, so it never had a default property by itself. However, if a user were to sub-type a ButtonGroup component with a custom default property (which can be declared with pure QML syntax), what would happen to their code?

      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