Important: Please read the Qt Code of Conduct -

Multiplatform way of writing Qt application

  • Hi all,

    I have a task to make the Qt application run on Android, Mac and Windows.
    I read many of the websites related to Qt they all say "You can now create native Qt-based cross-platform applications all with one framework and target all the most popular operating systems on desktop, embedded and mobile."

    But I am not getting exactly how should I do that.

    Previously I was working on Qt in Linux. I cross compiled the Qt source and made my Qt application running on the embedded device. So should I need to follow the same steps that I had done for getting my Qt application run on my embedded environment or is there any other steps?

    Can anyone please help me like how do I get my application running on different platforms? I searched many things but I dint get a clear idea that how I need to do it. or someone can point me to the websites so that I can get a clear idea that how do I proceed?

  • How about:

    1. You develop on Windows
    2. You compile on Mac and make the necesary adjustments (#ifdef MAC)
    3. You develop a GUI for Android
      Of course you keep a clear separation of logic and GUIs.

  • Moderators

    If you want to run it on a Mac/ iOS, compile on a Mac. If you need Android, you can compile on all desktop platforms (Linux, Mac, Windows). If you need your app working on Windows, compile on Windows. Follow deployment guides for all platforms to make sure it all works nicely.

    That is pretty much it :-) A lot of work, and requires a lot of hardware, but that is not something you can avoid if you want to deliver a good application anyway.

  • Hi,

    Thank you both for your reply.

    So for all the 3 different platforms I need to compile on the respective platforms only?

  • Moderators

    There are ways to cross-compile, but it tends to be extremely hard to do. And you still need a machine to test it on, right?

  • Is that the same way that we do for Qt working on arm like cross compiling Qt source for embedded linux using Toolchain/cross compiler?

  • Moderators

    Yes, but a lot more painful.

  • Thank you so much.

    Is there any websites I can follow to get the steps for the process?

Log in to reply