Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    CreateWindow override

    Qt WebKit
    3
    5
    4831
    Loading More Posts
    • 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.
    • J
      jdarnold last edited by

      If I'm using a Qt Creator project & UI file, how do I have use a custom QWebView in order to override CreateWindow? Or how do I dynamically make it use my Createwindow method?

      1 Reply Last reply Reply Quote 0
      • T
        tobias.hunger last edited by

        Sorry, I do not understand what you want to do.

        Can't you just pull a QWebView into the UI and be done?

        1 Reply Last reply Reply Quote 0
        • J
          jdarnold last edited by

          I'm using Qt Creator and I drag a WebView onto my form. But in order for this web view to open new windows, I need to override the createWindow method of either the QWebView or the QWebPage. But the WebView is created via the .ui file. I'm thinking I need to create my own QWebPage class and then call the QWebView->setPage method.

          1 Reply Last reply Reply Quote 0
          • B
            benjamin.poulain last edited by

            You can do any of those, subclass the view or the page (for many use of WebKit, you'll want a subclass of QWebPage anyway).

            If you subclass QWebView, you can still use QtCreator and designer. You just need to promote the widget to your subclass (see the doc of Qt Designer).

            1 Reply Last reply Reply Quote 0
            • J
              jdarnold last edited by

              As I've been finding out, subclassing the WebPage is the way to go and, like you say, it looks necessary. Thx.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post