[PyKDE] QScrollBar, fixed width

Patrick Stinson patrickkidd at gmail.com
Thu Mar 2 19:18:13 GMT 2006


I am trying to set the width of a vertical scrollbar (or any for that
matter) of a QScrollArea. I use PyQt4, kde-3.5.1, and the default plastic
syle. The size prints 50 for each scrollbar, but the width does not change.
Ideas? thanks in advance.

from PyQt4.QtGui import *
from PyQt4.QtCore import *

a = QApplication([])
scroll = QScrollArea()
w = QWidget()
w.setFixedSize(2000,2000)
scroll.setWidget(w)

bar = scroll.verticalScrollBar()
bar.setFixedWidth(50)
print bar.width()

bar = scroll.horizontalScrollBar()
bar.setFixedWidth(50)
print bar.width()

scroll.show()
a.exec_()


--
Patrick Kidd Stinson
http://pkaudio.sourceforge.net/
http://pksampler.sourceforge.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20060302/bde45e4a/attachment.html


More information about the PyQt mailing list