2

One of the advantages of open-source programs is that they can be ported easily to any platform simply by recompiling. Qt is also a cross-platform toolkit that can work on several platforms simply by recompiling, and so applications can be ported between Windows, Mac, Linux, and other desktop OS's.

Is there any possibility of somehow recompiling a desktop app that uses Qt into an Android or iOS application, using the exact same desktop toolkit (i.e. menu bars, buttons, etc.). I realize that this is simply not how Android applications should work (different UI paradigms), but it can have some uses, particularly with Android tablets. Open-source applications can be ported easily in theory, and android also supports keyboard and mouse so there's that. Complex applications that require a desktop UI can be ported to tablets.

I haven't found any examples, so there must be a reason why it's not common considering it should be easy to do in theory. This question also applies to other portable toolkits but Qt is the first thing I can think of. Also, iOS probably doesn't give you flexibility in this regard so it might be a good idea to talk mostly about Android as an example.

Note, I am fully aware that mobile apps should not use the same UI as desktops and that they have a completely different UI paradigm. I'm just asking if it's still possible to run desktop applications on mobile OS's simply by recompiling (and maybe a few minor changes), much like how desktop apps can be ported to other desktop platforms in the same way, and if it isn't, why not.

1 Answer 1

2

A simple search gets you to Qt docs that tell you all about porting a Qt app to Android.

As with most things, it depends - if you use features not supported by Android, then you'll have to do some porting. Otherwise, its generally easy.

Also Qt Quick controls will take on the native UI style for Android 3+

1
  • I've seen this... This involves QML, which means that the desktop UI is not ported as-is and it will attempt to create a mobile-friendly UI. Is this correct? Also this doesn't apply if your application uses QWidgets directly...
    – 9a3eedi
    Feb 2, 2016 at 8:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.