/
marcusstill
/
PyMASL
Обзор
Документация
Войти
/
marcusstill
/
PyMASL
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
modules/windows.py
34 строки
1 KB
MarcusStill
Small fix.
12 янв 2026, 19:22
12 янв 2026, 19:22
c49a0f2
Код
Авторство
О чём код?
from PySide6.QtCore import Qt from PySide6.QtWidgets import QMessageBox def info_window(text, infotext, detailed_text): """Показ информационного окна""" msg = QMessageBox() msg.setIcon(QMessageBox.Information) msg.setWindowTitle("Информационное окно") msg.setText(text) msg.setInformativeText(infotext) msg.setDetailedText(detailed_text) msg.exec() def info_dialog_window(title, text): """Показ диалогового окна""" box = QMessageBox() box.setIcon(QMessageBox.Question) box.setWindowTitle(title) box.setText(text) box.setStandardButtons(QMessageBox.Yes | QMessageBox.No) buttonY = box.button(QMessageBox.Yes) buttonY.setText("Да") buttonN = box.button(QMessageBox.No) buttonN.setText("Нет") # Отображаем окно поверх всех box.setWindowFlags(box.windowFlags() | Qt.WindowStaysOnTopHint) box.exec_() if box.clickedButton() == buttonY: return 1 elif box.clickedButton() == buttonN: return 0