[solved]ProxyModel not working

  • I've inherited QSortFilterProxyModel creating class MyProxyModel
    in this class I rewrite data() method to show something different on column 4.
    MyProxyModel *pmod = new MyProxyModel(this);

    I don't know why those printf have different outputs:
    the first uses the real data in the underlying model
    the second shows the data I want

    (ui->tblOre->model()==pmod) returns true

    obviusly the problem is that when I use the view to show data, in the column I need to show particular data, real data is shown.

  • Well, can you paste your implementation of data()?

  • solved by myself...
    the problem was that I've omitted the const in the data() function signature, so superclass method was called.
    thanks anyway

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.