[Qt-interest] Question about custom view (or custom delegate)
Linos
info at linos.es
Mon Sep 21 21:00:55 CEST 2009
Hello,
I need to create an editor table and i would like to hear your suggestions
because i am not sure what could be the best method to get it done.
I have an sql model with a QTableView that i have to maintain like an alternate
method to input data to the database so i will make the model for the new view a
QAbstractProxyModel subclass so the two views get updated with the model, i have
done this before without problem but never i needed a view like that.
Original SQL Model has this columns.
barcode | supplier code | description | size | units | price | total | date
And i need to get an editor like this:
Qt Code:
barcode | supplier code | description | price | total price
15831500 090123-543 blue t-shirt 25$ 275$
| Date | XXL | XL | L | M | S | TOTAL
2009-11-15 1 1 2 2 1 7
| Date | XXL | XL | L | M | S | TOTAL
2009-12-01 0 2 1 1 0 4
It seems like a QTreeView but the columns of parent and children are not in
sync, and the children of other root items will not have the same number of size
columns, i have thought make it a big column and add the headers in the cell
with delegate paint method but then to me it does not seems like a treeview no
more. I am sure will be much better ways to do that, any ideas please?
Regards,
Miguel Angel.
More information about the Qt-interest-old
mailing list