Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to clear the contents in the QWebView when clicking on a button to go back to the mainpage?
Forum Updated to NodeBB v4.3 + New Features

How to clear the contents in the QWebView when clicking on a button to go back to the mainpage?

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 2.2k Views 1 Watching
  • 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.
  • M Offline
    M Offline
    mkhpad
    wrote on last edited by
    #1

    Hi all,
    I am working on an application where i am in need of help:

    I am having a button in the main page.qml(main window) and when i click on it,it must go to the next page(.qml) where i have a webview as such:

    @
    ABC.qml:

    import QtQuick 1.0
    import com.nokia.symbian 1.1
    import QtWebKit 1.0

    Page {
    id: ab
    x: 0
    y: 0
    height:640
    width:360

    Flickable {
        width: 300; height: 600
        contentWidth: hg.width; contentHeight: hg.height
    
    WebView {
        id:hg
        url: "http://www.naukri.com"
        preferredHeight: 600
       preferredWidth : 360
        smooth: false
    
    }
    }    
    

    }

    @

    and in the click event i am having:
    @

    main.qml:

    onJobsClicked: {
    if (currentPage != "jobs")
    ABC.pushPage("jobs")

            currentPage = "jobs"
            header.headerText = "Jobs"
            jobsPage.visible = true
            stateIndexProperty = 2
            tab.visible = false
            showStandardListView()
    

    }

    JobsPage {
    id: jobsPage
    visible: false
    anchors.top: header.bottom
    width: screenWidth
    anchors.bottom: parent.bottom
    }

    @

    Clicking on the jobs button,its redirects me to the particular abc.qml,and displays the url.When i press the back button it does not clear the contents of the page.As a result,both page contents gets overlapped.When i flick it i can see the main page at back side.

    Anyone Please provide the solution for this?

    Regards,
    Harish

    Harish.M

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved