委托控件
Qt Quick Controls 提供了一系列在视图中用作委托的控件。
带有可打开或关闭的复选指示器的项目委托 | |
可在各种视图和控件中使用的基本项目委托 | |
专属项目委托,带有可打开或关闭的单选指示器 | |
可轻扫的项目委托 | |
带有可打开或关闭的开关指示器的项目委托 | |
可分配给 TableView 的委托 | |
可分配给树形视图的委托 |
每种委托都有其特定的目标用例。以下各节提供了根据用例选择适当委托类型的指南。
复选委托控件
CheckDelegate 提供一个可切换为打开(选中)或关闭(取消选中)的可选控件。复选委托通常用于从一组选项中选择一个或多个选项。
另请参阅 复选框控件。
项目委托控件
ItemDelegate 呈现一个可复选的控件,用户可按下或点击该控件。
单选委托控件
RadioDelegate 单选委托控件是一种可切换为打开(选中)或关闭(取消选中)的可选控件。单选委托通常用于从一组选项中选择一个选项。
另请参阅 RadioButton 控件。
轻扫委托控件
SwipeDelegate 呈现一个视图项目,可向左或向右轻扫,以显示更多选项或信息。
切换委托控件
SwitchDelegate 显示可切换的委托,可以打开或关闭。
另请参阅 Switch Control。
TableViewDelegate 控件
TableViewDelegate 是可分配给TableView 的delegate 属性的委托。
另请参阅 TableView
树视图委托控件
TreeViewDelegate 是可分配给TreeView 的 delegate 属性的委托。
另请参阅 TreeView 。
相关信息
© 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.