Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. QWebView and Javascript issue in PyQt
QtWS25 Last Chance

QWebView and Javascript issue in PyQt

Scheduled Pinned Locked Moved Qt WebKit
1 Posts 1 Posters 3.3k Views
  • 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 Offline
    A Offline
    anushree
    wrote on last edited by
    #1

    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
    0

    • Login

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