Added workaround for QTBUG 30899

https://bugreports.qt-project.org/browse/QTBUG-30899