30 lines
908 B
Python
30 lines
908 B
Python
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) |