在本页

Sorter QML Type

提供分拣机通用功能的抽象基本类型。更多

Import Statement: import QtQml.Models
Since: Qt 6.10
Inherits:

QtObject

Inherited By:

FunctionSorter, RoleSorter, and StringSorter

Status: Preliminary

此类型正在开发中,可能会有更改。

属性

详细说明

Sorter 为其继承的所有分拣机提供了一组通用属性。

属性文档

column : int

此属性包含应用此分拣机的列。

默认值是0

enabled : bool

该属性可使SortFilterProxyModel 在对模型数据进行排序时考虑该分拣器。

默认值为true

priority : int

该属性表示与其他分拣机相比,该分拣机的优先级。数值越小,优先级越高,数值越大,优先级越低。

默认值为-1

sortOrder : Qt::SortOrder

该属性用于保存SortFilterProxyModel 在对模型数据排序时使用的顺序。

默认值为Qt::AscendingOrder

© 2026 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.