Qt Forum

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

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    QWebView and Javascript issue in PyQt

    Qt WebKit
    1
    1
    3119
    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.
    • A
      anushree last edited by

      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
      <html>

      <HEAD>

      [removed]

      function location(){

      var myloc = "file:///abc/abc1/"
      alert(myloc);

      [removed]=myloc;

      }

      // End -->

      [removed]

      </HEAD>

      <BODY>
      </body>

      </html>

      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,
      Anu

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