Get mouse position of the QDragEnterEvent
-
17-06-2021 - |
Question
As the photo below shows, I want to get the mouse position on the canvas while dropping a QListWidgetItem to the canvas, this mouse position will facilitate to me getting the object I dropped the item on.
More explanation: The dragging and dropping will be in my canvas class, I want to check if the dragging and dropping is from the QListWidgetItems, and if so it will get the current mouse position.
Solution
QDragEnterEvent inherits from QDropEvent.
Have you tried...pos()?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow