[PyQt] QtGui.QColor.fromRgb()

Aron Bierbaum aronbierbaum at gmail.com
Mon Feb 15 23:19:16 GMT 2010

I have attached a test that shows a possible regression in
QtGui.QColor.fromRgb() PyQt 4.7. In past releases we have been able to
get the color the grid lines in a table from the current style and
convert it to a QColor. For some reason PyQt raises a TypeError

Raw color: -2565928
Traceback (most recent call last):
  File "test_fromrgb.py", line 7, in <module>
    color = QtGui.QColor.fromRgb(raw_color)
TypeError: arguments did not match any overloaded call:
  QColor.fromRgb(int): argument 1 has unexpected type 'int'
  QColor.fromRgb(int, int, int, int alpha=255): not enough arguments

Is this a valid use of the method, and if so any ideas what is going wrong?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_fromrgb.py
Type: application/octet-stream
Size: 266 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100215/fe030635/attachment.obj>

More information about the PyQt mailing list