These are not entirely general notes, but often specific to using:
GUI considerations for crossing mobile and desktop platforms
This doesn’t make sense unless your app’s GUI is carefully designed to be portable across mobile and desktop platforms. I call this a ‘universal user interface.’
A desktop has, and a mobile platform doesn’t have (?):
- multiple overlapping windows
- a file system and file browser
A mobile platform has, and a desktop may not have:
- multitouch and gestures
I’m still experimenting here (but this a principal reason for my app.) I don’t think that Qt provides a magic bullet. That is, everything you can do in Qt may not be portable and you still might need to have platform specific (mobile versus desktop) code in your app.
(And Qt encompasses many tools, such as Qt Quick, which I am ignoring here, but which may be more portable.)
Qt considerations for crossing mobile and desktop platforms
Printing: Qt does not currently seem to compile the QtPrintSupport module for the mobile platforms.
See QTBUG ????
Early versions of Android and iOS also did not support printing. Now they do:
- iOS: AirPrint
- Android: ???
I suppose it just takes time for Qt to adapt to the mobile print frameworks. How do they differ from desktop print frameworks?
How many dev machines do you need for cross platform development?
Suppose your software development process includes these steps:
- development (creating new features and fixing bugs)
- deployment (packaging)
You might want a machine dedicated to each step (so you don’t need to worry about cross contamination.)
Probably you want a Mac for your deployment machine. A real Mac can deploy to iOS, Android, and MacOS. You can also create virtual machines (Ubuntu and Windows) on that Mac so that it can also deploy to those platforms. In other words, a Mac can deploy to all platforms supported by Qt.
Note that Qt does not currently support WindowsRT (Metro). That’s of little use anyway, since that platform is trailing in the market?
The latest pyqtdeploy user guide has a discussion about directory structures that enable sharing of data across target deployment processes.
Favoring Qt over Python modules for crossing platforms
In your code, you should favor using Qt classes over using Python modules. For example, use Qt’s support for file system operations over Python’s support. More specifically, try not to use the os module (which drags in many other Python modules) of Python.
The reason is, as of this writing, the Python organization does not support mobile platforms. You may have difficulty cross compiling Python modules to mobile platforms (which you must do when you use pyqtdeploy.) Also, you will package Qt libraries with your app, and also packaging Python modules that do the same thing is superflous.
Emulators and Simulators for Mobile Devices
To test a mobile app without a real device you can use:
- Android emulator (AVD)
- iOS simulator
Note the difference.
An AVD is an emulator, presenting the ARM ABI (the interface of the target hardware). It executes the same binary that will run on a real device. Pragmatically, you only need to compile your app once, for the ARM ABI.
The iOS simulator is a simulator, presenting the iOS API (the interface of the target OS.) It executes a binary that is compiled for the i386 ABI, which is not the same ABI as real devices (ARM.) Pragmatically, this means you need to compile your app for both ABI’s (if you want to test on the simulator.)