このページでは

RegExpFilter QML Type

SortFilterProxyModel 内のデータを、ロールの値と正規表現とを照合してフィルタリングします。詳細...

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

RoleFilter

Status: Technology preview

このタイプはテクノロジープレビュー段階であり、変更される可能性があります。

プロパティ

詳細な説明

RegExpFilter を使用すると、指定されたロールに対して正規表現によるマッチングを行い、モデルデータのフィルタリングを行うことができます。

JavaScript の正規表現リテラルを、regExp に直接割り当てることができます:

SortFilterProxyModel {
    sourceModel: processModel
    filters: RegExpFilter {
        roleName: "userId"
        regExp: /root/i
    }
}

プロパティのドキュメント

regExp : regexp

このプロパティには、データのフィルタリングに使用される正規表現が格納されます。JavaScript の正規表現リテラルを直接代入することができます。

regExp のパターンが空の場合、フィルタは非アクティブとなり、すべての行が通過します。

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