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. Open New Window signal in ActiveQt
Qt 6.11 is out! See what's new in the release blog

Open New Window signal in ActiveQt

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 2 Posters 2.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
    Neel Patel
    wrote on last edited by
    #1

    Hi,

    How can i get the signal to open the link in new tab.
    I am using QTabWidget and i do not want to open it in IE browser. I want to catch the signal in ActiveQt and open the new tab in QTabWidget.

    Can you please give me signal handler in ActiveQt (QAxWidget) ?

    Thanks in Advance.

    mrjjM 1 Reply Last reply
    0
    • N Neel Patel

      Hi,

      How can i get the signal to open the link in new tab.
      I am using QTabWidget and i do not want to open it in IE browser. I want to catch the signal in ActiveQt and open the new tab in QTabWidget.

      Can you please give me signal handler in ActiveQt (QAxWidget) ?

      Thanks in Advance.

      mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Neel-Patel said in Open New Window signal in ActiveQt:

      Hi
      Its a bit unclear what you try
      there is this example
      http://doc.qt.io/qt-5/activeqt-activeqt-webbrowser-example.html

      I think it will fire
      void on_WebBrowser_BeforeNavigate();
      when you click on a link.

      N 1 Reply Last reply
      2
      • mrjjM mrjj

        @Neel-Patel said in Open New Window signal in ActiveQt:

        Hi
        Its a bit unclear what you try
        there is this example
        http://doc.qt.io/qt-5/activeqt-activeqt-webbrowser-example.html

        I think it will fire
        void on_WebBrowser_BeforeNavigate();
        when you click on a link.

        N Offline
        N Offline
        Neel Patel
        wrote on last edited by Neel Patel
        #3

        @mrjj said in Open New Window signal in ActiveQt:

        on_WebBrowser_BeforeNavigate

        There is no callback fired. I took the reference for this example only. When we set any URL on link and open that link then currently it is opening by default in IE browser. But i want to handle it my own rather than opening in IE browser. How to do that ?

        mrjjM 1 Reply Last reply
        0
        • N Neel Patel

          @mrjj said in Open New Window signal in ActiveQt:

          on_WebBrowser_BeforeNavigate

          There is no callback fired. I took the reference for this example only. When we set any URL on link and open that link then currently it is opening by default in IE browser. But i want to handle it my own rather than opening in IE browser. How to do that ?

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Neel-Patel said in Open New Window signal in ActiveQt:

          I took the reference for this example only.

          Im not sure what you mean.

          Did you connect to your own slot and checked ?

          1 Reply Last reply
          0
          • N Offline
            N Offline
            Neel Patel
            wrote on last edited by
            #5

            Hi mrjj,

            Yes , i have checked with own slot and it is working fine.

            Let me explain with "webbrowser" example which is available in Qt source code in ActiveQt.

            Currently - when we compile and run "webbrowser" example, by default it opens "qt.io" website in QAxWidget. Now go to textedit and change the URL to "www.news.google.com" and then go. So it will display news website data. Now click on any link - it open the new IE instance.

            Here, there is no code to open in new IE browser. How can i catch this signal in webbrowser sample application so that i can open in new tab of QTabWidget instead of new IE instance.

            Let me know if you still need explanation.

            mrjjM 1 Reply Last reply
            0
            • N Neel Patel

              Hi mrjj,

              Yes , i have checked with own slot and it is working fine.

              Let me explain with "webbrowser" example which is available in Qt source code in ActiveQt.

              Currently - when we compile and run "webbrowser" example, by default it opens "qt.io" website in QAxWidget. Now go to textedit and change the URL to "www.news.google.com" and then go. So it will display news website data. Now click on any link - it open the new IE instance.

              Here, there is no code to open in new IE browser. How can i catch this signal in webbrowser sample application so that i can open in new tab of QTabWidget instead of new IE instance.

              Let me know if you still need explanation.

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Neel-Patel said in Open New Window signal in ActiveQt:

              Ahh. I see. Sadly that is handled by the Internet Explorer ActiveX so I think you will have to dig into that api to find out if possible.

              https://msdn.microsoft.com/en-us/library/aa752127(v=vs.85).aspx

              It seems that it does forward the signals ( when clicking a link) but you cannot stop it from happening . ( or i do not see how)

              update:
              it does seem possible
              https://www.experts-exchange.com/questions/21265909/IWebBrowser2-best-way-to-intercept-navigation-and-modify-the-HTTP-headers.html

              1 Reply Last reply
              1
              • N Offline
                N Offline
                Neel Patel
                wrote on last edited by
                #7

                Hi mrjj,

                Thank you for the update.

                I have tried with different "IWebBrowserEvent2" interfaces but not able to find how to receive that events with Qt's COM interface.
                I have tried with installing event filter with "QAxWidget" but not getting any "IWebBrowserEvent2" interfaces event.

                Can you point some examples or pointers so that i can implement and suggest some solution.

                Thanks in Advance.

                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