ishowclicklabel.cpp 453 Bytes
#include "ishowclicklabel.h"

IShowClickLabel::IShowClickLabel(QWidget *parent) :
    QLabel(parent)
{
    isIn = false;
}

void IShowClickLabel::mousePressEvent(QMouseEvent *ev)
{
    isIn = true;
}

void IShowClickLabel::mouseReleaseEvent(QMouseEvent *ev)
{
    if(isIn)
    {
        emit clicked();
    }
}

void IShowClickLabel::mouseMoveEvent(QMouseEvent *ev)
{

}

void IShowClickLabel::enterEvent()
{

}

void IShowClickLabel::leaveEvent()
{

}