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. Guidance needed in capturing Web page snapshot and session management

Guidance needed in capturing Web page snapshot and session management

Scheduled Pinned Locked Moved Qt WebKit
7 Posts 4 Posters 4.4k 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.
  • G Offline
    G Offline
    GoGetIt
    wrote on 10 Aug 2010, 08:11 last edited by
    #1

    Hi,

    I am bit new to QT and don't have full idea of its capabilities. I request you to help me in understanding the same.

    I am planning to write an application which will use a web renderer engine (a dll) and a session manager to manage session/connection (a dll) with the server.

    I would like my renderer engine to give a bmp file of the content it gets from the server (HTML/flash) to the application. After doing lot of google search, I came to know that it is possible by using QTWebkit (though not clear of the 'How' part).

    What I would like to know is,

    1. Does QTWebkit support flash? I mean if the content from the server contains the flash data, would it be possible to take the snapshot of that and give the bmp file using QTWebkit?

    2. If I render the output of the renderer engine to a window created by my application, will the mouse and keyboard events (happening on the window) be handled by the QTWebkit? Or do we need to do anything here for the same?

    3. Do we have any support for session manager mentioned above? After searching in google, I came across the QtSoapMessage and QtSoapHttpTransport. Are these sufficient or do we have more useful component to achieve the same?

    Please do the needful. Any help would be appreciated.

    Thanks in advance.

    Regards,
    GoGetIt

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on 10 Aug 2010, 10:23 last edited by
      #2

      think you posted this twice :) ... http://developer.qt.nokia.com/forums/viewthread/508

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gurudutt
        wrote on 10 Aug 2010, 10:53 last edited by
        #3

        Duplicate post is removed now.

        Release Manager - Qt Development Frameworks

        1 Reply Last reply
        0
        • D Offline
          D Offline
          danilocesar
          wrote on 14 Oct 2010, 01:56 last edited by
          #4

          1 - Yes, it does support flash.
          2 - QWebView is the widget who will handle the mouse/keyboard events and pass it to webkit.

          <a href="http://www.danilocesar.com">Danilo Cesar Lemes de Paula</a>
          Software Engineer

          1 Reply Last reply
          0
          • ? This user is from outside of this forum
            ? This user is from outside of this forum
            Guest
            wrote on 14 Oct 2010, 04:05 last edited by
            #5

            1 - part 2, Yes, it is possible to capture that as a bmp, by grabbing the window as below.

            @
            QPixmap pix(QPixmap::grabWindow(QApplication::desktop()->winId()));
            // Or you can use the below line too
            // QPixmap pix(QPixmap::grabWindow(ui->webView->winId()));
            pix.save("C:/Users/webview.bmp");
            @
            This was what you were looking for?

            For some reason (yet to figure out), grabbing widget does not work and the flash plugin doesn't show up in the captured image
            @
            // below does not capture the flash plugin
            QPixmap pix(QPixmap::grabWidget(ui->webView));
            pix.save("C:/Users/webview.bmp");
            @

            1 Reply Last reply
            0
            • B Offline
              B Offline
              benjamin.poulain
              wrote on 15 Oct 2010, 17:16 last edited by
              #6

              bq. 1) Does QTWebkit support flash? I mean if the content from the server contains the flash data, would it be possible to take the snapshot of that and give the bmp file using QTWebkit?

              Yep. Contrary to chetankjain, I would suggest you to use QGraphicsWebView to do the rendering. This forces flash to use windowless mode (look at "http://blog.forwardbias.in/2009/12/flash-in-qgraphicsview.html":http://blog.forwardbias.in/2009/12/flash-in-qgraphicsview.html for more info).

              bq. 2) If I render the output of the renderer engine to a window created by my application, will the mouse and keyboard events (happening on the window) be handled by the QTWebkit? Or do we need to do anything here for the same?

              No idea what you mean there. If you show a QWebView, all the events are forwarded to the QWebPage, which in turn forward that to the right parts of WebKit

              bq. 3) Do we have any support for session manager mentioned above? After searching in google, I came across the QtSoapMessage and QtSoapHttpTransport. Are these sufficient or do we have more useful component to achieve the same?

              Your questions is too vague to be answered. A session could be as simple as a tcp connection, or as messy as REST API with session id shared by the server and client.

              1 Reply Last reply
              0
              • ? This user is from outside of this forum
                ? This user is from outside of this forum
                Guest
                wrote on 16 Oct 2010, 01:41 last edited by
                #7

                bq.
                look at http://blog.forwardbias.in/2009/12/flash-in-qgraphicsview.html for more info).

                nice link, thanks :)

                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