Обновить интерфейс: перейти на PyQt6 и исправить выравнивание заголовка
This commit is contained in:
1 parent
dc1d7be0f4
commit
414a16e5fd
1 file changed
+4
-4
+4
-4
@@ -1,9 +1,9 @@
|
|||||||
from PyQt5.QtWidgets import (
|
from PyQt6.QtWidgets import (
|
||||||
QApplication, QVBoxLayout, QHBoxLayout, QPushButton,
|
QApplication, QVBoxLayout, QHBoxLayout, QPushButton,
|
||||||
QCheckBox, QLabel, QWidget, QFileDialog, QStatusBar
|
QCheckBox, QLabel, QWidget, QFileDialog, QStatusBar
|
||||||
)
|
)
|
||||||
from PyQt5.QtCore import Qt
|
from PyQt6.QtCore import Qt
|
||||||
from PyQt5.QtGui import QIcon
|
from PyQt6.QtGui import QIcon
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
class MainWindow(QWidget):
|
class MainWindow(QWidget):
|
||||||
@@ -42,7 +42,7 @@ class MainWindow(QWidget):
|
|||||||
# Title
|
# Title
|
||||||
title = QLabel("Шифрование файлов")
|
title = QLabel("Шифрование файлов")
|
||||||
title.setStyleSheet("font-size: 18px; font-weight: bold; color: #333;")
|
title.setStyleSheet("font-size: 18px; font-weight: bold; color: #333;")
|
||||||
title.setAlignment(Qt.AlignCenter)
|
title.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
||||||
main_layout.addWidget(title)
|
main_layout.addWidget(title)
|
||||||
|
|
||||||
# Buttons layout
|
# Buttons layout
|
||||||
|
|||||||
Reference in new issue
Block a user