I've also found frustration in QT not having a lot of specific methods for
setting colors. However, you can always overload the paintEvent and
repaint the entire widget, but then you have to repaint the entire widget
yourself, including the check.
I've found this tutorial fairly helpful whenever I go down the road of
painting: http://zetcode.com/tutorials/pyqt4/drawing/
def paintEvent(self, ev):
p = QtGui.QPainter(self)
if not p.isActive():
p.begin()
#do your painting here
ev.ignore()
On Wednesday, October 17, 2012 8:27:51 AM UTC+8, Geoff Harvey wrote:
>
> Y'all-
>
> Is there any way to change the base color of a checkbox on a
> TreeWidgetItem *without* having to redefine every little aspect of the
> QTreeWidget/QTreeView?
>
> I can change the color with a stylesheet doing something like this ...
>
> QTreeView::indicator {
> color: rgb(240, 240, 240)
> }
>
> ... but then I lose my checkbox icons.
>
> This makes me sad.
>
> Any ideas?
>
> Thanks!
>
> geoff
>
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe