ItemDelegate QML Type
An item delegate. More...
Import Statement: | import Qt.labs.controls 1.0 |
Inherits: |
Detailed Description
ItemDelegate presents a standard view item. It can be used as a delegate in various views and controls, such as ListView and ComboBox.
ItemDelegate inherits its API from AbstractButton. For instance, you can set text, make items checkable, and react to clicks using the AbstractButton API.
ListView { width: 160 height: 240 model: Qt.fontFamilies() delegate: ItemDelegate { text: modelData width: parent.width onClicked: console.log("clicked:", modelData) } ScrollIndicator.vertical: ScrollIndicator { } }
Note: Types in the Qt.labs module are not guaranteed to remain compatible in future versions.
See also Customizing ItemDelegate.
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/archives/qt-5.6/qml-qt-labs-controls-itemdelegate.html