[Qt-interest] QSortFilterProxyModel doesn't update View

Stephen Kelly steveire at gmail.com
Wed Aug 3 10:26:07 CEST 2011


NoRulez wrote:

> 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

Maybe your model is not emitting the right signals.





More information about the Qt-interest-old mailing list