[Qt-interest] QTreeView custom sorted columns
Robert Reif
reif at earthlink.net
Wed Nov 25 19:56:49 CET 2009
Robert Reif wrote:
> Robert Reif wrote:
>
>> I'm new to QT and am trying to modify an existing application (cppcheck
>> gui) to sort the QTreeView column containing line numbers (2) properly.
>>
>> I'm doing this using a QSortFilterProxyModel with an overridden
>> lessThan. The sorting woks but I get the following error repeated many
>> times when running it:
>>
>> QSortFilterProxyModel: index from wrong model passed to mapToSource
>>
>>
> Here is a link to the cppcheck ticket with more info:
>
> https://sourceforge.net/apps/trac/cppcheck/ticket/1006
>
>
Here is the line of code that generates the error message:
setRowHidden(parent->rowCount() - 1, parent->index(), hide);
This is right after this line:
parent->appendRow(list);
where a new row is added to the tree view.
Does anyone have any ideas where to go from here?
More information about the Qt-interest-old
mailing list