René, maybe this helps you a bit: https://codereview.qt-project.org/#/c/111056/ It's only a incomplete copy and paste of your Qt 4 patch, but it could show you the direction. Peter