qprogressbar

Gradient for chunks in QProgressBar

落花浮王杯 提交于 2019-12-12 16:25:34
问题 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, stop: 1 white); margin-right: 2px; width: 10px; } the result will be http://labs.trolltech.com/blogs/wp-content/uploads/2007/06/progressbar_righttext.png but I want to obtain a one gradient, stretched to all chunks. Like this: http://labs.trolltech.com/blogs/wp-content/uploads/2007/06

PyQt Progressbar QThread not working when rendering a graph

空扰寡人 提交于 2019-12-11 14:22:55
问题 I looked at this answer here which was very helpful, but it's not working as expected when trying to render a plot. The plot is working but the progress bar is not progressing , it will just jump to 100% after the plot is rendered. Of course, I would like the progress bar to be progressing while the plot is rendering, not after it's finished. I think, I might be missing a PyQt function to somehow connect the event or the pyqt signal, but actually I have no idea how to fix this. Here is, what

How do I update pyqt5 progress bar in Ui_MainWindow

橙三吉。 提交于 2019-12-08 05:31:55
问题 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 help? Main ui window. # -*- coding: utf-8 -*- # # Created by: PyQt5 UI code generator 5.9 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets from sendInvoice import * class Ui_MainWindow(object): def

How do I update pyqt5 progress bar in Ui_MainWindow

雨燕双飞 提交于 2019-12-07 23:00:43
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 help? Main ui window. # -*- coding: utf-8 -*- # # Created by: PyQt5 UI code generator 5.9 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets from sendInvoice import * class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(441, 175) self

Change the color of a QProgressBar

五迷三道 提交于 2019-12-04 18:07:21
问题 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 errors, ...). I have tried several suggestions, including the ones made to this almost identical question. Unfortunately, I couldn't make it work and the documentation on customizing QProgressBars doesn't help me either, so I would be very grateful for

Is there circular QProgressbar with range (0,0) in qt?

吃可爱长大的小学妹 提交于 2019-12-04 06:41:43
问题 I want to have circular QProgressbar which it's appearance must look like the normal QProgressbar with the Range between 0 and 0. The code for the linear QProgressbar is some thing like below: QProgressBar *_progressBar = new QProgressBar(); _progressBar->setTextVisible(false); _progressBar->setRange(0, 0); but I want it to be circular. Is there any way to implement it in qt? 回答1: One day I wrote a simple class to implement a circular progress bar for my purposes (Qt 4.6). You can modify its

Is there circular QProgressbar with range (0,0) in qt?

社会主义新天地 提交于 2019-12-02 08:38:50
I want to have circular QProgressbar which it's appearance must look like the normal QProgressbar with the Range between 0 and 0. The code for the linear QProgressbar is some thing like below: QProgressBar *_progressBar = new QProgressBar(); _progressBar->setTextVisible(false); _progressBar->setRange(0, 0); but I want it to be circular. Is there any way to implement it in qt? One day I wrote a simple class to implement a circular progress bar for my purposes (Qt 4.6). You can modify its appearance as you need. Hope it will help. loading.h #pragma once #include <QtGui> class Loading : public

unexplained delay after QProgressBar finish loading

橙三吉。 提交于 2019-12-02 07:02:53
问题 I have emit signal from a loop (which make some calculations) that triggers progress bar update which located on the main GUI, after the loop ends the progress bar updated to 100% (the progress bar become hidden when the process ends), but than there is a delay, the progress bar stays on 100% and sometimes the mouse changes to busy, and only after few seconds the progress bar become hidden (indicates me that the delay ends), there is nothing after that loop, so nothing I can thinks of can

Change the value of the progress bar from a class other than my GUI class PyQt4

帅比萌擦擦* 提交于 2019-12-02 01:47:26
I have a GUI class created by Qt designer in which i have a progress bar, and another class in which all the number crunching is done during which i want my progress bar to update regularly. The way i thought i would do this it to do something like this in the other class: gui.progressbar.setValue(some%) but i cant seem to make that work. the code for the gui class is something like: from PyQt4 import QtCore, QtGui from Run import RunProgram class Ui_mainLayout(QtGui.QWidget): def setupUi(self, mainLayout): mainLayout.setObjectName(_fromUtf8("mainLayout")) def setLayout(): self.basic_tab =

How to control QProgressBar with Signal

百般思念 提交于 2019-12-01 07:48:55
问题 Pushing the button starts 100 rounds cycle. With QLabel.setText() we update self.label from inside of scope of clicked() function. Aside from updating self.label we would like to update the progressbar as well. But since progressbar is a local variable we can't update it from inside of onClick() function. import time class ProgressBar(QtGui.QProgressBar): def __init__(self, parent=None, total=20): super(ProgressBar, self).__init__(parent=parent) self.setMinimum(1) self.setMaximum(105) self