def setupUi(self):
"""Bruh"""
self.setGeometry(50, 50, 450, 250)
self.setWindowTitle("ZeZe's TWTools - Updating Servers")
self.setWindowIcon(QtGui.QIcon(resource_path("images/icon.png")))
"""Background color"""
self.backgroundPalette = QtGui.QPalette()
self.backgroundColor = QtGui.QColor(217, 204, 170)
self.backgroundPalette.setColor(QtGui.QPalette.Background, self.backgroundColor)
self.setPalette(self.backgroundPalette)
"""Layout"""
self.verticalLayout = QtGui.QVBoxLayout(self)
self.text = QtGui.QLabel("Updating server list:")
self.verticalLayout.addWidget(self.text)
"""Download bar"""
self.progress_bar = QtGui.QProgressBar(self)
self.progress_bar.setMinimum(0)
self.progress_bar.setMaximum(27)
self.progress_bar.setValue(0)
self.progress_bar.setFormat("%v / %m")
self.verticalLayout.addWidget(self.progress_bar)
"""Text browser for progress"""
self.progress_text = QtGui.QTextBrowser(self)
self.verticalLayout.addWidget(self.progress_text)
"""Button"""
self.horizontalLayout = QtGui.QHBoxLayout(self)
self.verticalLayout.addLayout(self.horizontalLayout)
self.Spacer = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout.addItem(self.Spacer)
self.cancelButton = QtGui.QPushButton("Cancel")
self.horizontalLayout.addWidget(self.cancelButton)
self.cancelButton.clicked.connect(self.cancel_function)
评论列表
文章目录