[Qt-interest] Problems with Proxy Models to reorder columns

NoRulez norulez at me.com
Fri Apr 1 23:50:43 CEST 2011


Hi,

my source model is a QRelationalTabelModel which gives me the columns in the order in which I created those in the database.

Now I my table view i need the columns reorderd. So, I tried to move the sections from the header view, but I thought it would be easier to use a proxy model.

I inherited from the QAbstractProxyModel and map my columns.

The result is the same as when I would use the QRelationalTabelModel directly.

So, what could be wrong? Or did I misunderstood the approach of a proxy model?

Here is an example of what I want to do:

Source: a, b, c, d, e
Result: d, e, a, c, b


Thanks in advance

Best regards
NoRulez



More information about the Qt-interest-old mailing list