[Development] Qt for iOS - iOSStyle
Jake Thomas Petroules
jake.petroules at petroules.com
Tue Mar 19 00:57:41 CET 2013
On Mar 18, 2013, at 8:26 AM, Mediator Software <ian at mediator-software.com> wrote:
> 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
One man's trash, another man's treasure.
> Why? Judging from existing Qt apps on iOS, noone is using platform styling
> anyway.
They should.
> 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.
Which generally looks out of place and terrible. This includes Apple's stock apps
like Notes. I hope Jony Ive gets rid of all this skeumorphic design.
See, people argue that there are many Apple stock apps that use totally custom
styling, therefore everyone should do that, screw native controls, they don't matter.
However there's a decent handful of stock apps that use almost exclusively native
styling: Settings, Phone, Messages, Mail, Calendar, Contacts, Safari and at least
in my opinion those are some of the most well designed and best looking apps
on the system.
Not every app should be styled native. Not every app should be styled custom.
Some should use a combination of both. It all depends on what's appropriate
for the situation at hand. All I'm asking is that people recognize that we need
a balance here. We can provide both options.
> The same
> goes for QML, but there I can see a use for iOS QML components.
So can I. I may work on this in the future as well. Right now the focus is widgets.
What we really need a new styling system that can act as a backend for both
QStyle/widgets and QML.
> 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).
They will definitely look the same. As for behave, that's a little harder but it can
still be done.
A combo box is a UIPickerView. There's no rule that requires a QComboBox to look
like a rectangle with a down arrow that pops up a menu when you click it. I think
substituting the appearance/behavior of a UIPickerView for QComboBox makes
sense as their functional equivalence is roughly the same.
There are plenty of comments in the Qt documentation that make note of
platform specific exceptions, or a property's lack of effect on one platform
or another. iOS may have more of these than other platforms. That's OK.
> 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.
Yes, this could certainly be useful. It's one option, not the only one. I'd actually like
to see more of these on desktop platforms -- especially Mac, since Qt has no
QSearchField or QSegmentedControl (we should!), which are quite nice.
> 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
Almost everything looks wrong. The UISwitch text is misaligned and the fonts
on the toolbars look strange. Smells like an attempted custom drawing.
Again, I've already started on QIosStyle and it's working pretty nicely.
https://codereview.qt-project.org/#change,51167
Once I've uploaded some of the functionality I've been working on,
I encourage you to give it a try. It might make you change your mind
about QIosStyle being a waste of time. :)
--
Jake Petroules
Chief Technology Officer
Petroules Corporation ยท www.petroules.com
Email: jake.petroules at petroules.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130318/3033bfd7/attachment.html>
More information about the Development
mailing list