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. [Solved] QWebKit: Difference between a link-clicked vs meta-refresh at loadStarted() signal
Forum Updated to NodeBB v4.3 + New Features

[Solved] QWebKit: Difference between a link-clicked vs meta-refresh at loadStarted() signal

Scheduled Pinned Locked Moved Qt WebKit
5 Posts 2 Posters 3.7k Views 1 Watching
  • 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.
  • B Offline
    B Offline
    bmahf
    wrote on 12 Oct 2010, 16:57 last edited by
    #1

    Hi all,

    I am modifying software for my company, written around QWebKit, and have a very specific question about the use of the QWebPage::loadStarted() signal. I can see 2 ways I could get that signal sent to me: Link clicked or meta-refresh (using the tag <meta http-equiv="refresh" content="5"> in the head area). The problem I am having is I need to know the difference, but am connecting to a signal that has no parameters. Can anyone tell me how I can find out whether the signal was received as a result of a clicked link versus a meta refresh? This is pretty important. I need to react differently (if ever so slightly) in each case.

    Thanks...

    1 Reply Last reply
    0
    • B Offline
      B Offline
      benjamin.poulain
      wrote on 13 Oct 2010, 09:20 last edited by
      #2

      What about subclassing QWebPage and using acceptNavigationRequest()? I think the NavigationType should give you enough information.

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bmahf
        wrote on 13 Oct 2010, 12:32 last edited by
        #3

        Brilliant! I hadn't picked up on that protected function. I'll check it out. Thanks.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          bmahf
          wrote on 13 Oct 2010, 15:39 last edited by
          #4

          Fixed my problem. Thanks for the pointer.

          1 Reply Last reply
          0
          • B Offline
            B Offline
            benjamin.poulain
            wrote on 13 Oct 2010, 15:57 last edited by
            #5

            [quote author="bmahf" date="1286984397"]Fixed my problem. Thanks for the pointer.[/quote]

            Great. I am glad it helps.

            1 Reply Last reply
            0

            1/5

            12 Oct 2010, 16:57

            • Login

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