PDA

View Full Version : QScrollBar's background and or its margin render problem!



srazi
18th July 2011, 20:39
Please see the attached photo! (OS: Ubuntu-11.04 with Radiance Theme)
How can I update that part of QScrollBar when scrolling? I mean some codes like followng code that I use for QTableWidget::viewport().



//updating table's viewport
connect(table->verticalScrollBar(), SIGNAL(valueChanged(int)), table->viewport(), SLOT(update()));
connect(table->horizontalScrollBar(), SIGNAL(valueChanged(int)), table->viewport(), SLOT(update()));

and it works good.
There is a way for set that margin to zero pixel?(The QtCreator's scrollbars have zero margins!)

high_flyer
20th July 2011, 09:02
How can I update that part of QScrollBar when scrolling?
Just like the docs say:

Use viewport->update() to update the contents of the viewport instead of update() as all painting operations take place on the viewport.
Which is just the same as the code example you posted.
Doesn't it work?

There is a way for set that margin to zero pixel?
Did you try setViewportMargins()?