解决滑动问题
This commit is contained in:
parent
7e19f3e51d
commit
b500b1679b
|
@ -179,14 +179,21 @@ void ListItem::showDesktopNotify(const QString &message, QString soundName)
|
|||
void ListItem::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
qDebug()<<"[ListItem]"<<"mousePressEvent";
|
||||
if (event->button() == Qt::LeftButton) {
|
||||
onNetButtonClicked();
|
||||
} else if (event->button() == Qt::RightButton) {
|
||||
if (event->button() == Qt::RightButton) {
|
||||
onRightButtonClicked();
|
||||
}
|
||||
return QFrame::mousePressEvent(event);
|
||||
}
|
||||
|
||||
void ListItem::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
qDebug()<<"[ListItem]"<<"mouseReleaseEvent";
|
||||
if (event->button() == Qt::LeftButton) {
|
||||
onNetButtonClicked();
|
||||
}
|
||||
return QFrame::mouseReleaseEvent(event);
|
||||
}
|
||||
|
||||
void ListItem::enterEvent(QEvent *event)
|
||||
{
|
||||
// QPalette pal = qApp->palette();
|
||||
|
|
|
@ -98,6 +98,7 @@ public:
|
|||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
void mouseReleaseEvent(QMouseEvent *event);
|
||||
void enterEvent(QEvent *event);
|
||||
void leaveEvent(QEvent *event);
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
|
Loading…
Reference in New Issue