ItemDelegate QML Type
다양한 보기 및 컨트롤에서 사용할 수 있는 기본 항목 델리게이트입니다. 더 보기...
Import Statement: | import QtQuick.Controls |
Inherits: | |
Inherited By: | CheckDelegate, RadioDelegate, SwipeDelegate, SwitchDelegate, and TreeViewDelegate |
속성
- highlighted : bool
상세 설명
ItemDelegate는 표준 뷰 항목을 제공합니다. ListView 및 ComboBox 과 같은 다양한 뷰 및 컨트롤에서 델리게이트로 사용할 수 있습니다.
ItemDelegate는 AbstractButton 에서 API를 상속받습니다. 예를 들어 text 를 설정하여 아이콘을 표시하고 AbstractButton API를 사용하여 clicks 에 반응할 수 있습니다.
ListView { id: listView width: 160 height: 240 model: Qt.fontFamilies() delegate: ItemDelegate { text: modelData width: listView.width onClicked: console.log("clicked:", modelData) required property string modelData } ScrollIndicator.vertical: ScrollIndicator { } }
ItemDelegate 및 델리게이트 컨트롤사용자 지정하기를참조하세요 .
속성 문서
highlighted : bool |
이 프로퍼티는 델리게이트가 강조 표시되는지 여부를 저장합니다.
델리게이트는 사용자의 주의를 끌기 위해 강조 표시될 수 있습니다. 키보드 상호작용에는 영향을 미치지 않습니다. 예를 들어 다음 코드를 사용하여 ListView 에서 현재 항목을 강조 표시할 수 있습니다:
ListView { id: listView model: 10 delegate: ItemDelegate { text: index highlighted: ListView.isCurrentItem required property int index onClicked: listView.currentIndex = index } }
기본값은 false
입니다.
© 2025 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.