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

QWebEngineView does not work FORM METHOD='POST' ACTION OSX 10.14+



  • On OSX10.13 and previous and on Windows
    App loads a local html file into a QWebEngineView.
    Local page displays as expected.
    There is a button to click defined with a FORM METHOD='POST' block
    When the button is clicked, the loadProgress event fires
    loadProgress reaches 100%
    The loadFinished event fires when the secure form has loaded
    The secure purchase form is loaded and displayed allowing user input

    On OSX 10.14+
    App loads a local html file into a QWebEngineView.
    Local page displays as expected.
    There is a button to click defined with a FORM METHOD='POST' block
    When the button is clicked, the loadProgress event fires
    loadProgress reaches 100%
    The loadFinished event NEVER FIRES to indicate secure form has loaded
    The secure purchase form is NOT DISPLAYED..JUST BLANK SCREEN

    Manually loading the html file with any browseron both OSX10.13 and OSX10.14 works fine. Secure form is displayed when FORM METHOD='POST' button pressed for both OSes.

    The above method has been working for 8 years. It has worked on QWebKit and QWebEngine until the release of OSX10.14.

    What has changed to make QWebEngineView malfunction?

    Does QWebEngineView not handle JS code when run on OSX10.14???



  • So I added code to the app to dump html to a log file when the loadFinished event fires.

    On OSX10.13.6.6 it works as expected.

    When the same Qt code is run on 10.14.6 a timer must be set on loadProgress==100% and the app fires loadFinished on timer expiry. The app runs through the loadFinished code as one would expect. BUT..the line of code to dump html is not executed or is prevented from running.

    The saveHTML signal should fire and call ProcessHTML to display debug output..even if the html is "". The toHtml() function is asynchronous, but I don't see how that makes a difference.

    ui->webView->page()->toHtml([this](const QString& result) mutable {emit saveHTML(result);});
    

    The setup for the above line of code is:

    signals:
      void saveHTML( QString html );
    
    void frmBuyIt::ProcessHTML( QString html )
    {
      #if DEBUG_BUYITurl
      qDebug() << "frmBuyIt::ProcessHTML" << html;
      #endif
    }
    
    connect(this, SIGNAL(saveHTML(QString)), this, SLOT(ProcessHTML(QString)));
    


  • A QtWebEngineProcess entitlement and signing issue.

    https://forum.qt.io/topic/102212/qtwebengine-signing-issues/12


Log in to reply