Subarray in array
-
Hi,
I have a QTableView which displays the content of a database.
There is information like product reference, quantity, ...Is it possible, when the user click on a row, to display a detailed subarray.
I want something like this :
I currently display two QTableview but it's not really ergonomic.
Thanks :)
-
Hi
It sort of remind me of
http://doc.qt.io/qt-5/qtwidgets-itemviews-editabletreemodel-example.htmlExcept you want for another col.
-
It might not be 100% what you want but KSelectionProxyModel from KDE API might be a good compromise
-
I looked at the KSelectionProxyModel but it seemed a bit hard for me ^^
I choose an other solution :
Because my tree widget is a two-level hierarchy, i can identify my top-level items because they have child.So i applied a stylesheet :
QString style = "QTreeWidget::item " "{ " "margin-bottom: 10px;" "}" "QTreeWidget::item:has-children " // Apply only on my top-level item "{" "border-top: 1px solid black;" "background-color: lightGray" "}";