How do I make the taskbar show my progress bar in PyQt4?
Asked Answered
F

2

6

I'm using PyQt4 to display a progress bar in my application, but I want it to also be seen on the taskbar, just like many programs such as winRAR and google chrome do. Is there a way to make that happen?

Frierson answered 28/7, 2011 at 22:46 Comment(1)
G
2

Yes, you'll want to setup your QProgressBar (not QProgressBarDialog) and insert into QStatusBar (or QMainWindow.statusBar()) with the insertWidget(), then use removeWidget to remove it when you're done with it.

Grammar answered 31/7, 2011 at 20:16 Comment(0)
C
2

in PyQT5 you must use addWidget()

class ExampleApp(QtWidgets.QMainWindow, mainwindow_test.Ui_MainWindow):
def __init__(self):
    super().__init__()
    self.statusbar.addWidget(self.progressBar)
Cranium answered 19/10, 2019 at 22:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.