Important: Please read the Qt Code of Conduct -

QWebView and Javascript issue in PyQt

  • Hi,
    I have made HTML page (sample.html)divided into two parts which contain links(introduction,content,etc) on one side and other side info related to it.On click of the links corresponding html page(introduction.html,content.html) get open but I am facing one problem:
    On click of one link(description) there is some javascript code written (in description.html) which do the following



    function location(){

    var myloc = "file:///abc/abc1/"



    // End -->





    Tht javascript code is to show the items present on that folder path(abc1).

    Question is:
    I am using QWebView and its opening my html page(sample.html) but when i click on link(description) which open tht javascript code is not working..blank page was showing.
    Can anyone tell what is the problem is it in my javascript which QwebView is not supporting and suggestion on this issue.
    I have also enabled this in my code:
    self.webView.settings().setAttribute(QtWebKit.QWebSettings.JavascriptCanOpenWindows, True)

    Thanks & Regards,

Log in to reply