Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Is it posible to compile a Client X Qt app to run in Window?
Qt 6.12 LTS is out! See what's new in the release blog

Is it posible to compile a Client X Qt app to run in Window?

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 4.7k Views 2 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.
  • J Offline
    J Offline
    Jose LZ
    wrote on last edited by
    #1

    Hello everybody.

    I have a Qt application target for Linux but is executed remotely, with ssh -X.
    Now, the target OS is Windows.

    Is it posible recompile app for Windows target but display on a remote X Server.

    Thanks

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      When using ssh you are usually executing the application on the remote machine with forwarding the X session back to the caller machine.

      So you don't need to build your application for Windows. However you need to have an X server on your Windows machine like xming.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • J Offline
        J Offline
        Jose LZ
        wrote on last edited by
        #3

        Yes. But remote is a Windows Machine.
        I explain myself better.
        If I compile a Qt application on a Windows machine (Qt for Windows) I get a Qt Windows Native Application.
        If I compile the same source code on a Linux machine, I get a Qt Linux Native (usually client X) application.
        The question is :

        is it posible generate a Qt Windows Native Client X Application?

        So, when I will login from my Local machine (usually Linux) to the Remote Windows machine with ssh -X and execute the application (on Windows remote machine), the application can show the display on my local X Server (Linux) machine)

        Thanks in advanced.

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #4

          Hi
          Since there is no default xserver on windows, i dont think its possible.
          without some new form of QPA
          http://doc.qt.io/qt-5/qpa.html
          (that knows the actual xserver you would be using)

          With a windows server, its possible to serve one application to a remote desktop
          https://technet.microsoft.com/en-us/library/cc731923.aspx?f=255&MSPPError=-2147217396

          J 1 Reply Last reply
          0
          • mrjjM mrjj

            Hi
            Since there is no default xserver on windows, i dont think its possible.
            without some new form of QPA
            http://doc.qt.io/qt-5/qpa.html
            (that knows the actual xserver you would be using)

            With a windows server, its possible to serve one application to a remote desktop
            https://technet.microsoft.com/en-us/library/cc731923.aspx?f=255&MSPPError=-2147217396

            J Offline
            J Offline
            Jose LZ
            wrote on last edited by
            #5

            @mrjj Thanks for the reply.

            Yes, I agree that qpa can be a solution but it sound that it should be done yet.

            From Xming X server you can execute X clients on Windows and show the display on Windows or Linux. I suppose that it is posible build a X client with MinGW-w64

            If this is true, why we can't build a Qt Windows as X client Application ? It sound that should be possible, but I don't know how.

            Best regards.

            1 Reply Last reply
            0
            • mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi
              Yes the reverse is pretty easy.
              I use
              https://sourceforge.net/projects/vcxsrv/
              It can even run linux executable in WSL (Windows Subsystem for Linux) meaning you can run an native linux app on windows.
              But I have not seen any SDK or x server client libs that would allow to run and forward GDI windows apps.

              We simply miss the a windows version of Xlib to link to.
              Im sure one could get something running with cygwin + mingw but that would not be a normal windows app and require cygwin to run.

              Maybe there is some way for a native X server windows app but its not one i cant find or see currently.

              Lets see if others have other ideas :)

              1 Reply Last reply
              0
              • J Offline
                J Offline
                Jose LZ
                wrote on last edited by
                #7

                Hi
                This thread ask the same question. It seems possible but nobody knows.

                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
                • Unsolved