View Full Version : how to change the color of a top widget ?
feiyinziiu
3rd December 2009, 14:06
hello
I'm new to QT.I wrote a QT ui.the top is a widget,an some buttons in it.
And, I want to change the color of the ui, including the top widget.
what can I do ??
Thank you .
fanat9
3rd December 2009, 14:38
Thru palette for your widget.
In sources it may look like this:
QPalette palette = this->palette();
palette.setColor(QPalette::Window, QColor::fromRgb(255, 0, 0, 255));
this->setPalette(palette);
take a look on http://doc.qt.nokia.com/4.6/qpalette.html
feiyinziiu
4th December 2009, 02:41
hello
I'm new to QT.I wrote a QT ui.the top is a widget,an some buttons in it.
And, I want to change the color of the ui, including the top widget.
what can I do ??
Thank you .
:)Thank you.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.