cic
18th November 2013, 13:25
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QMainWindow window;
QStatusBar statusBar;
QPalette palette;
window.setWindowTitle("QMainWindow with Colored QStatusBar");
window.setFixedSize(300,100);
window.setStatusBar(&statusBar);
palette.setColor(QPalette::Background, Qt::red);
statusBar.setPalette(palette);
statusBar.showMessage("Red QStatusBar");
window.show();
return app.exec();
}
i used the example code but the background color remained as the default one.
any idea?
9799
{
QApplication app(argc, argv);
QMainWindow window;
QStatusBar statusBar;
QPalette palette;
window.setWindowTitle("QMainWindow with Colored QStatusBar");
window.setFixedSize(300,100);
window.setStatusBar(&statusBar);
palette.setColor(QPalette::Background, Qt::red);
statusBar.setPalette(palette);
statusBar.showMessage("Red QStatusBar");
window.show();
return app.exec();
}
i used the example code but the background color remained as the default one.
any idea?
9799