Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QWebView showing only one web page

QWebView showing only one web page

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.3k 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
    Beka
    wrote on last edited by
    #1

    I have a problem, a need to show only one webpage and user cant go to other links, is it possible?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      guziemic
      wrote on last edited by
      #2

      Hi,

      I think that it is possible. I do not know exactly which way is the best, but you can try following

      reimplement QWebPage::mousePressEvent(QMouseEvent*) and check what element was clicked by the user. In case of hyper link you can ignore event in other case pass it to QWebView

      set link delegation policy of QWebPage to DelegateAllLinks and then react on linkClicked() signal. Probably during handling of this signal you could stop loading of new page.

      BR,

      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