Results 1 to 5 of 5

Thread: Why the QWebView does not execute the script on this webpage?

  1. #1
    Join Date
    Jan 2013
    Posts
    13
    Thanks
    4

    Default Why the QWebView does not execute the script on this webpage?

    Here is the code from the MainWindow constructor:
    Qt Code:
    1. view = new QWebView(this);
    2. view->load(QUrl("http://checkusernames.com/"));
    To copy to clipboard, switch view to plain text mode 
    The page loads fine and there is a script on that page which is supposed to be executed when the "Check User Name" button is clicked (manually). It executes fine in IE and FireFox, but in the QWebView nothing happens. My question is: Why this script is not executed in the QWebView?
    I have the WebAttribute JavascriptEnabled set to true...

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Why the QWebView does not execute the script on this webpage?

    So it doesn't work if you click on the button, yes?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2013
    Posts
    13
    Thanks
    4

    Default Re: Why the QWebView does not execute the script on this webpage?

    yes, when you click on the button nothing happens.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Why the QWebView does not execute the script on this webpage?

    It doesn't mean the script didn't execute. Fire up the web inspector and check there, maybe you'll get some more info.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jan 2013
    Posts
    13
    Thanks
    4

    Default Re: Why the QWebView does not execute the script on this webpage?

    I did activated the web inspector, but I'm not sure I have enough knowledge to determine where the problem might be.
    I see one script error:
    TypeError: 'null' is not an object (evaluating 'b.each') - cloudflare.min.js:22
    but it does not seam to be related to the script that is supposed to be executed when the button is clicked.
    I would really appreciate some more help on this.

Similar Threads

  1. Cannot open webpage with QWebView
    By szyema in forum Qt Programming
    Replies: 10
    Last Post: 27th February 2012, 11:04
  2. QWebView - Showing portion of a webpage.
    By TemplarKnight in forum Qt Programming
    Replies: 3
    Last Post: 7th October 2011, 01:11
  3. How execute a script in a Qt aplication?
    By Gerard in forum Qt for Embedded and Mobile
    Replies: 8
    Last Post: 7th September 2011, 15:11
  4. How can i execute a database script within Qt?
    By NoRulez in forum Qt Programming
    Replies: 3
    Last Post: 14th January 2010, 09:37
  5. How to Execute Qt script from Qt
    By vishal.chauhan in forum Qt Programming
    Replies: 1
    Last Post: 7th May 2007, 10:12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.