Qpalette各種背景色の設定


スペース背景色の設定
         setAutoFillBackground(true);//オートフィルの設定
 QPalette palette = this->palette();
 palette.setColor(QPalette::Background,Qt::black);
 setPalette(palette);

QPalette::ColorRole


QPalette::Window
10
通常はウィンドウコンポーネントの背景色を指します
QPalette::Background
Window
This value is obsolete. Use Window instead.
QPalette::WindowText
0
通常は窓が見えない前の景色を指す.
QPalette::Foreground
WindowText
This value is obsolete. Use WindowText instead.
QPalette::Base
9
テキスト入力ウィンドウ部品(例えばQtextEdit、QLinedit等)の背景色を指す.
QPalette::AlternateBase
16
Used as the alternate background color in views with alternating row colors (seeQAbstractItemView::setAlternatingRowColors()).
QPalette::ToolTipBase
18
プロンプト背景色
QPalette::ToolTipText
19
プロンプトの前の景色
QPalette::Text
6
Qpalette::Baseと一緒に使用し、テキスト入力ウィンドウ部品の前景色を指す.
QPalette::Button
1
ボタンウィンドウコンポーネントの背景色を指す.
QPalette::ButtonText
8
ボタン窓部材の前景色を指す.
QPalette::BrightText
7
A text color that is very different from WindowText, and contrasts well with e.g. Dark. Typically used for text that needs to be drawn where Text or WindowText would give poor contrast, such as on pressed push buttons. Note that text colors can be used for things other than just words; text colors are usually used for text, but it's quite common to use the text color roles for lines, icons, etc.