QGraphicsPage and link delegation



  • 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.



  • [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?



  • 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>



  • Ok, can you paste a complete testcase?



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



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

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



  • 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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.