/
SerZok
/
LIDE
Обзор
Документация
Войти
/
SerZok
/
LIDE
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/ui/components/error_notification.h
28 строк
696 B
SerZok
style [Error line]: Отображение сообщения с позицией ошибки
08 апр 2026, 18:30
08 апр 2026, 18:30
0434531
Код
Авторство
О чём код?
#pragma once #include <QLabel> #include <QTimer> #include <QEvent> #include <QToolButton> #include <QPropertyAnimation> #include <QEnterEvent> class ErrorNotification : public QLabel { Q_OBJECT public: explicit ErrorNotification(QWidget* parent = nullptr); void showError(const QString& message, int durationMs = 10000); protected: void enterEvent(QEnterEvent* event) override; void leaveEvent(QEvent* event) override; bool eventFilter(QObject* watched, QEvent* event) override; void repositionToCorner(); private: QPropertyAnimation* m_fadeIn, * m_fadeOut, * m_buttonFade; QToolButton* m_closeButton; QTimer* m_autoHideTimer, * m_hideButtonTimer; };