2019-04-30 12:40:28 +02:00
|
|
|
#include <QMouseEvent>
|
2018-08-12 16:45:39 +02:00
|
|
|
#include "clicklabel.h"
|
|
|
|
|
|
|
|
void ClickLabel::mousePressEvent(QMouseEvent *event)
|
|
|
|
{
|
2019-04-30 12:40:28 +02:00
|
|
|
if(event->button() == Qt::LeftButton)
|
|
|
|
{
|
|
|
|
emit leftClick();
|
|
|
|
}
|
2021-03-07 21:12:50 +01:00
|
|
|
if(event->button() == Qt::RightButton)
|
|
|
|
{
|
|
|
|
emit rightClick();
|
|
|
|
}
|
2019-04-30 12:40:28 +02:00
|
|
|
return QLabel::mousePressEvent(event);
|
2018-08-12 16:45:39 +02:00
|
|
|
}
|