[Qt-interest] QSortFilterProxyModel doesn't update View
Nikolay Mikheev
el.vooft at gmail.com
Wed Aug 3 10:30:51 CEST 2011
Use property dynamicSortFilter:
http://doc.qt.nokia.com/4.7/qsortfilterproxymodel.html#dynamicSortFilter-prop
2011/8/3 NoRulez <norulez at me.com>:
> Hi,
>
>
>
> I use a QSortFilterProxyModel to sort/filter data from a view.
>
> However the QSortFilterProxyModel doesn’t update the the view.
>
>
>
> If I use the following code the view gets updated, but is there an other way
> to update the view?
>
>
>
> m_pFilterModel->setSourceModel(m_pFilterModel->sourceModel());
>
> m_pTableView->setModel(m_pFilterModel);
>
> m_pFilterModel->sort(m_pFilterModel->sortColumn(),
> m_pFilterModel->sortOrder());
>
>
>
> Best Regards
>
> NoRulez
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>
--
Best regards, Nikolay Mikheev
More information about the Qt-interest-old
mailing list