Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

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

    Qt WebKit
    1
    2
    1947
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      Ghost last edited by

      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?

      Bhoot

      1 Reply Last reply Reply Quote 0
      • G
        Ghost last edited by

        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.":https://qt-project.org/forums/viewthread/30729/
        Hence, this whole confusion arose.

        Anyway, I am marking this thread as solved.

        Bhoot

        1 Reply Last reply Reply Quote 0
        • First post
          Last post