Signal for expanding item in QTreeView
I want to get a signal for clicking on the "+" Button (so when it expands)
The background is: I have a filetree with only the directories with a fixed width
model.setFilter(QDir::Dirs | QDir::NoDotAndDotDot | QDir::Hidden);
model.setFilter(QDir::Dirs | QDir::NoDotAndDotDot);
dirtree = new QTreeView(this);
When I got deeper and deeper in a tree, the widht of 200px is too low, so I need a horizontal scroll bar at the bottom. I can do that with resizeColumnToContents(0); but I have to find out, when the user expand one of the directories. Can anybody help me?
Just take a look into the "documentation":http://qt-project.org/doc/qt-4.8/qtreeview.html#expanded.
[quote author="sierdzio" date="1362393335"]Just take a look into the "documentation":http://qt-project.org/doc/qt-4.8/qtreeview.html#expanded.[/quote]
Thank you... I tried it before asking and now, it seems to work :)
Strange... seems to be a mistake on my side :)
No worries. Good to hear it works now.