Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. QtWebKit plugins: Deletion and hiding
Forum Updated to NodeBB v4.3 + New Features

QtWebKit plugins: Deletion and hiding

Scheduled Pinned Locked Moved Qt WebKit
4 Posts 2 Posters 3.1k 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.
  • L Offline
    L Offline
    luisivan
    wrote on 29 Oct 2010, 11:51 last edited by
    #1

    I am working on a Qt hybrid application, and I want to show a QWebView into another QWebView.
    I have implemented correctly the "createPlugin":http://doc.qt.nokia.com/4.7/qwebpage.html#createPlugin function on a QWebPage-based class and the QWebView is shown and works.
    The problem is that if I hide the embedded QWebView, the object is deleted. If I not hide it, the object shows in first plane always.
    I searched Google for solutions but I only find this link, reporting the problem: "http://blog.forwardbias.in/2009/09/side-effects-of-using-qtwebkit-for-desktop-apps.html":http://blog.forwardbias.in/2009/09/side-effects-of-using-qtwebkit-for-desktop-apps.html
    Is there any API or function to solve this problem?

    1 Reply Last reply
    0
    • L Offline
      L Offline
      luisivan
      wrote on 1 Nov 2010, 00:06 last edited by
      #2

      Any idea??

      1 Reply Last reply
      0
      • B Offline
        B Offline
        benjamin.poulain
        wrote on 8 Nov 2010, 12:05 last edited by
        #3

        Could you provide a simple example? I am not sure to understand what is the problem.

        What is you use case for embedding a view inside another? It sounds like this should be done by using iframes in your page.

        1 Reply Last reply
        0
        • L Offline
          L Offline
          luisivan
          wrote on 8 Nov 2010, 20:55 last edited by
          #4

          Here is a code example.
          @QObject *WebPage::createPlugin(
          const QString &classid,
          const QUrl &url,
          const QStringList &paramNames,
          const QStringList & paramValues)
          {
          QWebView *view = new QWebView();
          view->load(QUrl("http://developer.qt.nokia.com/"));
          mainFrame()->addToJavaScriptWindowObject("renderer", view);
          return view;
          }@
          With a complex workaround embedding QWebViews into iframes I get the QWebView not to be deleted, but now the QWebViews shown in first plane, so them overlap and I cannot view all the QWebViews, only the last inserted.
          I cannot refuse to use a QWebView because an iframe does not offer the isolation that I want.
          Thanks for paying attention on my problem :)

          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