problem in QProgressBar setStyleSheet
hi friends,
in dialog.cpp
Code:
label1
= new QLabel("please wait ...");
progressbar->setTextVisible(false);
//for progressbar
setStyleSheet("QProgressBar {border: 1px solid grey; border-radius: 8px;padding: 1px }");
//for chunk
setStyleSheet("QProgressBar::chunk {background: qlineargradient(x1: 0, y1: 0.5, x2: 1, y2: 0.5, stop: 0 red, stop: 1 white); }");
but here only one stylesheet is working at a time ... it QProgressBar::chunk stylesheet only works in my code .. if i commented the QProgressBar::chunk stylesheet ,, QProgressBar style sheet is working ... how can i modify both at a time ...?
please help ..
Re: problem in QProgressBar setStyleSheet
it happens because you override the first style sheet.
join these styles in one string and then set this string.
Re: problem in QProgressBar setStyleSheet
Quote:
Originally Posted by
spirit
it happens because you override the first style sheet.
join these styles in one string and then set this string.
thanks for reply .. yes its overriding the first style sheet and now i try like this
Code:
setStyleSheet(" QProgressBar {border: 1px solid grey;
border-radius:8px;padding:1px},
QProgressBar::chunk {background: qlineargradient(x1: 0, y1: 0.5, x2: 1, y2: 0.5, stop: 0 red, stop: 1 white);
width: 10px;margin: 0.5px}");
and its not working ... what i should use to separate the two stylsheets ... .
Re: problem in QProgressBar setStyleSheet
sorry to post again .. remove the comma "," between the two style sheets ... its working