I have a main window,when user choose a file to upload,then a new window will open an show status of file i.e filename,upload speed,time left and etc(like IDM and xdman)
when user add a file to upload everything process as well
the problem came up if user want to add more file to upload
first window will stop updating data(which should continue till upload finish)
second window show continue updating info but the progressbar will get mixed with the first window(I mean both progressbar will show in second window at the same time !!! ) How I supposed to keep them separate ? here is the short version of my code to understand what I did !
class Window(QtGui.QWidget):
def __init__(self, parent=None):
super(Window, self).__init__(parent)
self.table = QtGui.QTableWidget(self)#progressbar work perfectly in table but not in new windows !
def handleAddUpload(self):
#choosing a file codes go here
progress = QtGui.QProgressBar(self.table)
progress.setRange(0, len(data))
#two above line will add progressbar to table !
tabs = self.createTab() #caling createTab for creating new window for...
def handleUploadProgress(self, key, sent, total):
#handleeUploadProgress method call rapidly since data needs to be stream and update !
progress = self.table.cellWidget(key, 0)
progress.setValue(sent)
#two above line will update value in table without any problem
self.procbar.setValue(sent) #this line call progressbar value from createTab()
def createTab(self): #all my problems are in this method
self.tab = QtGui.QTabWidget()
layout = QtGui.QVBoxLayout(self)
tab = QtGui.QWidget()
layout1 = QtGui.QVBoxLayout(tab)
self.procbar = QtGui.QProgressBar()
self.procbar.setStyleSheet("")
self.procbar.setRange(0, 0) #a range added in handleaddupload,for shorting this I didn't show that
self.procbar.setValue(0)
layout1.addWidget(self.procbar)
self.tab.addTab(tab, 'Upload Status')
layout.addWidget(self.tab)
self.tab.show()
def handleUploadFinished(self, key):
#codes.....
I think this is all which related to progressbar
Since I'm new to python/pyside I asked for help and here is the base of my code(I started with this answer)
Here is my short question : How to add separate unique widgets to show for more than one progressbar at same time ?
Thanks guys for reading this boring question
update 1 :
Here is a picture of software
When I add Pharrell song to upload both progress bar in table and separate window display as well,but when I added new song for upload(justin) :
1- the progress bar in separate window for Pharrell stop working(as you can see percentage is not the same) !
2-progress bar(Just in separate window) for new added song show both progress percent(it rapidly change to 10% and 26%)
(in all situation progress bar in table is working)