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. How to use QWebPage::OpenLinkInNewWindow?
Forum Updated to NodeBB v4.3 + New Features

How to use QWebPage::OpenLinkInNewWindow?

Scheduled Pinned Locked Moved Qt WebKit
2 Posts 2 Posters 1.4k 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.
  • N Offline
    N Offline
    nicky j
    wrote on last edited by
    #1

    Hey there,

    I would like my web browser to open a link in a new window and I noticed this: QWebPage::OpenLinkInNewWindow.
    I have connected the signal and slot, but I am unable to open the link. I believe this has to do with a limitation of the triggered() signal. Does anyone know how I can get the link to go to the slot?
    Heres the code:
    @
    connect(webView->pageAction(QWebPage::OpenLinkInNewWindow), SIGNAL(triggered()), mainView_object_pointer, SLOT(newWindowLink(QUrl url)));
    @

    thanks!

    1 Reply Last reply
    0
    • T Offline
      T Offline
      thebeast44
      wrote on last edited by
      #2

      haven't actually tried it, but I think what you're looking for is

      @
      QAction * QWebPage::action ( WebAction action ) const
      @
      and
      @
      void QAction::setData ( const QVariant & userData )
      @

      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