Qt Forum

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

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

    Qt WebKit
    2
    5
    3336
    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.
    • B
      bmahf last edited by

      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 Reply Quote 0
      • B
        benjamin.poulain last edited by

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

        1 Reply Last reply Reply Quote 0
        • B
          bmahf last edited by

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

          1 Reply Last reply Reply Quote 0
          • B
            bmahf last edited by

            Fixed my problem. Thanks for the pointer.

            1 Reply Last reply Reply Quote 0
            • B
              benjamin.poulain last edited by

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

              Great. I am glad it helps.

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