DelegateChoice QML 类型

封装委托及何时使用它。 更多...

import 语句: import Qt.labs.qmlmodels 1.0

特性

详细描述

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

DelegateChoices can be nested inside a DelegateChooser .

另请参阅 DelegateChooser .

特性文档编制

column : index

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 : index

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

另请参阅 row .

roleValue : string

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

row : index

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.

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

另请参阅 index .