解决滑动问题
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)
|
void ListItem::mousePressEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
qDebug()<<"[ListItem]"<<"mousePressEvent";
|
qDebug()<<"[ListItem]"<<"mousePressEvent";
|
||||||
if (event->button() == Qt::LeftButton) {
|
if (event->button() == Qt::RightButton) {
|
||||||
onNetButtonClicked();
|
|
||||||
} else if (event->button() == Qt::RightButton) {
|
|
||||||
onRightButtonClicked();
|
onRightButtonClicked();
|
||||||
}
|
}
|
||||||
return QFrame::mousePressEvent(event);
|
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)
|
void ListItem::enterEvent(QEvent *event)
|
||||||
{
|
{
|
||||||
// QPalette pal = qApp->palette();
|
// QPalette pal = qApp->palette();
|
||||||
|
|
|
@ -98,6 +98,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void mousePressEvent(QMouseEvent *event);
|
void mousePressEvent(QMouseEvent *event);
|
||||||
|
void mouseReleaseEvent(QMouseEvent *event);
|
||||||
void enterEvent(QEvent *event);
|
void enterEvent(QEvent *event);
|
||||||
void leaveEvent(QEvent *event);
|
void leaveEvent(QEvent *event);
|
||||||
void paintEvent(QPaintEvent *event);
|
void paintEvent(QPaintEvent *event);
|
||||||
|
|
Loading…
Reference in New Issue