PDA

View Full Version : Degree of color



NewLegend
21st November 2010, 19:04
Hello
How do I know the degree the color of the window?
- The normal color of qt creator.

http://www13.0zz0.com/2010/11/21/18/646466948.png (http://www.0zz0.com)

tbscope
21st November 2010, 19:08
Please try to ask that question again. I can't make anything out of it. What do you want to know? What colors are used by Qt Creator?

NewLegend
21st November 2010, 19:37
Please try to ask that question again. I can't make anything out of it. What do you want to know? What colors are used by Qt Creator?

I want to paint the graphicsView with the same background color.
by Using

ui->graphicsView->setBackgroundBrush(QBrush( Qt::lightGray, Qt::SolidPattern));
Experimented more than one color without interest.

In short, what is the background color of the MainWindow?

FelixB
22nd November 2010, 11:02
try this:


QPalette palette = yourWidget->palette();
QColor color = palette.color(QPalette::Base);

wysota
22nd November 2010, 16:33
It's more likely QPalette::Window and not QPalette::Base.