PDA

View Full Version : QTableView and its Scrollbar question



MarkoSan
28th May 2008, 13:57
Hi to all!

I have subclassed QTableView and I use this class to show a kind of shopping cart. Now, the table view's apperaence was heavly customized, but when vertical and horizontal scroll bars appear, they are default. I need them to repaint with different color (palette) and to make them wider. What is the way of doing it? Is it possible to "install" subclassed QScrollBar into QTableView?

jpn
28th May 2008, 14:13
QTableView is a QAbstractScrollArea which has the methods you are looking for. But notice also style sheets...

MarkoSan
28th May 2008, 14:19
So, I must reimplement a whole new QAbstractScrollArea or what?

jpn
28th May 2008, 14:23
So, I must reimplement a whole new QAbstractScrollArea or what?
No, just look at those functions it offers:

QAbstractScrollArea::setHorizontalScrollBar()
QAbstractScrollArea::setVerticalScrollBar()