[Development] Qt for iOS - iOSStyle
Mediator Software
ian at mediator-software.com
Mon Mar 18 13:26:41 CET 2013
On Mon, Mar 11, 2013 at 08:37:19AM -0700, Thiago Macieira wrote:
> On segunda-feira, 11 de março de 2013 07.41.02, Jake Thomas Petroules wrote:
> > Jens claimed on the blog that the native look and feel matters less in the
> > mobile world because each app is fullscreen. I agree that it matters less,
> > but I disagree that it matters little enough for us to ignore it. I'd much
> > rather use real iOS-looking controls than simply slap on Fusion.
>
> The whole point is that you shouldn't use QtWidgets at all on mobile
> platforms. Just don't.
...
> That will give you the right static look, but not the feel. In order to
> implement the right feel, with animations, shadows, etc., you need a lot more.
> If things glow, slide, bounce, it will be extremely hard to implement with
> QtWidgets.
In "the real world", Qt on iOS is being used primarily to port existing QtWidget
applications to the iPad, not to write new ones (nor to do anything on any other
iOS platforms). There is a single customer using QML on iOS, once again porting
an existing app. My opinion is that an iOS style for QtWidgets would be a waste
of time.
Why? Judging from existing Qt apps on iOS, noone is using platform styling
anyway. All existing ported apps have custom UIs developed with QtWidgets. They
don't look like iOS, fusion or anything else. They have their own UI. The same
goes for QML, but there I can see a use for iOS QML components. So what's the
problem with making iOS styled QtWidgets? They will never ever look and behave
the same as the native components (maybe a button, but how about a list view?
And what is a combo box on iOS?). You're safer with a custom UI in that case
because Apple will "fail" you if you "confuse" the user (if it looks like a
UIKit widget it must behave *exactly* like a UIKit widget).
Sometimes it would be nice to use actual UIKit controls in Qt applications (eg.
UIWebView), but have them behave like Qt widgets (signals/slots etc.). For
Qt4iOS on Qt4 (and soon on Qt5), custom QWidget wrappers have been developed for
some UIKit controls. This gives you the *actual* UIKit control (pixel perfect
with its exact behaviour), but let's you use Qt layouts/logic etc. IMHO that's
the way forward for Qt widget apps that look like UIKit apps. I intend to do
something similar with QML (embedding a UIKit control in a QML item). There's no
reason why wrappers (C++ or QML) couldn't be developed for all UIKit widgets.
There's not that many of them.
IMHO, it would be most useful to make QtQuick components for iOS. Someone has
already made a set, but it's unclear what their plans are. You can see a demo
video here:
https://docs.google.com/file/d/0B2qhh3gqs-wzaEJvV3A4TjVTQWc/edit?pli=1
https://docs.google.com/file/d/0B2qhh3gqs-wzXzRlNmdUN0thcTA/edit
Ian
More information about the Development
mailing list