Works as intended on Linux and Mac, with Qt 5.8.0 - 5.9.6 and the Cocoa as well as the XCB QPA plugins.
The patch applies to the 5.2 branch.
The patch appliesI'm taking off the WIP label because I haven't felt a need to the 5.1 branchchange anything in this patch since quite a while now.