This element is intended to be used as "click on empty areas
to dismiss" use case.
a MouseArea or a TapHandler are not enough for this, because Flickables
eat mouse events even tough no dragging would happen
this filters explicitly events of flickables to emit clicks when no drag
happened on them
Details
Details
- Reviewers
davidedmundson - Group Reviewers
Plasma - Commits
- R296:e634bda6331c: introduce FallbackTapHandler
have a listview as child of the FallbackTapHandler and delegates with
a mousearea. The handler will emit tapped only when the user taps on an empty area
of the listview, but not on tap of its delegates
Diff Detail
Diff Detail
- Repository
- R296 KDeclarative
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
src/qmlcontrols/kquickcontrolsaddons/fallbacktaphandler.cpp | ||
---|---|---|
72 | You're clearing before doing the tap evaluation which uses this | |
78 | I don't follow this line. Should it be < startDragDistance? | |
src/qmlcontrols/kquickcontrolsaddons/fallbacktaphandler.h | ||
50 | We need to update setAcceptedMouseButtons(Qt::LeftButton); when this changes |
src/qmlcontrols/kquickcontrolsaddons/fallbacktaphandler.cpp | ||
---|---|---|
51 | m_buttons = buttons or change the getter for acceptedButtons to call QQuickItem::acceptedMouseButtons |