TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
ttkclickedlabel.cpp
Go to the documentation of this file.
1 #include "ttkclickedlabel.h"
2 
3 #include <QMouseEvent>
4 
6  : QLabel(parent)
7 {
8  setCursor(Qt::PointingHandCursor);
9 }
10 
11 TTKClickedLabel::TTKClickedLabel(const QString &text, QWidget *parent)
12  : QLabel(text, parent)
13 {
14  setCursor(Qt::PointingHandCursor);
15 }
16 
17 void TTKClickedLabel::mousePressEvent(QMouseEvent *event)
18 {
19 // QLabel::mousePressEvent(event);
20  if(event->button() == Qt::LeftButton)
21  {
22  Q_EMIT clicked();
23  }
24 }
TTKClickedLabel(QWidget *parent=nullptr)
virtual void mousePressEvent(QMouseEvent *event) overridefinal