Important: Please read the Qt Code of Conduct -

[Solved] QML WebView Error: Cannot assign to non-existent property "onLoadFinished"

  • In order to try out the latest Qt Quick Controls that came with Qt 5.1, I started making a barebones browser. Here is the code snippet that shows WebView in action:
    import QtWebKit 3.0
    import QtQuick 2.0
    import QtQuick.Controls 1.0
    import QtQuick.Layouts 1.0

    WebView {
    id: browser
    Layout.fillHeight: true
    Layout.fillWidth: true
    url: ""

    onLoadStarted: { loadingStatus.text = "Loading url.text" }
    onLoadFinished: { loadingStatus.text = "Loading done." }

    Executing this gives me an error:
    @ Cannot assign to non-existent property "onLoadFinished" @

    What am I missing here?
    P.S.: I am using import QtWebKit 3.0 here. Is that a concern?

  • Ok. Later on, I discovered that QtWebKit 3.0's WebView, indeed, doesnt have property "onLoadFinished". It, along with onLoadStarted, has been replaced by onLoadingChanged property.
    However, Qt Creator coughs a supposed syntax error when using that, as apparent by "this post of mine.":
    Hence, this whole confusion arose.

    Anyway, I am marking this thread as solved.

Log in to reply