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. The browser does not follow some links

The browser does not follow some links

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 6 Posters 696 Views 2 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.
  • M Offline
    M Offline
    Mikeeeeee
    wrote on last edited by
    #1

    Hi!
    I made browser.
    The browser does not follow some links.
    I use QWebEngineView.
    How to fix?

    ODБOïO J.HilkJ 2 Replies Last reply
    0
    • M Mikeeeeee

      Hi!
      I made browser.
      The browser does not follow some links.
      I use QWebEngineView.
      How to fix?

      ODБOïO Offline
      ODБOïO Offline
      ODБOï
      wrote on last edited by
      #2

      @Mikeeeeee said in The browser does not follow some links:

      How to fix ?

      make sure it follows every link...

      1 Reply Last reply
      2
      • M Mikeeeeee

        Hi!
        I made browser.
        The browser does not follow some links.
        I use QWebEngineView.
        How to fix?

        J.HilkJ Offline
        J.HilkJ Offline
        J.Hilk
        Moderators
        wrote on last edited by
        #3

        @Mikeeeeee
        3 words: rubber duck debugging

        0_1559567801714_b5b4f1ba-b9eb-4e9b-b19f-397b2358296c-image.png


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        1 Reply Last reply
        7
        • M Offline
          M Offline
          Mikeeeeee
          wrote on last edited by
          #4

          The browser does not follow advertising links. When you click on the link banner ad nothing happens. I use the compiler MSVC 2017 64 bit.

          JonBJ 1 Reply Last reply
          0
          • M Mikeeeeee

            The browser does not follow advertising links. When you click on the link banner ad nothing happens. I use the compiler MSVC 2017 64 bit.

            JonBJ Online
            JonBJ Online
            JonB
            wrote on last edited by
            #5

            @Mikeeeeee
            Start by looking at the source of whatever links don't work, and see if there is anything unusual about them. The C++ compiler you used should not be of any relevance.

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

              Seems very similar to this

              1 Reply Last reply
              0
              • M Offline
                M Offline
                Mikeeeeee
                wrote on last edited by
                #7

                I seem to have that problem. The author make it so:
                I have fixed it by reimplementing QWebEnginePage.

                appwebenginepage.cpp

                QWebEnginePage *AppWebEnginePage::createWindow(QWebEnginePage::WebWindowType)
                {
                    return this;
                }
                

                And added the page to the QWebEngineView.

                browserTest = new QWebEngineView(browserTab);
                AppWebEnginePage *webPage = new AppWebEnginePage();
                browserTest->setPage(webPage);
                Now it opens all links in the QWebEngineView window.
                

                But I didn't know how to do it. Please explain.

                1 Reply Last reply
                0
                • mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Hi
                  You should create your own version of a QWebEnginePage
                  In his sample its called AppWebEnginePage

                  and in that new class, you should override the virtual function
                  https://doc.qt.io/qt-5/qwebenginepage.html#createWindow
                  as shown.

                  and then add your page to the Engine. (instead)

                  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