NeTrainSim 0.1.1 beta
The Open-Source Network Trains Simulator
 
Loading...
Searching...
No Matches
DisappearingLabel Class Reference

The DisappearingLabel class is a subclass of QLabel that provides functionality to display text for a specified duration and then clear it. More...

#include <disappearinglabel.h>

Inheritance diagram for DisappearingLabel:

Public Member Functions

 DisappearingLabel (QWidget *parent=nullptr)
 Constructs a DisappearingLabel object.
 
void setTextWithTimeout (const QString &text, int timeoutMs)
 Sets the text with a timeout duration.
 

Detailed Description

The DisappearingLabel class is a subclass of QLabel that provides functionality to display text for a specified duration and then clear it.

Constructor & Destructor Documentation

◆ DisappearingLabel()

DisappearingLabel::DisappearingLabel ( QWidget *  parent = nullptr)
explicit

Constructs a DisappearingLabel object.

Parameters
parentThe parent widget.

Member Function Documentation

◆ setTextWithTimeout()

void DisappearingLabel::setTextWithTimeout ( const QString &  text,
int  timeoutMs 
)

Sets the text with a timeout duration.

The text will be displayed for the specified duration in milliseconds and then cleared.

Parameters
textThe text to display.
timeoutMsThe timeout duration in milliseconds.