Unable to change progress bar background color [SOLVED]
-
your code is working on ubuntu, plastique style.(and others, you can try it out using the preview in Qt Creator)
I guess you are on windows? It's the windows style that prevents it then.
Have a look at the " style sheet" example. That's a good way of testing al your stylesheets out.
-
I also use Ubuntu (Gnome3 gtk+). I tried again with a simple form having just a progress bar, but no change.
@#include "mainwindow.h"
#include "ui_mainwindow.h"MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
ui->progressBar->setStyleSheet("background-color: yellow");
}MainWindow::~MainWindow()
{
delete ui;
}@