feat: add view settings dialog and button in main window
This commit is contained in:
30
ui/view_settings_dialog.py
Normal file
30
ui/view_settings_dialog.py
Normal 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)
|
||||
Reference in New Issue
Block a user