Can't change background color of progress bar
Luca Bertolotti
luca72.bertolotti at gmail.com
Thu Aug 8 09:26:29 BST 2024
Hello
This is my code:
self.lista_progress[a].setMaximum(100)
self.lista_progress[a].setValue(int(v))
self.lista_progress[a].setStyleSheet("QProgressBar {background-color:
black;}")
self.lista_progress[a].setStyleSheet("QProgressBar::chunk
{background-color: green;}")
Where self.lista_progress is a list of progressbar , but only the line
self.lista_progress[a].setStyleSheet("QProgressBar::chunk
{background-color: green;}")
work
the line
self.lista_progress[a].setStyleSheet("QProgressBar {background-color:
black;}")
don't make anything
What is wrong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20240808/b47a85ca/attachment.htm>
More information about the PyQt
mailing list