Re: [Interest] Why doesn't my model filter update?

2020-02-19 Thread Matthew Woehlke
On 18/02/2020 18.38, Sze Howe Koh wrote: > The last valid row index is (rows-1), not (rows). Right  > Do I get the other half-cookie? Sure →  -- Matthew ___ Interest mailing list Interest@qt-project.org

Re: [Interest] Why doesn't my model filter update?

2020-02-19 Thread Florian Bruhin
On Tue, Feb 18, 2020 at 04:49:57PM -0500, Matthew Woehlke wrote: > On 18/02/2020 16.31, Konstantin Shegunov wrote: > > On Tue, Feb 18, 2020 at 11:20 PM Matthew Woehlke wrote: > >> I wonder if anyone else can spot it? ;-) > > > > Without knowing anything about the code at all, my best guess based

Re: [Interest] Why doesn't my model filter update?

2020-02-18 Thread Sze Howe Koh
On Wed, 19 Feb 2020 at 05:51, Matthew Woehlke wrote: > > On 18/02/2020 16.31, Konstantin Shegunov wrote: > > On Tue, Feb 18, 2020 at 11:20 PM Matthew Woehlke wrote: > >> I wonder if anyone else can spot it? ;-) > > > > Without knowing anything about the code at all, my best guess based on a > >

Re: [Interest] Why doesn't my model filter update?

2020-02-18 Thread Matthew Woehlke
On 18/02/2020 16.31, Konstantin Shegunov wrote: > On Tue, Feb 18, 2020 at 11:20 PM Matthew Woehlke wrote: >> I wonder if anyone else can spot it? ;-) > > Without knowing anything about the code at all, my best guess based on a > very quick glance would be the range for the dataChanged is wrong.

Re: [Interest] Why doesn't my model filter update?

2020-02-18 Thread Konstantin Shegunov
On Tue, Feb 18, 2020 at 11:20 PM Matthew Woehlke wrote: > On 18/02/2020 15.35, Matthew Woehlke wrote: > I wonder if anyone else can spot it? ;-) > Without knowing anything about the code at all, my best guess based on a very quick glance would be the range for the dataChanged is wrong.

Re: [Interest] Why doesn't my model filter update?

2020-02-18 Thread Matthew Woehlke
On 18/02/2020 16.16, Marian Beermann wrote: > Are you emitting dataChanged for the relevant roles? A Qt view would > not, generally, care about data changes for user-defined roles, for example. "The filter *does* have filterRole set correctly". That wasn't the problem. -- Matthew

Re: [Interest] Why doesn't my model filter update?

2020-02-18 Thread Matthew Woehlke
On 18/02/2020 15.35, Matthew Woehlke wrote: > I have a QAbstractItemModel. I also have a QSortFilterProxyModel acting > as a filter for the model, which in turn is used to feed a QTreeView. > The filter accepts or rejects rows based on a custom data role of the > source model. > > However, when

Re: [Interest] Why doesn't my model filter update?

2020-02-18 Thread Marian Beermann
Are you emitting dataChanged for the relevant roles? A Qt view would not, generally, care about data changes for user-defined roles, for example. -Marian ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest

[Interest] Why doesn't my model filter update?

2020-02-18 Thread Matthew Woehlke
I have a QAbstractItemModel. I also have a QSortFilterProxyModel acting as a filter for the model, which in turn is used to feed a QTreeView. The filter accepts or rejects rows based on a custom data role of the source model. However, when the source model's data changes, the tree view does not