I want to create a QColor,I find that QColorcan be created by
QColor(int r,
int g,
int b,
int a
=255)
QColor(int r,int g,int b,int a=255)
To copy to clipboard, switch view to plain text mode
or by
QColor(QRgb color)
To copy to clipboard, switch view to plain text mode
,Now I have two questions:
1.if the value of r,g,b is between 0 and 1,how to convert to int? because
QColor(int r,
int g,
int b,
int a
=255)
QColor(int r,int g,int b,int a=255)
To copy to clipboard, switch view to plain text mode
need int parameter?
2.If I use
QColor(QRgb color)
To copy to clipboard, switch view to plain text mode
to create a color,how to convert (0,1) to tpye QRgb?
Thk u.
Bookmarks