Compatibility Members for QColor

以下成员源于类 QColor are part of the Qt compatibility layer. We advise against using them in new code.

公共函数

QColor (int x , int y , int z , Spec colorSpec )
void hsv (int * h , int * s , int * v ) const
uint pixel (int screen = -1) const
void rgb (int * r , int * g , int * b ) const

成员函数文档编制

QColor:: QColor ( int x , int y , int z , Spec colorSpec )

Use one of the other QColor constructors, or one of the static convenience functions, instead.

void QColor:: hsv ( int * h , int * s , int * v ) const

使用 getHsv () 代替。

另请参阅 setHsv ().

uint QColor:: pixel ( int screen = -1) const

Returns the pixel value used by the underlying window system to refer to a color.

使用 QColormap::pixel () 代替。

例如,若有代码像

QColor myColor;
uint pixel = myColor.pixel(screen);
					

可以把它重写成

QColormap cmap = QColormap::instance(screen);
uint pixel  = cmap.pixel(*this);
					

void QColor:: rgb ( int * r , int * g , int * b ) const

使用 getRgb () 代替。