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. QProcess messaging and hidden?
Forum Updated to NodeBB v4.3 + New Features

QProcess messaging and hidden?

Scheduled Pinned Locked Moved General and Desktop
7 Posts 5 Posters 4.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.
  • M Offline
    M Offline
    mirswith
    wrote on last edited by
    #1

    I am not sure if this is possible but would love to get some ideas how to make this happen.

    Basically I would like to start a process as a hidden window and be able to communicate send keyboard/mouse events to it and at the same time capture its window into pixels. Think capturing any app and then sending it to OpenGL for example to render it in a 3D environment or to capture a screenshot of this app.

    Of course all this has to happen in steps so the first part is how can I simply send mouse/keyboard events to the process? Easily enough I have started the process using QProcess:start but from here I do not see anything obvious about how proceed next.

    Thanks!

    -=ben

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on last edited by
      #2

      I don't think Qt helps you there. I would write platform specific code.
      Under X11, the COMPOSITE and the XTEST extensions come to mind.

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • G Offline
        G Offline
        giesbert
        wrote on last edited by
        #3

        Hi,

        Qt won't do it. And to do it in platform specific code, could get complicated, if you want to face different platforms. On Windows you would have to emulate key/mouse events but those are always send to the currently active window. Or you have to simulate it completely.

        What could be a solution is how squish does it (that's the test automation tool for Qt from frogligic). They can simulate mouse and keyboard for processes, but don't ask me how they do it.

        Nokia Certified Qt Specialist.
        Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mirswith
          wrote on last edited by
          #4

          Any idea how to get the window handle for the process created in both OSX and Windows?

          Thanks for the responses so far.

          -=ben

          1 Reply Last reply
          0
          • L Offline
            L Offline
            lgeyer
            wrote on last edited by
            #5

            "QWidget::winId()":http://doc.qt.nokia.com/latest/qwidget.html#winId

            1 Reply Last reply
            0
            • J Offline
              J Offline
              jim_kaiser
              wrote on last edited by
              #6

              bq. Some people have been asking how to embed Qt painted content (and especially Qt widgets) in a 3d scene.

              "http://labs.qt.nokia.com/2008/12/02/widgets-enter-the-third-dimension-wolfenqt/":http://labs.qt.nokia.com/2008/12/02/widgets-enter-the-third-dimension-wolfenqt/

              Is that what you're looking for? Qt Widgets in 3d scene?

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

                Jim: Thanks for the suggestion. I have seen this before and from the looks of it the widgets are still being drawn to the 2D screen as an overlay to the 3D engine, maybe I am wrong here? Ultimately however I need pixel access to the app in question.

                Lukas: Thanks, I am aware of winId() however I need to get that from a QProcess which gives me the process handle as opposed to the window handle. As Gerolf suggests I will most likely need to branch platform specific code at this point which is ok; was hoping to avoid it if possible however.

                Thanks.

                -=ben

                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