Nested QtableView
-
I have a QTableView that presents a table looking like this:
Everything is working great, but now I need to change the table to have nested cells. It needs to eventually look like this:
I thought about using a custom delegate inheriting from QStyledItemDelegate for the GW columns, and that delegate will be another QTableView or QTableWidget. It seems like a lot of work. Is there any easier approach to follow or is there any similar examples to have an idea ?
-
Hi,
Isn't that rather a tree view ?
-
The table will be empty and the user will fill in the different cells. First he will choose the associated function in the first column then he will apply each GW to the function chosen to have a deviation. Finally, the user will choose the number of TE for each deviation and will fill in each cell. It is well presented by a treeview, but a tableview is more convenient to get the user input.
-
From your description, I would say that a dedicated widget would yield better results rather than trying to squeeze everything inside a table.