polrus
27th November 2010, 22:02
Hello
I'm trying to use appendRow to create the following structure with 2 columns
Items in column called "group" can have children.
I can do it ok for "group" column - but i have troubles adding "cost" column values
|group | costs
------------------------------
Peter | 10
Family 1 | 55
--------John | 15
--------Jack | 20
--------Amie | 20
Paul | 15
I hope the structure is clear.
I don't have troubles adding the cost for "peter" nor Paul but I don't know how to add a second column value for the members of "Family 1"
when I have
QList<QStandardItem *> items;
items << costs_for_john_item;
john_item->appendColumn(items);
it creates another subrow for John and does not enter the second column at all.
by model.setData using row and column numbers I can't edit any value for members of Family 1 group howeveer it works for Peter, John and "family 1" and their costs.
any advices?
I'm trying to use appendRow to create the following structure with 2 columns
Items in column called "group" can have children.
I can do it ok for "group" column - but i have troubles adding "cost" column values
|group | costs
------------------------------
Peter | 10
Family 1 | 55
--------John | 15
--------Jack | 20
--------Amie | 20
Paul | 15
I hope the structure is clear.
I don't have troubles adding the cost for "peter" nor Paul but I don't know how to add a second column value for the members of "Family 1"
when I have
QList<QStandardItem *> items;
items << costs_for_john_item;
john_item->appendColumn(items);
it creates another subrow for John and does not enter the second column at all.
by model.setData using row and column numbers I can't edit any value for members of Family 1 group howeveer it works for Peter, John and "family 1" and their costs.
any advices?