ProgressBar::ProgressBar(QWidget *parent) : QProgressBar(parent) { setStyleSheet("ProgressBar { margin-left: 11px; margin-right: 11px; border-top: 1px solid #292929;" "border-bottom: 1px solid #292929; background: #0c0c0c;" "border-radius: 7px; color: white; height: 16px; padding: 5px;" "font-size: 14px; font-family: \"Myriad Pro\"; color: white; }" ); setAlignment(Qt::AlignCenter); setMinimum(0); setMaximum(100); connect(this, SIGNAL(valueChanged(int)), this, SLOT(valueChangedSlot(int)));}void ProgressBar::valueChangedSlot(int value) { if ( value >= 50 ) { setStyleSheet("ProgressBar { margin-left: 11px; margin-right: 11px; border-top: 1px solid #292929;" "border-bottom: 1px solid #292929; background: #0c0c0c;" "border-radius: 7px; color: white; height: 16px; padding: 5px;" "font-size: 14px; font-family: \"Myriad Pro\"; color: black; }" ); }}