<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
Hello all,<br>
<br>
What am I doing wrong below? If I comment out the setStyleSheet call
, and enable the palette changes, the background remains the default
white. The problem with using the setStyleSheet call is that it
affects the scrollbars inside the QListView too, which is not what I
want.<br>
<br>
class ThumbnailView(QListView):<br>
def __init__(self):<br>
super(ThumbnailView, self).__init__(uniformItemSizes=True,
spacing=16)<br>
self.setViewMode(QListView.IconMode)<br>
# this next line works<br>
self.setStyleSheet("background-color:#444444")<br>
# these next three lines do not work when the lines are
uncommented:<br>
# palette = self.palette()<br>
# palette.setColor(self.backgroundRole(), QColor(68,68,68))<br>
# self.setPalette(palette)<br>
<br>
Best,<br>
Damon<br>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.damonlynch.net">http://www.damonlynch.net</a>
</pre>
</body>
</html>