-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mouseBeginDrag and mouseEndDrag don't work in some cases #20
Comments
The system-level mouse on the screen will never be moved by Spix (though I am working on something in that area ;) ), as Spix only pushes fake-events into the event queue of Qt. As a result, the Qt app will think that the mouse is in a different position than the actual mouse is. Do the examples work on your system? If they do, the issue might really be due to the delegate. In that case, calling the |
Thanks for the answer.
Then some of the fake signals are not working for me apparently. I agree, it's probably better to use that instead of setting up a virtual machine and everything.
Yes, all the examples except RemoteCtrl worked perfectly for me. I only had to add pthread to target_link_libraries for their CMakeLists, otherwise compilation would fail. None of the examples make use of dragging though. I'm using C++ instead of Python, but I've tried Python as well.
|
Okay, completely disregard all the stuff that I've written above. ;) I integrated Spix into one of the official Qt examples. The same bug happens there.
|
Thank you for the example! Indeed this doesn't look good, and I'm not sure why this is not working as expected. Another thing worth investigating would be if qt requires the mouse drag/drop events to be sent, as is done to simulate drops from the system onto a qtquick window (See QtEvents::extMouseDrop). However, these are usually associated with mime data and not qtquick objects. Probably the best way forward would be to have a look in the qt source code and see how drag&drop is actually handled there. |
@faaxm I don't really understand why you mislabeled my issue as a "question" and closed it. Didn't you confirm that this "doesn't look good" and that you're not sure "why this is not working as expected" in reponse to the official QML example that had the same problem? |
@jdu9 reopened issue to track potential progress |
When using python together with pyAutoGUI to control the mouse, this issue should be fixed. See the updated RemoteCtrl example in v0.2 |
Will close this issue, since this can be done with PyAutoGUI and system events now and I don't see a way to simulate a double-click purely by posting the right |
Hello,
I'm trying to integrate spix into my tests, but for some reason neither mouseBeginDrag nor mouseEndDrag move my mouse. Both functions activate drag mode, but if the mouse doesn't move on its own, it won't reach the target and therefore it doesn't actually accomplish anything.
It's weird because lib/src/Commands/DragBegin.cpp and lib/src/Commands/DragEnd.cpp already contain the following line:
env.scene().events().mouseMove(item.get(), midPoint);
OS: Arch Linux
Confirmed on X11 and Wayland
(QCursor::setPos doesn't work on Wayland anyway, therefore it can probably be ignored)
Edit: Maybe it's relevant that the objectNames I'm targetting are inside delegates. For the application, I'm using QGuiApplication and QQmlApplicationEngine, too. Simple clicking seems to work just fine (double click doesn't though, but I suspect that this would have to be implemented separately).
The text was updated successfully, but these errors were encountered: