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 选项。