You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
488 B
C++
29 lines
488 B
C++
#include "clabel.h"
|
|
|
|
#include <QDebug>
|
|
|
|
|
|
cLabel::cLabel(const QString &text, QWidget *parent, Qt::WindowFlags f) :
|
|
QLabel(text, parent, f)
|
|
{
|
|
this->setMouseTracking(true);
|
|
this->setAttribute(Qt::WA_Hover);
|
|
}
|
|
|
|
cLabel::cLabel(QWidget *parent, Qt::WindowFlags f) :
|
|
QLabel(parent, f)
|
|
{
|
|
this->setMouseTracking(true);
|
|
this->setAttribute(Qt::WA_Hover);
|
|
}
|
|
|
|
void cLabel::enterEvent(QEvent* /*ev*/)
|
|
{
|
|
emit(windowEntered());
|
|
}
|
|
|
|
void cLabel::leaveEvent(QEvent* /*ev*/)
|
|
{
|
|
emit(windowLeft());
|
|
}
|