[Qt-interest] Changing color of brush fails
Ole Streicher
ole-usenet-spam at gmx.net
Tue Oct 13 12:18:29 CEST 2009
Hi,
I want to change the color of a brush with color.setRed() & Co (sorry
for Python code):
---------------------8<-----------------------
from PyQt4 import QtGui
app = QtGui.QApplication([])
color = QtGui.QColor('red')
color.setRed(11)
print color.red()
brush = QtGui.QBrush(QtGui.QColor('red'))
brush.color().setRed(11)
print brush.color().red()
---------------------8<-----------------------
The first one (using color directly) gives the expected '11'. The second
one (using the color from the brush) still gives '255' on Qt-4.5.2. On
Qt-4.5.0 I get the expected '11'.
What was changed here and why can't I set the red color of a brush
directly?
Best regards
Ole
More information about the Qt-interest-old
mailing list