PDA

View Full Version : QTableView with pages



sysmaniac
4th November 2010, 17:40
Hello,

I am working on a Qt 4.6 touchscreen application using a model/view architecture and currently I use QTableView to visualize my data. However I need to have a view that doesn't use scrollbars (they are not that nice for a touchscreen) but rather breaks the data into pages and offers the possibility to flip through them. I also need to display the usual "page 1/42" string.

What's your recomendation on this? Is there a widget that I can use? Or do I need to subclass QTableView or perhaps use a ProxyModel?

Thanks in advance,
Sysmaniac

tbscope
4th November 2010, 18:11
Create a table view and two buttons (at the top or bottom). One button for going back, one for going forward.

In the table view, display only items on the screen. Get the table view size and calculate which items can be shown.
Then, using the back and forward buttons, update the view.

Well, that's the idea I would try (simply said though)