int main(int argc, char*[] argv)
{
.....
MyTabWidget* topRight = new MyTabWidget();
MyQPalette* palette = topRight->getPalette();
palette->changeColour();
topRight->QWidget::setPalette(bottomColours);
.......
}
int main(int argc, char*[] argv)
{
QApplication app(argc, argv);
app.QApplication::setStyle(new TopLayoutStyle);
.....
MyTabWidget* topRight = new MyTabWidget();
MyQPalette* palette = topRight->getPalette();
palette->changeColour();
topRight->QWidget::setPalette(bottomColours);
.......
}
To copy to clipboard, switch view to plain text mode
MyQPalette::changeColour()
{
QColor greenShadow
(98,
161,
98);
QColor greenLight
(116,
195,
116);
QColor greenForeground
(167,
210,
183,
63);
QColor greenDark
(80,
140,
80);
QColor midYellow
(255,
235,
0);
this
->setBrush
(QPalette::BrightText,greenForeground
);
this
->setBrush
(QPalette::Highlight, greenForeground
);
this
->setBrush
(QPalette::Background, green
);
this
->setBrush
(QPalette::Light, greenLight
);
this
->setBrush
(QPalette::Mid, greenMid
);
this
->setBrush
(QPalette::Dark, greenDark
);
this
->setBrush
(QPalette::Button, green
);
this
->setBrush
(QPalette::Window, green
);
}
MyQPalette::changeColour()
{
QColor greenShadow(98, 161, 98);
QColor green(112, 181, 112);
QColor greenLight(116, 195, 116);
QColor greenMid(95,135,95);
QColor greenForeground(167, 210, 183, 63);
QColor greenDark(80, 140, 80);
QColor midYellow(255, 235, 0);
this->setBrush(QPalette::BrightText,greenForeground);
this->setBrush(QPalette::Base, green);
this->setBrush(QPalette::Highlight, greenForeground);
this->setBrush(QPalette::Background, green);
this->setBrush(QPalette::Light, greenLight);
this->setBrush(QPalette::Mid, greenMid);
this->setBrush(QPalette::Dark, greenDark);
this->setBrush(QPalette::Button, green);
this->setBrush(QPalette::Window, green);
}
To copy to clipboard, switch view to plain text mode
now for the most part this is cool, all the buttons/outlines etc change on the tabs widget which I want to stand out....only prob is that the background does not change colour even though everything else does
Bookmarks