Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt QWebView White Screen After Codesign For App Store



  • Env: Qt 5.2 rc1 QML Mixed with C++ backend on 10.8 MBPro
    Issue: Qt QWebView White Screen After Codesign For App Store

    For speed and deployment purposes, I used QWebView on the C++ side to display websites such as "http://www.google.com". The webpage is displayed properly during development and even after I used macdeployqt for deployment. However, as soon as I issued codesign on the individual Qt libraries and package, the QWebView shows white screen.

    Various debugging steps I tried:

    • QWebView window showed. Right click shows refresh context menu. But shows white screen.
    • None of the QWebView signals was emitted.
    • Turned on QT_DEBUG_PLUGINS. Shows all library and plugin loads correctly
    • Comment out codesign build steps, rebuild, and QWebView works fine.
    • Tried Qt 5.1.1 and 5.2.0 rc1. Same issue.

    The codesign build steps in .pro is the following
    codesign.commands += codesign -f -s $${APPCERT} -i $${BUNDLEID} "$${TARGET}.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore"; codesign.commands += codesign -f -s $${APPCERT} -v --entitlements misc/MyEntitlements.plist "$${TARGET}.app";

    Any help, pointers, or suggestions would be much appreciated. Thanks in advance.



  • It seems so obvious now, yet I was stuck for hours. In the Entitlements.plist, I need to add com.apple.security.network.client for network access.

    QWebView white screen because there is not internet connection.


Log in to reply