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
0
votes
1 answer

How to set QProgressBar stylesheet dynamically?

I'm trying to make a progress bar that can dynamically change part of it's color depending on a slider's value. The closest I can get to that right now is by using: bar->setStyleSheet(QString("QProgressBar::chunk:vertical {background:…
galeotron
  • 47
  • 1
  • 7
0
votes
1 answer

Align vertically center QProgressBar on QTableView Row

I am using Pyside2 to build an application that I populate a TableView with ProgressBar. I am able to put the Progress on each line, therefore, I am not able to vertically center the ProgressBar the same way I center the text on column 1. I tried…
Gto Carlos
  • 37
  • 5
0
votes
0 answers

Widget getting stretched along with the geometry of the layout

I am placing a battery widget in the layout which is getting stretched along with the geometry of the layout which I don't want to be. It has to be of fixed size even though I change the geometry of the layout. And also the widget automatically…
0
votes
1 answer

Showing a Progress Bar in a QMainWindow from a Callback, boto3.s3

I am creating a program that uploads a folder into a bucket. Right now I have the program and UI all set I would just like to add a progress bar showing which file is being uploaded. I am wondering if there is a way to use the…
Ganzatron
  • 11
  • 6
0
votes
1 answer

How to link the execution of QProcess and the advancement of the QProgressBar for a very heavy computation loop

I have the following bash script to be executed on a GUI via QPushButton: #!/bin/bash rostopic echo -b test_LaserScan_PointCloud2_test2.bag -p /scan > test_landing_test_2.csv rostopic echo -b test_LaserScan_PointCloud2_test2.bag -p…
Emanuele
  • 2,194
  • 6
  • 32
  • 71
0
votes
0 answers

PySide2 ProgressBar displaying file conversion stutus

I want to create a csv file progress bar when I click a button. I know it is possible to do this with QThread but I don't know how. class Converter(QtWidgets.QWidget, Ui_Convertisseur): def __init__(self): super().__init__() …
hitech
  • 70
  • 1
  • 8
0
votes
1 answer

Showing a QSplashScreen with QMovie and a QProgressBar crashed. PyQt5

I try to display a SplashScreeen with a gif and a progressbar in it, while a method calculates. Therefore I have one main.py with a PyQt5 MainWindow Application. In this application method starts, see my calc.py: from time import sleep,…
sticki
  • 43
  • 1
  • 8
0
votes
0 answers

QProgressDialog doesn't display well

I have some issues with the QProgressDialog class from the PySide2 lib : The progress bar doesn't display well for the first 2 steps. My code is organised as below : main.py def main(): app = QApplication(sys.argv) window = MainWindow() …
0
votes
1 answer

Implement QThread with QProgressBar in PySide (or PyQt) during calculation

I would like to know how to implement QProgressBar, which shows the progress of calculation in main thread. Please refer to below codes. import sys from PySide2.QtWidgets import QApplication, QWidget, QPushButton, QVBoxLayout, QProgressBar from…
0
votes
2 answers

Changing QProgressbar chunk's color according to a scale

I am trying to change color of a Qprogressbar according to a variable named accuracy which hold values between 0 and 100. So basically if the accuracy is 100 the color should be green and if it is 0 it should become red and I also want it to support…
Raad
  • 37
  • 8
0
votes
1 answer

Progress bar change the value but not update the graphic

I try much method i have find to do this, but no one work for me. I have tried with qApp.processEvents() and with update() but no one work. void GUI::startLoading(int currentFile) { ui->progressBar->setValue(currentFile); …
0
votes
1 answer

set min and max value of a qprogressBar without passing by stylesheet

I need to create a QProgressBar where we can choose a range, the minimum and the maximum value. Until now, I used a stylesheet for the same but the program is working(although not perfectly). Stylesheet will allow me each time to change my…
0
votes
0 answers

How to use a list of widgets

I added some QProgressBar inside a list and I need to use that list to set the values of these ProgressBar self.DataBar = list() for Nb in range(0, 4): self.DataBar.append(BarPourcentage(self)) …
Cheen
  • 86
  • 3
  • 12
0
votes
1 answer

How to use QProgressBar.setValue outside the GUI thread. Repaint Error

I use PyQt to show the detection result. I have two threads one Ui_MainWindow ui and one QThread detect. I got the detect result(a float number) and want to use the ui.QProgressBar.setValue(result) in the detect.run but it would cause error…
0
votes
0 answers

How to put a QProgressBar inside a QTextEdit

I am designing a command log using QTextEdit and I was wondering how to put a QProgressBar, if it is possible, everytime the user interacts with the user interface and only for specific commands. For example if the user upload images than the…
Emanuele
  • 2,194
  • 6
  • 32
  • 71