In questa pagina

RegExpFilter QML Type

Filtra i dati in un " SortFilterProxyModel " confrontando il valore di un ruolo con un'espressione regolare. Altro...

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

RoleFilter

Status: Technology preview

Questo tipo è in anteprima tecnologica ed è soggetto a modifiche.

Proprietà

Descrizione dettagliata

RegExpFilter consente di filtrare i dati del modello utilizzando la corrispondenza con espressioni regolari su un ruolo specificato.

È possibile assegnare direttamente un'espressione regolare letterale JavaScript a un regExp:

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

Documentazione delle proprietà

regExp : regexp

Questa proprietà contiene l'espressione regolare utilizzata per filtrare i dati. È possibile assegnare direttamente un letterale di espressione regolare JavaScript.

Quando regExp ha un pattern vuoto, il filtro è inattivo e tutte le righe vengono fatte passare.

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