DelegateChoice QML Type

Encapsulates a delegate and when to use it. More...

Import Statement: import QtQml.Models
Since: Qt 6.9

Properties

Detailed Description

The DelegateChoice type wraps a delegate and defines the circumstances in which it should be chosen.

DelegateChoices can be nested inside a DelegateChooser.

See also DelegateChooser.

Property Documentation

column : int

This property holds the value used to match the column value of model elements.


delegate : Component

This property holds the delegate to use if this choice matches the model item.


index : int

This property holds the value used to match the index value of model elements. This is effectively an alias for row.

See also row.


roleValue : variant

This property holds the value used to match the role data for the role provided by DelegateChooser::role.


row : int

This property holds the value used to match the row value of model elements. With models that have only the index property (and thus only one column), this property should be intended as an index, and set to the desired index value.

Note: Setting both row and index has undefined behavior. The two are equivalent and only one should be used.

See also index.


© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.