Obsolete Members for QColorDialog

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

靜態公共成員

(obsolete) QRgb getRgba (QRgb initial = 0xffffffff, bool * ok = Q_NULLPTR, QWidget * parent = Q_NULLPTR)

成員函數文檔編製

[static] QRgb QColorDialog:: getRgba ( QRgb initial = 0xffffffff, bool * ok = Q_NULLPTR, QWidget * parent = Q_NULLPTR)

Pops up a modal color dialog to allow the user to choose a color and an alpha channel (transparency) value. The color+alpha is initially set to initial . The dialog is a child of parent .

ok is non-null, *a ok is set to true if the user clicked OK , and to false if the user clicked Cancel.

If the user clicks Cancel, the initial value is returned.

使用 QColorDialog::getColor () instead, passing the QColorDialog::ShowAlphaChannel 選項。