While dragging and dropping, it is possible for QAction to be triggered via shortcut. So far only tested it on Qt 5.4.1 and 5.12.3 since those are the builds we are using for our products. While some products might find it useful to be able to trigger shortcut during drag and drop, I find it more problematic given user can be triggering undo which might cause the QDrag to get destroyed if the undo action result in the parent QWidget getting destroyed which would cause the system to crash. Windows Explorer also seemingly to not support shortcut during drag and drop.
- Start the application below.
- Click on the tree view item and drag it around.
- While still holding the mouse button during the drag, hold down Ctrl and hit D a couple of times.
- You should see "Action triggered" getting printed to the console a few times.
The issue is intermittent, meaning I can hit the Ctrl+D shortcut 10 times and only see the action getting triggered occasionally (i.e. "Action triggered" is printed out less than 10 times).