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

A way to reference a property from QML

    XMLWordPrintable

Details

    • All
    • 43e3c21a0bad9141b6c35cc4ee4a58b4d824462a

    Description

      In C++, we have QQmlProperty that is used in some APIs to reference a property, like in QQmlPropertyValueSource. I would very much like to be able to create properties of type QQmlProperty in C++, and bind a property to those instead of the value of that property. Currently, there are a couple of APIs in QML that split the object and the property, taking a the object as a QObject pointer (so, taking an id in QML) and a string for the name of the property (Binding for instance). I would like to be able to create APIs where that split is not needed, but the user could point to a a property directly. 

      I am not sure if that would/should have a special designation or marker to distinguish them from normal property references, something like using Qt.property(theId.property) or not. 

      The usecase are APIs like Binding. I am not a fan of splitting the target and the property, and less of taking the property as a string. 

       

       

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              andre André Somers
              Maurice Kalinowski Maurice Kalinowski
              Alex Blasche Alex Blasche
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes