Obsolete Members for QPalette

以下成員源於類 QPalette 已過時。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。

公共函數

(obsolete) QPalette (const QColor & windowText , const QColor & window , const QColor & light , const QColor & dark , const QColor & mid , const QColor & text , const QColor & base )
(obsolete) const QBrush & background () const
(obsolete) const QBrush & foreground () const
(obsolete) int serialNumber () const

成員函數文檔編製

QPalette:: QPalette (const QColor & windowText , const QColor & window , const QColor & light , const QColor & dark , const QColor & mid , const QColor & text , const QColor & base )

Constructs a palette with the specified windowText , window , light , dark , mid , text ,和 base colors. The button color will be set to the window color.

const QBrush &QPalette:: background () const

使用 window () 代替。

const QBrush &QPalette:: foreground () const

使用 windowText () 代替。

int QPalette:: serialNumber () const

返迴內容標識數對於此 QPalette 對象。截然不同的 QPalette objects can only have the same serial number if they refer to the same contents (but they don't have to). Also, the serial number of a QPalette may change during the lifetime of the object.

使用 cacheKey () 代替。

警告: The serial number doesn't necessarily change when the palette is altered. This means that it may be dangerous to use it as a cache key.

另請參閱 operator== ().