[Qt-interest] Add margin around viewport of QListView

Jugdish jugdizh at gmail.com
Mon Nov 30 17:34:01 CET 2009


How do I add a margin outside the viewport scrollbars of a QListView?

I'm subclassing QListView and want to make an empty space below the bottom
scrollbar so that I can insert widgets down there (in other words, "extend"
the layout of QListView). I'll manually move the extra widgets into the
proper location within the resizeEvent, but first I need to "shift" the
bottom scrollbar up to make room for them. I tried a call to
QAbstractScrollArea::setViewportMargins(), but that created a margin
*inside* the scrollbars. Also QWidget::setContentsMargins() didn't appear to
have any effect.

Any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091130/a7dec60e/attachment.html 


More information about the Qt-interest-old mailing list