26 lines
776 B
Python
26 lines
776 B
Python
import sys
|
|
from PyQt6.QtWidgets import QApplication, QDialog, QDialogButtonBox, QLabel, QVBoxLayout
|
|
|
|
|
|
class DialogBox(QDialog):
|
|
def __init__(self, title, message):
|
|
super().__init__()
|
|
self.setWindowTitle(title)
|
|
self.resize(100, 100)
|
|
# self.setModal(True)
|
|
self.label = QLabel(message)
|
|
self.button_box = QDialogButtonBox(QDialogButtonBox.StandardButton.Ok)
|
|
self.button_box.accepted.connect(self.accept)
|
|
|
|
layout = QVBoxLayout()
|
|
layout.addWidget(self.label)
|
|
layout.addWidget(self.button_box)
|
|
self.setLayout(layout)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
app = QApplication(sys.argv)
|
|
dialog = DialogBox("Stack Update", "Stack updated successfully")
|
|
dialog.show()
|
|
sys.exit(app.exec())
|