feat: add view settings dialog and button in main window

This commit is contained in:
2025-09-28 07:55:54 +02:00
parent d86a6429f7
commit f2a002a249
2 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
from PySide6.QtWidgets import QDialog, QHBoxLayout ,QVBoxLayout, QPushButton
from PySide6.QtCore import Qt
class ViewSettingsDialog(QDialog):
def __init__(self, parent=None):
super().__init__(parent)
self.setWindowTitle("Ustawienia widoku")
self.setFixedSize(300, 200)
self.setWindowFlags(self.windowFlags() | Qt.WindowStaysOnTopHint)
self.setup_ui()
def setup_ui(self):
self.main_layout = QVBoxLayout(self)
self.btn_layout = QHBoxLayout()
self.btn_layout.addStretch()
self.ok_button = QPushButton("OK")
self.ok_button.clicked.connect(self.accept)
self.btn_layout.addWidget(self.ok_button)
self.cancel_button = QPushButton("Anuluj")
self.cancel_button.clicked.connect(self.reject)
self.btn_layout.addWidget(self.cancel_button)
self.main_layout.addLayout(self.btn_layout)