QtQuick 2 multiple processes



  • Hello,
    I need to have the following app architecture (QtQuick2, Qt 5.3):

    • Master app
      ** child app 1
      ** child app 2

    Each app has its own process, Master app enables two views that are later passed onto new processes so they can render themselves inside master app's window. Master app can move the "windows" around freely, controlling where on the screen the children apps are rendered.

    I've been trying to do that with QWindow->winId and QWindow::fromWinId with no success.
    Must I use QWidget::createWindowContainer() for that?? I'm not really familiar with QWidget apps, but it says on the docs: "Using many window container instances in a QWidget-based application can greatly hurt the overall performance of the application."
    Appreciate any help.


  • Moderators

    Hi, and welcome to the Qt Dev Net!

    [quote]Master app enables two views that are later passed onto new processes so they can render themselves inside master app’s window.
    ...
    I’ve been trying to do that with QWindow->winId and QWindow::fromWinId with no success.[/quote]It's the other way round. QWindow::fromWinId() lets the master find the window ID of the child, and take ownership of it.

    [quote]Master app can move the “windows” around freely, controlling where on the screen the children apps are rendered.[/quote]I don't understand: Why do you want multiple processes? Why not just create multiple windows in one process?



  • Hello! thanks for the warm welcome!

    bq. It’s the other way round. QWindow::fromWinId() lets the master find the window ID of the child, and take ownership of it.

    I see, I can't seem to get a QWindow to be actually INSIDE another one though, maybe I'm going at it wrong.

    bq. I don’t understand: Why do you want multiple processes? Why not just create multiple windows in one process?

    I'm trying to do something like a 'widget' dashboard. By definition, the 'widget' apps are untrusted code, so I'd like them to run on a completely detached process for security reasons.


  • Moderators

    [quote]I see, I can’t seem to get a QWindow to be actually INSIDE another one though, maybe I’m going at it wrong.[/quote]Try setting the window's parent. Child windows will be drawn within the boundaries of their parent.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.