ClickLabel: rename clicked to leftClicked and only fire when left mouse button clicked
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
#include <QMouseEvent>
|
||||
#include "clicklabel.h"
|
||||
|
||||
void ClickLabel::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
emit clicked();
|
||||
if(event->button() == Qt::LeftButton)
|
||||
{
|
||||
emit leftClick();
|
||||
}
|
||||
return QLabel::mousePressEvent(event);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user