Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.0.1
-
None
-
0a87552e8122cdda58160da2dd549da411d9093c
Description
When
setAcceptedMouseButtons(Qt::LeftButton);
in your QQuickItem, and then
void mousePressEvent(QMouseEvent *event) { qDebug()<<"mousePressEvent"<<event->button(); }
We got mousePressEvent fired when both, left and right mouse button down.
I mean, first, you press left buttton - it fires (and its ok).
Than, you press right button - and it fires too (Qt::RightButton fired).
When click each mouse button separately - it works properly.
P.S. I have attached an example - click on black area in top (left , and while holding it - right or middle button).
Attachments
For Gerrit Dashboard: QTBUG-31861 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
127128,9 | Fix QQuickItem's setAcceptedMouseButtons function | 5.6 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
181846,4 | Fix QQuickItem's setAcceptedMouseButtons function | tqtc/vxworks-5.5 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |
319655,3 | Don't send an item a mouse release with a button that it doesn't accept | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |