StringSorter QML Type
SortFilterProxyModel 内のデータを、ロケールの順序に基づいて並べ替えます。詳細...
| Import Statement: | import QtQml.Models |
| Since: | Qt 6.10 |
| Inherits: | |
| Status: | Technology preview |
この機能はテクノロジープレビュー段階にあり、変更される可能性があります。
プロパティ
- caseSensitivity : Qt::CaseSensitivity
- ignorePunctuation : bool
- locale : Locale
- numericMode : bool
詳細な説明
StringSorter を使用すると、ソースモデルで設定されたロール名に基づいてデータをソートすることができます。StringSorter は、ローカライズされた照合順序アルゴリズムに従って文字列を比較します。
StringSorterは、以下のようにソートフィルタープロキシモデルで設定できます。
SortFilterProxyModel {
sourceModel: model
sorters: [
StringSorter { roleName: "name" }
]
}プロパティのドキュメント
caseSensitivity : Qt::CaseSensitivity
このプロパティは、ソーターの大文字と小文字の区別設定を保持します。
デフォルト値はQt::CaseSensitive です。
ignorePunctuation : bool
このプロパティは、ソーターが句読点を無視するかどうかを指定します。ignorePunctuation がtrue の場合、ソート順を決定する際に句読点や記号は無視されます。
デフォルト値は `false` です。
locale : Locale
このプロパティは、ソーターのロケールを保持します。
デフォルト値はQLocale::system()です。
numericMode : bool
このプロパティは、ソーターの数値モードが有効になっているかどうかを指定します。
デフォルト値はfalse です。
© 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.