Solved Attached Properties
-
Hi, everybody!
Can you explain me difference between attached properties and usual properties, please? How I understood, the attached properties are necessary for use in delegates.
Thank you in advance! -
Hi,
From the documentation:
Attached properties and attached signal handlers are mechanisms that enable objects to be annotated with extra properties or signal handlers that are otherwise unavailable to the object. In particular, they allow objects to access properties or signals that are specifically relevant to the individual object.
These are extra properties provided by specific objects to specific instances of other objects. In the example, the instance of a delegate can access the ListView.isCurrentItem property.
-
Creating attached properties possible only in .cpp?
-
@magrif AFAIK yes. See Qt's documentation about that subject.