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

Enable required keyword for alias properies

    XMLWordPrintable

    Details

      Description

      It would be nice to be able to mark an alias property as required:

      // MyComponent.qml
      Item {
        required property alias displayText: textBox.text
        Text {
          id: textBox
        }
      }
      

      An alternative would be to mark the inner property required. But having it on the alias allows us to:

      • Only require it for the aliased property
      • Have the API documented at the top of the component, so that users don't need to also look at the aliased property to know that it is required

        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:
            mmi_puya Puya Daravi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes