Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Managing locations of multiple, separate applications from one
Forum Updated to NodeBB v4.3 + New Features

Managing locations of multiple, separate applications from one

Scheduled Pinned Locked Moved QML and Qt Quick
8 Posts 3 Posters 3.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.
  • S Offline
    S Offline
    starbearer
    wrote on last edited by
    #1

    I have 2 applications, let's say a.exe and b.exe.

    Neither knows anything about the other.

    a.exe only knows the path of b.exe, using which it makes the call. No parameters or any other information is passed between the two.

    Now in case of multiple monitors, if I move a.exe over to another monitor, ideally b.exe should come in that screen too, but it would always launch in the primary.

    Knowing nothing else about b.exe, is it possible to somehow force it to launch in the same screen as a?

    a.exe code is in Qt/C++. b could very well be anything else.

    I had an idea to somehow make a.exe declare only a portion of the screen as legitimate and valid, so b would be forced to appear there. But I've no idea how to do this using Qt, if at all..

    Kindly advise. Thank you.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      If b.exe is a console application you could use "QProcess":http://developer.qt.nokia.com/doc/qt-4.8/qprocess.html in a.exe and display the standard output in a window in a.exe.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • S Offline
        S Offline
        starbearer
        wrote on last edited by
        #3

        Not a console application, I'm afraid.

        If I am able to pass parameters to the application, would that make a difference?

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          I do not know, if there is a solution for gui applications. This is not the area of my expertize. I guess you might be able to place the window of b.exe in close approximation or overlaying to the window of a.exe.
          However, your major topic is that you want to move both windows concurrently. I cannot imagine that this might be possible without exchanging much more information as you can pass through the command line. You would need to send signals on window movement from application to the other without knowing specifics.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0
          • S Offline
            S Offline
            starbearer
            wrote on last edited by
            #5

            That is the issue.

            After launching a.exe in one screen, I move it to the other in an extended screen setting.

            Now when I launch b.exe, calling it from a, I would like it to launch in the same screen as the one in which a currently sits.

            I do not pass anything over to b, except a couple of parameters regarding name. Neither can I modify b's code to accept some other parameters.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              starbearer
              wrote on last edited by
              #6

              The mechanism to proper position the application (and other client applications) on multiscreen is based on the registration of the Windows Handle, for the application that has the focus.

              Is the window Handl HWND available for QT applications? If so, I can probably think of a workaround for this.

              Could someone help, please?

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

                "QWidget::winId()":http://developer.qt.nokia.com/doc/qt-4.8/qwidget.html#winId returns a platform-specific window handle, which is HWND on Windows.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  starbearer
                  wrote on last edited by
                  #8

                  Not being able to find any means.

                  If someone could help me with this issue.

                  How would I control or cause an application to launch in the same screen as another one, neither knowing anything about the other.

                  Only the path and the name of the application is known to one, using which it launches the other.

                  In a 4 screen arrangement or something, this causes havoc with the application positioning.

                  Please help.

                  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