Learn Environment
toast.hpp
Go to the documentation of this file.
1 #ifndef TOAST_HPP
2 #define TOAST_HPP
3 
4 #include <QWidget>
5 #include <QLabel>
6 #include <QTimer>
7 
8 class Toast : public QWidget {
9  Q_OBJECT
10 
11 public:
12  explicit Toast(QWidget *parent = nullptr);
13  void showToast(const QString &message);
14 
15 private Q_SLOTS:
16  void fadeOut();
17 
18 private:
19  QLabel *toastLabel;
20  QTimer *toastTimer;
21 };
22 
23 #endif // TOAST_HPP
Toast::Toast
Toast(QWidget *parent=nullptr)
Definition: toast.cpp:7
toast.hpp
QWidget
Toast::showToast
void showToast(const QString &message)
Definition: toast.cpp:27
Toast
Definition: toast.hpp:8