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

iframe content not loading on QT 5.9.1



  • Hi I am developing an application which integrates C++, python and Qt but it needs to run in two versions, the first one is more updated and uses QT 5.12 and is working properly but in the "older" version QT 5.9.1 the iframe in the qwebengine page is not showing up.

    I am using a tensorboard to generate the data and start a webpage that I can perfectly access through my browser, however when I am embedding it using qwebengine, the header of the page loads but the Iframe does not. Different from the Qt 5.12 which works like a charm with the same set of functions.

    I believe it has some connection with the qwebengine trying to access the files in my computer location however I have no idea how to fix that. Any clue?


  • Moderators

    @ppmm said in iframe content not loading on QT 5.9.1:

    I am using a tensorboard to generate the data and start a webpage that I can perfectly access through my browser, however when I am embedding it using qwebengine, the header of the page loads but the Iframe does not. Different from the Qt 5.12 which works like a charm with the same set of functions.

    Since the Chromium version is updated along with Qt versions it might be a bug.

    Try to inspect what happens on the webpage using the dev-tools.
    Set the parameter or env-variable and connect with a Desktop Chrome Browser to the specified port.
    Check for JS errors and console output.



  • @raven-worx Hi, thanks for the answer.

    As I use the Qt inside a C++ build I am not sure how to pass arguments as

    --remote-debugging-port=<port_number>
    

    the only way I could pass it was using the

    qputenv("QTWEBENGINE_REMOTE_DEBUGGING ", "1050")
    

    I was able to open the debug page and selecte the inspectable page from the tensorboard, but it was entirely blank.

    I considered that passing the argument

    --disable-web-security
    

    could be the solution but I have no clue how to pass the arguments if I do not call my Qt directly but it is build inside C++ .dll, is there any guidance in how to pass this kind of argument for Qt being called in c++ ?


  • Moderators

    @ppmm
    any other webengine flags can also be set via an env variable, also described on the link i've posted...

    Beside that: you can pass these parameters as simple arguments to the calling application. QtWebEngine gets the parameters from the QApplication instance (which should anyway get the parameters in the main() function normally)

    Regarding the blank page:
    What Desktop Chrome version are you using?
    Since v80 onwards you may want to start an instance with the following parameter:
    chrome.exe --enable-blink-features=ShadowDOMV0,CustomElementsV0

    Hint: If you try to debug from a different machine you may rather want to set it to:
    QTWEBENGINE_REMOTE_DEBUGGING=0.0.0.0:1050


Log in to reply