Open kastravec opened 5 years ago
This is the complete code.
SortFilterProxyModel {
id: proxyModel
sourceModel: IEXSymbolsModel
filters: [ AnyOf {
RegExpFilter {
roleName: "role1"
pattern: searchInputLabel.text
caseSensitivity: Qt.CaseInsensitive
}
RegExpFilter {
roleName: "role2"
pattern: searchInputLabel.text
caseSensitivity: Qt.CaseInsensitive
}
},
ValueFilter {
enabled: checkbox0.checked
roleName: "role3"
value: 1
},
ValueFilter {
enabled: checkbox1.checked
roleName: "role3"
value: 2
},
ValueFilter {
enabled: checkbox2.checked
roleName: "role3"
value: 3
},
ValueFilter {
enabled: checkbox3.checked
roleName: "role3"
value: 4
},
ValueFilter {
enabled: checkbox4.checked
roleName: "role4"
value: 5
}
]
}
Hello, What performance is not great? Are we only talking about filtering the data when a filter changes?
Can you try if 770789e improve your situation?
Do multiple filters change at once in your use case or are they only changed one by one in the ui?
When using it on a large model, let's say starting from 10k items and more then the performance is not great. If the number of items is larger then 20k then the problem becomes significantly noticeable.
Above is a snippet of how I'm using it. Great work and API overall.
Cheers, Petref