Solved The manipulations needed to use for another platform
-
Hi all,
I created a small app using
qt-opensource-windows-x86-android-5.8.0
on Windows 7 x64 machine. Then usedQt Installer Framework
for making it installable. It can be installed on Windows and works well as expected on it.Then used the
ARM kit
and ran it inDebug mode
. There was an error with the AVD and I didn't see the result on the virtual Android device, but I could find the.apk
file of the app in the build folder and copied it and sent to few of my friends who had a real Android mobile.They said, "The app works on their mobiles well". Vry very good news for me. :-)
But there is some problem! :-(They say, the shape of the app is not fine, for example, the right part of the app is not shown on the screen and when they turn their mobiles the buttons of the app become very small making it hard to work with.
When I saw some screenshots of the app on their devices sent by them, I saw that the arrangement of the buttons have been messy too.
1- Shouldn't I convert the app to work on Android platform using that simple and easy way and is it the reason of these many inconsistencies?
2- If yes, what is the right way of making such an app work on other platforms (say, Android)?
3- I've also heard that using a language called QML we can make apps for iOS and Android platforms by Qt Creator IDE. If there is such a very simple way to convert apps to work on (say) Android using a kit by Qt Creator, is it worth learning QML still?
-
ahh, the bane of Desktop UI vs Mobile UI.
That said,
the fact that a portion of your userinterface is not visible at all on the mobile device is an indicator for you not using a dynamic Layout, am I right?If you can resize your app, under windows, and everything scales appropriately. Than it should up/down scale for mobile devices without problem.
Using layouts is very important, also updating stylesheets and images that work with fixed sizes.
Most of the time, if you develop for desktop, the UI you designt won't fit as well for mobile. I personaly create 2 UIs that I load appropriately during startup.
As for using QML or not, that surely depends on you. Officially QML and QWidgets are equivalent. But you'll see more updates for QML in the release notes, for it has still some catching up to do, therefore more people work on it.
I perosnally haven't touch QML yet, but it's on my to do list :) -
@tomy You should explain more: do you use layouts to lay out GUI elements in your app (as @J-Hilk asked)? Usually there is nothing special to do to provide your app for different platforms/systems.
QML is nice for UI. But you can still create mobile apps with Widgets. QML is better if you want to create very customized and animated UI. But many things (like reading/writing files) cannot be done in QML. For that you need to write C++ and integrate it with QML. -
Thank you two very much.
I'd used these in my code:
setFixedHeight(sizeHint().height()); setFixedWidth(sizeHint().width());
I removed them. Do you think the problem is solved now?
To summarize the last part:
So we can write any excellent app (even for publishing in the competitive world market) using C++ on the Qt Creator IDE for all Windows, iOS and Android platforms, and writing the code is the only hard stage.
After running the app successfully for Windows, we can switchkits
for both other platforms and make files foriOS
andAndroid
devices just by running the app, the simplest stage. Am I correct?And one other question, when I made the installer for my app, there were
.xml
and.txt
files and etc. When installing the app the user would be accustomed to the writer of the app and also would read other notes when installing the app.
We don't have such stages on Android platform. That is, if the creator doesn't put any sign of themselves on the "window" of the final running app, the programmer will be unknown to the user and it's not impossible that someone else claims that the app is written by them!!! Not? -
removeing the fixed size property should solve the issue with not all items beeing displayed. However buttons/icons/texts etc might still be to small to be used with your fingers on a 'small' touchscreen. You'll have to test that.
So we can write any excellent app (even for publishing in the competitive world market) using C++ on the Qt Creator IDE for all Windows, iOS and Android platforms, and writing the code is the only hard stage.
Well, simplified, yes.
After running the app successfully for Windows, we can switch kits for both other platforms and make files for iOS and Android devices just by running the app, the simplest stage. Am I correct?
Usually yes, some few classes however are not cross platform compatible. You'll have to be carefull with 3rd party libs also. To Make sure they support your target platforms and that you link correctly depending on OS etc.
And one other question, when I made the installer for my app, there were .xml and .txt files and etc. When installing the app the user would be accustomed to the writer of the app and also would read other notes when installing the app.
We don't have such stages on Android platform. That is, if the creator doesn't put any sign of themselves on the "window" of the final running app, the programmer will be unknown to the user and it's not impossible that someone else claims that the app is written by them!!! Not?Seems like you want a Splashscreen.
You can combine it with a timer, to guarantee a certain displaytime, in case your App is super fast loaded. -
@tomy You still didn't say whether you use layouts or not.
"someone else claims that the app is written by them" - you have the source code, right? If it is closed source how can anybody else claim to be the owner? Or are you going to open source your app? But even in this case you're the first one releasing the code.
So, is your app open source or not?
You can add an "About MYAPP" menu entry which shows who is the owner of your app, version and what ever else you want to show. -
Thank you both very much.
And sorry, I've used a few layouts:
QHBoxLayout QVBoxLayout
for my closed-code app.
-
And may I ask what process should I start for making the app work for iOS too?
-
@tomy said in The manipulations needed to use for another platform:
And may I ask what process should I start for making the app work for iOS too?
I'll quote apple here
To develop with the iOS SDK and Xcode, you must have an Intel-based Mac running Mac OS X Snow Leopard or later and you must be registered as an Apple Developer.
-
So I need two tools:
iOS SDK
andXcode
and an OS:Mac OS X
on a PC using anIntel CPU
andregistering
. (this one may not be easy because of the bans against us!) -
@tomy You need a Mac, not a PC :-) MacOS is only running on MacBooks, MacMinis, iMacs and what else is produced by Apple. So, you will need to by new hardware.
-
Ow my God, in this bad economic situation do I need to buy an Apple product!? (They are all expensive)
Does it mean all iOS developer have an apple product (say an Apple laptop)?
-
I think they do,
I bought an iMac just to be able to code for my phone...
But you could potentially create your code/projet and send it to a company/friend to be compiled. I think there are some services for that.
-
-
I have an iPhone, can't it be used for that? (I don't think so!)
And what should I send for a friend or a local or online service/company please? The source code!?
I don't like to create open source app for now (at least).
-
@tomy Yes, the only way to build is from source code. To keep it closed source travis CI has plans starting from 69$ per month (and I honestly don't see reasons to move to the more expensive plans).
-
Thank you.
Is the process on an Apple laptop running Mac OS X, the same as on Windows? That is, we install Qt Creator there, then set the tools (SDK and Xcode) there and copy the source code, then it creates an.ipa
file to setup on an iDevice?That is, we just supply the requirements and then run the code for making an app for Apple products, yeah?
-
To deploy it to non-developer iOS devices you'll also need a developer license which is 100$ per year to Apple (yes, it's outrageous, I know)
-
@VRonin
Yeah, indeed. And that is why Apple Inc. is richer day by day.One question on the benefits the developer gains: Does publishing the apps only on App Store give the developers some financial benefits afterwards?
-
Not unless you include some income generating source in your app, an add banner or things like that