I have a problem with the QTreeView horizontal scrollbar, it does not appear. I set the horizontal scroll policy in ScrollBarAsNeeded, but it does not appear if necessary. We tried to connect extended and flattened signals to the slot:
connect(this, SIGNAL(expanded(QModelIndex)), this, SLOT(update_scroll_area(QModelIndex))); connect(this, SIGNAL(collapsed(QModelIndex)), this, SLOT(update_scroll_area(QModelIndex)));
The slot consists of one line of code:
update_scroll_area(const QModelIndex& i) { resizeColumnToContents(i.column()); }
This does the work of the scrollbar, but only when I expand / collapse the elements of the tree.
I need to have a horizontal βevery timeβ scrollbar, from application to end. How can this be organized?
Thanks.
Dehumanizer
source share