add progress bar

This commit is contained in:
Hirad 2025-01-24 13:36:23 +03:30
parent 5034067fd9
commit 6a4e08d182

View file

@ -2,7 +2,7 @@ import sys
from PyQt6.QtWidgets import (QApplication, QMainWindow, QWidget,
QVBoxLayout, QHBoxLayout,
QLabel, QLineEdit, QListWidget,
QTableWidget, QHeaderView, QPushButton, QComboBox)
QTableWidget, QHeaderView, QPushButton, QComboBox, QProgressBar)
class PortainerUi:
@ -29,8 +29,8 @@ class PortainerUi:
self.update_date_label = QLabel()
self.containers_table = QTableWidget()
self.containers_table.setColumnCount(3)
self.containers_table.setHorizontalHeaderLabels(["ID", "Name", "Status"])
self.containers_table.setColumnCount(4)
self.containers_table.setHorizontalHeaderLabels(["ID", "Name", "Status", "Image Status"])
self.containers_table.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeMode.ResizeToContents)
self.containers_table.horizontalHeader().setStretchLastSection(True)
@ -67,6 +67,11 @@ class PortainerUi:
widget.setLayout(layout)
self.main_window.setCentralWidget(widget)
self.progress_bar = QProgressBar()
self.progress_bar.setTextVisible(False)
self.main_window.statusBar().addPermanentWidget(self.progress_bar)
self.progress_bar.hide()
def show(self):
self.main_window.show()