PDA

View Full Version : QTreeView: Holding a line on screen



gri
2nd August 2007, 09:13
Hello there,

I'm in need of a QTreeView which always shows the first line on the screen even if the user scrolls. This is needed to compare search results where the first line shows the searched item.

So my thoughts were:

Own QHeaderView derivate which contains a real QHeaderView and a QTreeView.
Two QTreeView where to top one has a QHeaderView and the bottom one none. Column sizings of the top one also have to be sent to the bottom one. (how?)
Subclassing QTreeView to do that where I have no idea how to do this.


Does anyone else have ideas for that?

Thanks,
gri

jpn
7th August 2007, 12:42
Two QTreeView where to top one has a QHeaderView and the bottom one none. Column sizings of the top one also have to be sent to the bottom one. (how?)


This one sounds easiest to me. Resizing and moving of sections should be only a matter of connecting a few QHeaderView signals and slots. :)