NeTrainSim 0.1.1 beta
The Open-Source Network Trains Simulator
 
Loading...
Searching...
No Matches
disappearinglabel.h
Go to the documentation of this file.
1
13#ifndef DISAPPEARINGLABEL_H
14#define DISAPPEARINGLABEL_H
15
16#include <QLabel>
17#include <QTimer>
18
23class DisappearingLabel : public QLabel
24{
25 Q_OBJECT
26
27public:
32 explicit DisappearingLabel(QWidget *parent = nullptr);
33
40 void setTextWithTimeout(const QString &text, int timeoutMs);
41
42private:
43 QTimer m_timer;
45private slots:
49 void clearText();
50};
51
52#endif // DISAPPEARINGLABEL_H
The DisappearingLabel class is a subclass of QLabel that provides functionality to display text for a...
Definition disappearinglabel.h:24
void setTextWithTimeout(const QString &text, int timeoutMs)
Sets the text with a timeout duration.
Definition disappearinglabel.cpp:11