danielhrisca / asammdf

Fast Python reader and editor for ASAM MDF / MF4 (Measurement Data Format) files
GNU Lesser General Public License v3.0
655 stars 226 forks source link

Rework drag and drop in tests #1056

Closed tov101 closed 4 months ago

tov101 commented 4 months ago

Seems that in newer versions of PySide, drag and drop operations used for tests are not working anymore.

After some digging in Qt, it seems that exec method from QDrag object is a blocking method for Windows and non-blocking on Linux only if there is no payload (no mime data).

Cloning event that is provided as parameter for drag and drop functionalities is not possible:

The proposed implementation use win32api and pyautogui for Windows and Linux platforms and will physically move the mouse cursor. Note: Even if pyautogui can be used for both platforms Windows and Linux, I choose to use the win32api because it significantly faster.

Timings present in implementation were fine tuned and may impact test results if there are changed.