Compatibility Members for QWSServer

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

公共函数

QWSServer (int flags , QObject * parent , const char * name )

静态公共成员

void setDesktopBackground (const QImage & image )
void setDesktopBackground (const QColor & color )

成员函数文档编制

QWSServer:: QWSServer ( int flags , QObject * parent , const char * name )

Use the two-argument overload and call the QObject::setObjectName () 函数代替。

[static] void QWSServer:: setDesktopBackground (const QImage & image )

Sets the image used as background in the absence of obscuring windows, to be the given image .

使用 setBackground () 函数代替。

例如,若有代码像

QImage image;
setDesktopBackground(image);
					

可以把它重写成

QImage image;
setBackground(QBrush(image));
					

[static] void QWSServer:: setDesktopBackground (const QColor & color )

这是重载函数。

Sets the color used as background in the absence of obscuring windows, to be the given color .

使用 setBackground () 函数代替。

例如,若有代码像

QColor color;
setDesktopBackground(color);
					

可以把它重写成

QColor color;
setBackground(QBrush(color));