Disable run-time animation in Qt

Is it possible to disable the progress bar animation in Qt and make it behave like a meter instead?

Below is the default behavior, and instead I would like it to not let out a brilliant wave. I was hoping to use it to show resources used, such as processor, memory, and disk space.

enter image description here

+6
source share
2 answers

css for use in qt designer:

QProgressBar::chunk { background-color: #3add36; width: 1px; } QProgressBar { border: 2px solid grey; border-radius: 0px; text-align: center; } 

Pyqt example:

 my_progress_bar = QProgressBar() my_progress_bar.setStyleSheet(" QProgressBar { border: 2px solid grey; border-radius: 0px; text-align: center; } QProgressBar::chunk {background-color: #3add36; width: 1px;}") 

enter image description here

+9
source

It looks like the progress bar you are using is a view of Windows Vista . You must change the behavior by changing the stylesheet . Try replacing the background, the image of the progress bar and / or fragment.

+1
source

Source: https://habr.com/ru/post/945032/


All Articles