PDA

View Full Version : Qcolor as Hex format ?



augusbas
27th January 2011, 04:17
Hi all,

I need to pass the color value in hex format as (0XAARRGGBB) to my function.

Qcolor.name provides the result as #RRGGBB format as string value

Is there any way, i will get a hex format 0xAARRGGBB with Qcolor.


Regards,
Augus.

Ginsengelf
27th January 2011, 06:57
Hi, you can use QColor::rgba() and convert the QRgb to a string.

Ginsengelf

vheinitz
23rd November 2012, 22:06
Use QColor::name (). s. docu :-)