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



  • 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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.