Obsolete Members for QColor

クラスQColor の以下のメンバーは非推奨です。これらは古いソース・コードの動作を維持するために提供されています。新しいコードでは使用しないことを強くお勧めします。

パブリック関数

(deprecated in 6.6) void setNamedColor(const QString &name)
(deprecated in 6.6) void setNamedColor(QLatin1StringView name)
(deprecated in 6.6) void setNamedColor(QStringView name)

静的パブリック・メンバー

(deprecated in 6.6) bool isValidColor(const QString &name)
(deprecated in 6.6) bool isValidColor(QLatin1StringView name)
(deprecated in 6.6) bool isValidColor(QStringView name)

メンバ関数ドキュメント

[static, deprecated in 6.6] bool QColor::isValidColor(const QString &name)

この関数は6.6から非推奨となった。新しいコードでは使用しないことを強く推奨する。

代わりにisValidColorName() を使用してください。

name が有効な色名で、有効なQColor オブジェクトを構築するために使用できる場合はtrue を返し、そうでない場合は false を返します。

setNamedColor() で使われているのと同じアルゴリズムを使用しています。

setNamedColor()も参照

[static noexcept, deprecated in 6.6] bool QColor::isValidColor(QLatin1StringView name)

この関数は6.6から非推奨となった。新しいコードでは使用しないことを強くお勧めします。

これはオーバーロードされた関数です。

代わりにisValidColorName() を使用してください。

[static noexcept, deprecated in 6.6] bool QColor::isValidColor(QStringView name)

この関数は6.6から非推奨となった。新しいコードでは使用しないことを強くお勧めします。

これはオーバーロードされた関数です。

代わりにisValidColorName() を使用してください。

[deprecated in 6.6] void QColor::setNamedColor(const QString &name)

この関数は6.6から非推奨となった。新しいコードでは使用しないことを強く推奨する。

代わりにfromString() を使用してください。

QColor の RGB 値をname に設定する:

  • #RGB(R、G、Bはそれぞれ16進数1桁)。
  • #RRGGBB
  • #AARRGGBB (5.2以降)
  • #RRRGGGBBB
  • #RRRGGGBBBB
  • World Wide Web Consortium が提供するSVG カラーキーワード名のリストで定義されている色の名前。これらの色名は全てのプラットフォームで動作する。これらの色名はQt::GlobalColor enums で定義されたものとは異なることに注意。例えば "green" とQt::green は同じ色を指すわけではない。
  • transparent - 色がないことを表します。

name が解析できない場合、その色は無効である。

QColor()、name()、isValid()も参照のこと

[deprecated in 6.6] void QColor::setNamedColor(QLatin1StringView name)

この関数は6.6から非推奨となった。新しいコードでは使用しないことを強くお勧めします。

これはオーバーロードされた関数です。

代わりにfromString() を使用してください。

[deprecated in 6.6] void QColor::setNamedColor(QStringView name)

この関数は6.6から非推奨となった。新しいコードでは使用しないことを強くお勧めします。

これはオーバーロードされた関数です。

代わりにfromString() を使用してください。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.