PDA

View Full Version : How to change the scroll area range in QTableView?



josentop
28th April 2012, 07:43
Hi,
I need to add a guide widget into the QTableView as below picture, the guide widget always followed at the last row. It worked well if the vertical scrollbar not displayed. But if row number is big and cause the vertical scrollbar displayed, I didn't get the extra space to display the widget. How to get the extra space to display the widget in QTableView? thanks.
76417642

sedi
29th April 2012, 15:13
Just two random Ideas:
You could try to subclass the view and find something virtual in qtableview.h or qabstractitemview.h to hook in - and then find out which member element you have to increase in size.
A different approach could be to give your model a dummy row and make all but the last cells of it invisible. Perhaps with style sheets, may be it works.
As I have never non neither of both things, I can not give more details and I don't know if the ideas are usable at all - no guarantees, just some lines of thinking.