[Interest] Qt3D - QObjectPicker clicked vs. pressed

Mike Krus mike.krus at kdab.com
Sat Mar 18 14:49:22 CET 2017


Hi Andy

yes, I can confirm the behaviour you describe. A work around may be to track move events (by enabling dragging) and set a flag to ignore the click event? If picking is costly, you could combine the picker with a MouseDevice and track moves there without enabling dragging.

Mike

> On 17 Mar 2017, at 18:39, Andy <asmaloney at gmail.com> wrote:
> 
> I have an entity with a QObjectPicker component which only listens for the "clicked" signal. (Qt 5.9 git)
> 
> If I press the mouse down on an entity, drag the mouse, and then release the mouse, I would not expect to receive a "clicked" signal on that entity.
> 
> Given the docs, I would expect "entered", "pressed", and "exited" signals to fire and then "released" to fire for whatever entity the mouse is over.
> 
> Is the current behaviour working as intended? If so, how do I distinguish between a click on the entity and a click-drag using the clicked signal?
> 
> 
> Thank you for your time.
> 
> ---
> Andy Maloney  //  https://asmaloney.com
> twitter ~ @asmaloney
> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

--
Mike Krus | mike.krus at kdab.com | Senior Software Engineer
KDAB (UK) Ltd., a KDAB Group company
Tel: UK Office +44 1625 809908   Mobile +44 7833 491941
KDAB - The Qt Experts




More information about the Interest mailing list