Qt-interest Archive, August 2007
Fixed (nonscrollable) columns in QAbstractItemView
Message 1 in thread
Hi.
It is possible to make part of columns not scrollable ? I have big table
with many columns and i want user can to see first (Name) column all time
and so i need fix this column in view. It is possible without full
reimplementation paint ?
Sergey Kondryukov
eskon2005@xxxxxxx
--
[ signature omitted ]
Message 2 in thread
Hi Sergey,
On Monday 13 August 2007, nntp.trolltech.com wrote:
> Hi.
> It is possible to make part of columns not scrollable ? I have big table
> with many columns and i want user can to see first (Name) column all
> time and so i need fix this column in view. It is possible without full
> reimplementation paint ?
I haven't tried this yet but I think that it would be possible and easier
to either use a proxy model or the hideColumn() method and filter/hide
columns 1-n depending on the slider position of the horizontal scrollbar
of the QTableView. This would make the following columns 'jump' back and
forth at certain slider positions but looking at Microsoft Excel or
OpenOffice Calc this seems to be common behavior. If you want soft
scrolling then I guess there's no way around reimplementing the paint
functions of the view.
Regards,
Bernd
--
[ signature omitted ]