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. QGraphicsPage and link delegation

QGraphicsPage and link delegation

Scheduled Pinned Locked Moved Qt WebKit
7 Posts 4 Posters 2.6k 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.
  • B Offline
    B Offline
    bunjee
    wrote on last edited by
    #1

    Greetings Trolls,

    I'm connected to "void linkClicked(const QUrl &url);" from my QGraphicsWebView webpage.

    I also set the following:
    @page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);@

    It appears that I don't get noticed everytime the user clicks a link.
    For instance if it's a link opening in a new window my slot does not appearr to be called.

    Is there a workaround to get notified everytime ?

    Edit: nice glitch inside the Code block :D.

    Thanks.

    B.A.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on last edited by
      #2

      [quote]
      For instance if it’s a link opening in a new window my slot does not appearr to be called.
      [/quote]

      Do you have any testcase for this behaviour? Is this "link opening in a new window" implemented using the <a> target attribute or using javascript?

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bunjee
        wrote on last edited by
        #3

        bq. Is this “link opening in a new window” implemented using the <a> target attribute or using javascript?

        This kind of link :

        <a href='http://www.warriorlabs.net/' class='bbc_url' title='External link' rel='nofollow external'>link</a>

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dangelog
          wrote on last edited by
          #4

          Ok, can you paste a complete testcase?

          Software Engineer
          KDAB (UK) Ltd., a KDAB Group company

          1 Reply Last reply
          0
          • B Offline
            B Offline
            benjamin.poulain
            wrote on last edited by
            #5

            I think what you are looking for is QWebPage::acceptNavigationRequest(), not link delegation.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mgran
              wrote on last edited by
              #6

              [quote author="bunjee" date="1296339357"]Edit: nice glitch inside the Code block :D.[/quote]

              Cheers, fix should go live in about two days :)

              Project Manager - Qt Development Frameworks

              1 Reply Last reply
              0
              • B Offline
                B Offline
                bunjee
                wrote on last edited by
                #7

                bq. I think what you are looking for is QWebPage::acceptNavigationRequest(), not link delegation.
                Thanks Benjamin,

                Looks like I have to subclass QWebPage ! :-)

                bq. Cheers, fix should go live in about two days

                Perfect, it's fixed on my side.

                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