以下成员源于类 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 |
Use one of the other QColor constructors, or one of the static convenience functions, instead.
使用 getHsv () 代替。
另请参阅 setHsv ().
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);
使用 getRgb () 代替。