Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. Back navigation ("Backspace") bloked, but I can back to "about:blank" url.
Forum Updated to NodeBB v4.3 + New Features

Back navigation ("Backspace") bloked, but I can back to "about:blank" url.

Scheduled Pinned Locked Moved Unsolved QtWebEngine
1 Posts 1 Posters 598 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.
  • A Offline
    A Offline
    Andriy
    wrote on last edited by
    #1

    I have a little issue, that connected with "about:blanked" url and "Backspace" button navigation. I have window with web view. I need to clear web view, when I close a window. I use function like this -> loadHtml(""), to clear web view. Then, when I open this window again, I load new page, with normal url, for example "http://www.qt.io/". When I press "Backspace" button, I can successfully navigate to "about:blanked" page. Note, that i have solution applied(see code below), to block back/forward navigation, but this do not work, because there is no "navigationRequested", but always emits "urlChanged". Simple example here. Thanks for help!

    webView.onNavigationRequested: {
                if(request.navigationType === WebEngineView.BackForwardNavigation) {
                    print("onNavigationRequested", request.url)
                    request.action = WebEngineView.IgnoreRequest;
                }
            }
    
    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