Hello. I have a problem with QTreeVew: standard implementation of QTreeView laying out elements in a tabular form and when i expand a branch, QTreeView draws expanded branch with spaces between elements.
I want get rid of the spaces between elements, but need elements to be separate items.
I tried to inherit from QTreeView and reimplement method QTreeView::drawRow(), where i calculate sizes for elements without spaces. But if i do so, i need to reimplement methods QTreeView::indexAt() and QTreeView::visualRect() and calculate sizes again in both methods. I can calculate sizes once and save them, but then i need to implement most of functionality of QTreeView myself, and it would be a better idea to inherit from QAbstractItemView, and that is realy inconvinient.
Is there an easier way to get what i need?