Re: [Interest] Track global mouse position in QML

2019-03-25 Thread Jérôme Godbout
o, model, type declaration and controller with business logic). That may differ since the line is blur sometime. From: Interest On Behalf Of Jérôme Godbout Sent: March 22, 2019 2:18 PM To: René Hansen Cc: interest Subject: Re: [Interest] Track global mouse position in QML import QtQui

Re: [Interest] Track global mouse position in QML

2019-03-23 Thread Uwe Rathmann
On 3/21/19 2:36 PM, René Hansen wrote: And it's not all too bad, but if anyone can tell me of a more dogmatic QtQuick based approach, please let me know. Qt/Quick applications are always a combination of C++ and QML and making use of the C++ part is absolutely not bad. If something is

Re: [Interest] Track global mouse position in QML

2019-03-22 Thread Jérôme Godbout
g. From: René Hansen Sent: March 22, 2019 5:24 AM To: Jérôme Godbout Cc: Jason H ; interest Subject: Re: [Interest] Track global mouse position in QML Imagine this example: import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 2.5 Window { visible: true width: 640 heig

Re: [Interest] Track global mouse position in QML

2019-03-22 Thread Shawn Rutledge
> On 21 Mar 2019, at 15:05, Jérôme Godbout wrote: > > Why not use a MouseArea or the new HoverHandler. Yes HoverHandler should work, as long as event propagation doesn’t stop before it gets there… i.e. if you have trouble with that, put it inside an Item that is on top of the rest.

Re: [Interest] Track global mouse position in QML

2019-03-22 Thread René Hansen
3 ext.:109 > > amotus.ca <http://www.amotus-solutions.com/> > statum-iot.com > > <https://www.facebook.com/LesSolutionsAmotus/> > <https://www.linkedin.com/company/amotus-solutions/> > <https://twitter.com/AmotusSolutions> > <https://www.youtube.com/chann

Re: [Interest] Track global mouse position in QML

2019-03-21 Thread Jérôme Godbout
TestRect.dispatchTouchEvent(mouseX, mouseY) } onMouseYChanged: { touchTestRect.dispatchTouchEvent(mouseX, mouseY) } } Sent: Thursday, March 21, 2019 at 7:50 AM From: "René Hansen" mailto:ren...@gmail.com>> To: interest mailto:interest@qt-project.org>> Subject: [Interest] Tr

Re: [Interest] Track global mouse position in QML

2019-03-21 Thread Jason H
hTestRect.dispatchTouchEvent(mouseX, mouseY) } } Sent: Thursday, March 21, 2019 at 7:50 AM From: "René Hansen" To: interest Subject: [Interest] Track global mouse position in QML Hi all,     I want to track mouse movement within my entire application window, because I need to sho

Re: [Interest] Track global mouse position in QML

2019-03-21 Thread Jérôme Godbout
> [cid:image005.png@01D4DFCD.9DD2E1C0] <https://twitter.com/AmotusSolutions> [cid:image006.jpg@01D4DFCD.9DD2E1C0] <https://www.youtube.com/channel/UCoYpQgsmj1iJZyDjTQ3x8Ig> From: Interest On Behalf Of René Hansen Sent: March 21, 2019 9:36 AM To: interest Subject: Re: [Interest

Re: [Interest] Track global mouse position in QML

2019-03-21 Thread René Hansen
For now I'm doing this: class MouseTrackableWindow : public QQuickWindow { Q_OBJECT public: void mouseMoveEvent(QMouseEvent *event) override { QQuickWindow::mouseMoveEvent(event); emit mouseMove(event->windowPos()); } signals: void mouseMove(QPointF mouse); }; ...

[Interest] Track global mouse position in QML

2019-03-21 Thread René Hansen
Hi all, I want to track mouse movement within my entire application window, because I need to show/hide/move items around where my cursor is at certain times. (Think e.g. custom cursor) I can do it easily by filling the entire window with a *MouseArea* and handle *onPositionChanged*. The