Treemodel and Treeview
-
Hello, I have a treemodel created according to certain rules according to the data I received from the Db.
This treemodel is available in the photo.
However, this is not exactly the look I want. In TreeView, children open vertically, but I want them to open horizontally like this photo.
I was told that for this I need to create my own view using QAbstractItemView.
But I have no idea what exactly I should do from this base class. Can you give any examples, advice, etc.? -
Hi,
From this base class you need to implement the painting of the model data as well as the interactions with the mouse.
For custom painting you have an example linked in the details of the QAbstractItemView class.
-
@Nevez In the link provided by @SGaist there is a link to an example application: https://doc.qt.io/qt-6/qtwidgets-itemviews-chart-example.html