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
17
votes
4 answers

Change text displayed by QProgressBar

I use a QProgressBar to show the progress of a download operation. I would like to add some text to the percentage displayed, something like: 10% (download speed kB/s) Any idea?
Kazuma
  • 1,371
  • 6
  • 19
  • 33
16
votes
3 answers

Change the color of a QProgressBar

I am running ubuntu 11.04. This is what my progress bars look like: I am showing the progress bars in a batch processing window (one per batch item) and would like to use them as a status indicator (green while all is going well, red in case of…
steps
  • 618
  • 1
  • 7
  • 18
14
votes
2 answers

What is the proper way to set QProgressBar to update from the logic layer?

If I want to update a QProgressBar on the view layers from a loop on the logic layer (such as each iteration will update the progress bar), what is the proper way to do that? Thanks
GoldenAxe
  • 838
  • 3
  • 9
  • 26
12
votes
2 answers

PyQt ProgressBar

When using the following code my application stalls after a couple of seconds. And by stalls I mean hangs. I get a window from Windows saying wait or force close. I might add that this only happens when I click either inside the progress bar window…
Tuim
  • 2,491
  • 1
  • 14
  • 31
11
votes
3 answers

Qt QProgressBar - aligning text

Has anyone any suggestions on how to align the status text on the QProgressBar in Qt? By default in Windows it appears to the right of the bar but I'd prefer to place it either above the bar or within the bar itself without having to extend the…
kh25
  • 1,238
  • 1
  • 15
  • 33
6
votes
1 answer

Looping QProgressBar gives error >> QObject::installEventFilter: Cannot filter events for objects in a different thread

This question seems to have been asked many times in many different forms but I haven't managed to find one with a -relevant to my code- solution. When I run the program it shows QObject::installEventFilter: Cannot filter events for objects in a…
Jay
  • 3,373
  • 6
  • 38
  • 55
4
votes
1 answer

Changing the color of a QProgressbar()

I was wondering whether it's possible to change the color of a PyQt Progressbar? I have the following code: from PyQt4 import QtGui, QtCore Pbar1 = QtGui.QProgressBar() Pbar1.setParent(Frame1) Pbar1.setGeometry(0, 0, 306,…
Marcel Hoving
  • 65
  • 1
  • 1
  • 3
4
votes
1 answer

How to show progress bar while saving file to excel in python?

Appreciate if you could help me. I have a trouble showing up the progress bar while saving file to excel. What I want to achieve is to show a progress bar while saving excel file from a pandas dataframe also from qwidgettable as it takes time before…
4
votes
2 answers

PyQt5: pop-up progressbar using QThread

How can I implement a progress bar in a pop-up window that monitors the progress of a running function from a so-called Worker class (i.e. time/CPU-consuming task) by means of a QThread? I have checked countless examples and tutorials, but the fact…
rubebop
  • 392
  • 1
  • 7
  • 17
4
votes
2 answers

How to include a column of progress bars within a QTableView?

I started creating a Plugin on QGIS 3 and my plugin requires Progress bars within a QTableView. I am trying to figure out how to add a column of progress bars within my QTableView in PyQt5. But I couldn't find any relevant code or resources…
Sumanth Reddy
  • 43
  • 1
  • 7
4
votes
1 answer

PyQt QProgressBar not working when I use it with Selenuim

I built a PyQt5 GUI to do some Selenium testing. Everything works as expected, except for the PyQt progress bar. In the first example below, where I use the Selenium browser, the progress bar just jumps to 100%, at the end, when the browser closes.…
Joe T. Boka
  • 6,554
  • 6
  • 29
  • 48
4
votes
2 answers

QProgressDialog: problems about MinimumDuration

I'm using QT 4.8.5. I met some problems on QProgressDialog with MinimumDuration. Here is the documentation: http://doc.qt.io/qt-4.8/qprogressdialog.html#minimumDuration-prop. 1.Test with the following code. The dialog is not displayed at all. But…
ldlchina
  • 927
  • 2
  • 12
  • 31
4
votes
2 answers

Place the text in the middle of QProgressBar when setRange(0, 0) on Windows?

How to place text (not just a number) in the middle of QProgressBar when setRange(0, 0) on Windows? The following is a PyQt example which still doesn't work as expected. import sys from PyQt4.QtGui import * from PyQt4.QtCore import * class…
iMath
  • 2,326
  • 2
  • 43
  • 75
3
votes
3 answers

Gradient for chunks in QProgressBar

Is it possible to set a common gradient for all QProgressBar chunks? If use something like this: QProgressBar::chunk:horizontal { background: qlineargradient(x1: 0, y1: 0.5, x2: 1, y2: 0.5, stop: 0 green, …
ILYA
  • 495
  • 6
  • 18
3
votes
1 answer

Howto change progress by worker thread

I'm new to PyQt4 so maybe it is a bagatelle. I try to show a progress in my GUI, which will be updated by an worker thread.The QProgressBar is with other memory's in a QTableWidget. The worker thread starts in the init function of my GUI. self.st =…
Chris
  • 159
  • 3
  • 14
1
2 3
10 11