What I have:
QTreeViewclass with table data- And connected
QAbstractTableModelmodel
Question: how to save expanded state of items? Is some one have finished solutions?
PS: I know, that I can do this code by myself, but I don’t have much time, and this is not the major problem of our project, but still we need it, because app contain a lot of such tables, and every time expanding tree items is annoyed process…
First, thanks to Razi for
persistentIndexListandisExpandedway.Second, here is the code which works for me just fine 🙂
dialog.h file:
dialog.cpp file:
Have a nice day!)
PS: this example based on
C:\Qt\4.6.3\examples\itemviews\simpletreemodelcode.