Results 1 to 2 of 2

Thread: QWebEngineProfile question.

  1. #1
    Join Date
    Jul 2012
    Posts
    201
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default QWebEngineProfile question.

    So I have this QWebEnginePage object that loads a web page and I linked it to this QWebEngineProfile object where I have injected JavaScripts for the page object. The scripts are suppose to run on page loadFinished signal, which is working just fine. The intention is to run certain javascripts on the webpage's home page and completely different javascripts when I redirect to a different link on the page but it seems like the scripts that are loaded on the profile object will run regardless of what web page is currently opened. I there a way to avoid this?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QWebEngineProfile question.

    The goal of the script collection in the profile is to inject them into all pages that share this profile, if you trigger them on all pages is up to you.
    Alternatively the scripts themselves could check if the should run given the current page's context.

    Cheers,
    _

Similar Threads

  1. question about xmpp (different question)
    By davinciomar in forum Newbie
    Replies: 9
    Last Post: 6th September 2016, 13:52
  2. Some question in example
    By jhowliu in forum Qt Programming
    Replies: 3
    Last Post: 9th August 2013, 16:24
  3. rcc question
    By mojo2000 in forum Newbie
    Replies: 13
    Last Post: 18th November 2009, 22:26
  4. Question
    By KyrinComa in forum General Discussion
    Replies: 5
    Last Post: 19th May 2006, 01:36

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.