FYI, I checked the qtabbar.cpp code in qtbase and there really is no easy way to prevent inactive tabs from being dragged and dropped. The tab the mouse press event happens in is made the current tab but you will not see the change until the end. We would have to override the event handler in QTabBar and selectively ignore some mouse move events and in the end it may not help at all.
Btw the event->pos() used to determine if drag distance is enough will be measured in qt window standard pixels and not true resolution pixels, so it will return different values on Windows based on the highdpi settings and environment variables and may feel different on different displays in multi display systems.
So you may want to use different minimum drag distances based on display resolution and highdpi settings for Windows.
This is probably why this is much more stable on macOS as it always uses standard pixels versus device pixels for cursor positions.
I could see changing the minimum drag distance setting to 25 from 50 just to see if it helps at all.
|