Unfortunately not. The error was nested too deep inside Qt code. Because of that I switched to non-native titlebars.