Convert Qcolor value to hex value

Posted by vettipayyan on Stack Overflow See other posts from Stack Overflow or by vettipayyan
Published on 2011-01-06T17:50:34Z Indexed on 2011/01/06 17:54 UTC
Read the original article Hit count: 226

Filed under:
|
|

I have implemented a Qcolor dialog box which opens on certain condition. To get the selected color after final selection i use the method selectedColor() which returns the value in QColor . When i print that value , it's like this :

<PyQt4.QtGui.QColor object at 0x01DD7880>

I want color value in hex value . like this : #DFDFDF (for grey ). If it's not hex , correct me.
Is there any function to convert that?
Any suggestions welcome .

© Stack Overflow or respective owner

Related posts about qt4

Related posts about hex