Questions tagged [qprogressbar]

QProgressBar is a Qt class that provides a progress bar, which can be either horizontal or vertical.

The QProgressBar uses steps to show the progress. To use it, the minimum and maximum values should be specified. After that, when the progress bar receives a current step value, it will update itself to show the percentage of steps completed.

If both values are set to 0, the progress bar will turn into a "busy" indicator. An example of this is the following:

QProgressBar * b = new QProgressBar();
b->setMinimum(0);
b->setMaximum(0);
b->show();

Official documentation can be found here.

152 questions
1
vote
1 answer

How to implement a Progress Bar using PyQt5?

I'm using PyQt5 and I want to know how to implement a progress bar, so the user can see the progress of a certain function that takes several minutes to complete. I want the progress bar to be displayed in a new window, and to start the % when the…
cmoreno98
  • 45
  • 4
1
vote
1 answer

How to get solid colors using QLinearGradient when styling QProgressBar?

QProgressBar *b = new QProgressBar(); QString progressStyle = QString("::chunk {" "background-color: " "qlineargradient(x0: 0, x2: 1, " …
Mark Garai
  • 29
  • 7
1
vote
1 answer

Update progress bar from thread monitoring CPU activity

I am getting this error from my code: RuntimeWarning: MetaObjectBuilder::addMethod: Invalid method signature provided for "CPU_VALUE" self.threadclass.CPU_VALUE.connect(SIGNAL('CPU_VALUE'), self.UpdateProgressBar) from PySide2 import QtWidgets,…
1
vote
0 answers

QProgressbar does not respond to large values

I want to build an application that calculates large computations using an idle timer. The progress bar works fine for small numbers but if I enter large numbers as input the progress bar does not display anything. Code, where I set the…
1
vote
2 answers

QProgressBar updates as function progress

How to initializa the operation of QProgressBar, I already declare her maximum, minimum, range and values. I want to assimilate the progress of QProgressBar with the "sleep_for" function. Current code: void MainPrograma::on_pushCorre_clicked() { …
joaopedro
  • 75
  • 9
1
vote
1 answer

ProgressBar resume from where it stopped

I have created a desktop application by PYQT5 and python 3.7 to download a video by clicking the download button and save it locally in the PC. The code will fetch the video link from (lineEdit.text()) which is labeled "URL" and save it in the local…
monamouv
  • 39
  • 6
1
vote
0 answers

Running the os.system command with the PyQt5 progress bar

There is a button that runs the os.system('sudo apt-get update')command when the button is clicked. Simultaneously, I'd like to display a progress bar while the command are running. Should I use Thread? How can I do this in PyQt5 ? class…
Ensar
  • 11
  • 1
  • 3
1
vote
1 answer

Add text and percentage complete inside of a QProgressBar

I have a QProgressBar and I want the text "Loading files... 90%" to be displayed inside the progress bar. I can get the code to display EITHER "Loading files..." or "90%" to be inside the bar, but not both. I have code like: …
Dennis
  • 269
  • 1
  • 13
1
vote
0 answers

How can I make a QProgressBar update without processing any other GUI events?

I have a PySide GUI in which several buttons trigger a long processing function, which subsequently updates GUI elements. Pushing the button freezes the GUI for a while until the processing completes. Since it takes a while, I wanted to add a…
Selvek
  • 130
  • 1
  • 9
1
vote
3 answers

How to change Qt ProgressBar color?

I would like to change color of my progress bar from default green to red. I have this code, but the view is "flat", I would like to achieve something like "3d effect" as on picture below: Code for red PB: QPalette pal =…
Marta Szmit
  • 11
  • 1
  • 3
1
vote
1 answer

PyQt QProgressBar not working correctly due to Python docstring comment length?

Using Python 3.1 and PyQt, I am trying to get a QProgressBar to show that a task is working by having the bars slide across the widget. I found that can be done by setting the minimum and maximum values to 0. I got it to work properly, but then when…
Sean
  • 533
  • 1
  • 5
  • 6
1
vote
1 answer

PyQt4 threading properly

I want to make a progressbar which runs on a thread and I want to be able to move the widget during the process: import sys from PyQt4.QtGui import QApplication, QMainWindow, QPushButton, QLineEdit, QLabel, QComboBox, QProgressBar, QFileDialog from…
Artur Müller Romanov
  • 4,417
  • 10
  • 73
  • 132
1
vote
1 answer

PyQt progress jumps to 100% after it starts

When I run the code in the in the doWork method, by clicking the button1, the progress bar works as expected. However, when I pass the list to the doWork method from other methods (i.e. btn2, btn3), the progress bar just jumps to 100% after it…
Joe T. Boka
  • 6,554
  • 6
  • 29
  • 48
1
vote
1 answer

How do I update pyqt5 progress bar in Ui_MainWindow

I try to make the progress bar update real-time with pyqt5, however, the documentation online seems very limited for now. I read online that I can use thread and signal to do that. However, the syntax seems changed in pyqt5. Can any experts here…
Reece Mak
  • 101
  • 2
  • 9
1
vote
1 answer

Control QProgressBar Width

I have a vertical QProgressBar that lives in a horizontal layout, between two QTextEdit objects. In Designer, I've changed the width of the progress bar using a stylesheet, which works to a degree - but I can't shrink the width below about 17…
SixDegrees
  • 781
  • 1
  • 8
  • 19