emit clicked only on mouse release and only with left button
svn path=/trunk/KDE/kdelibs/; revision=1208161
This commit is contained in:
parent
f0793a0126
commit
5fd137c064
@ -203,8 +203,15 @@ void BusyWidget::resizeEvent(QGraphicsSceneResizeEvent *event)
|
||||
|
||||
void BusyWidget::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
emit clicked();
|
||||
event->setAccepted(true);
|
||||
}
|
||||
|
||||
void BusyWidget::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
if ((event->button() & Qt::LeftButton) ||
|
||||
(event->buttons() & Qt::LeftButton)) {
|
||||
emit clicked();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Plasma
|
||||
|
@ -85,6 +85,8 @@ protected:
|
||||
void hideEvent(QHideEvent *event);
|
||||
void resizeEvent(QGraphicsSceneResizeEvent *event);
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
|
||||
|
||||
protected Q_SLOTS:
|
||||
void timerEvent(QTimerEvent *event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user