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

[Qt6] Allow inherited properties to be made private/required/readonly

    XMLWordPrintable

Details

    Description

      Possible Syntax
      component BlueCircle: Rectangle{
       required radius
       private height: 2*radius
       private width: 2*radius
       readonly color: "blue" 
      }
      
      BlueCircle{
       anchors.centerIn: parent
       radius: parent.height/5
      }
      

      This will provide better encapsulation. Changing the access level of inherited members in a derived class is also supported in C++.

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            adrian.gabureanu Adrian Gabureanu
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes