[Interest] Semi-OT: Was Nokia net good or bad for Qt?
Yves Bailly
yves.bailly at sescoi.fr
Mon Sep 30 11:09:32 CEST 2013
Le 30/09/2013 09:54, Thiago Macieira a écrit :
> On segunda-feira, 30 de setembro de 2013 08:52:37, Yves Bailly wrote:
>> Sure some tweakings are needed here and there, because a mobile is not a
>> desktop. But widgets are working fine despite some shortcomings, mostly
>> related to the styles and stylesheets management in my case, which are also
>> valid on the desktop anyway.
>
> You don't use QComboBox or QSpinBox, do you? Do your QPushButtons go
> unmodified? How well do your QListView/QListWidget work on touch displays? Do
> they scroll nicely?
For QComboBox, they're working not so bad.
For QSpinBox, indeed it's unusual on a mobile device. That said some think they're
not nice either even on desktop, so we're moving away from them anyway.
For QPushButton, they can go "unmodified", although I usually style them (see below).
For QListView/QListWidget, I subclassed them and added code to have them scroll nicely
(or at least not-too-badly), with event filters and the likes. Users are not (yet)
complaining, so it *is* possible.
Now if you talk about QMessageBox and derived... that's a different matter. For now
I'm somewhat cheating by using a QStackedWidget and kinda simulating what a
window manager would do. Far from perfect obviously, but it works.
> Did you design your own QStyle? Or are you heavily modifying the UI with
> stylesheets?
I always start by setting a default style, something like:
QApplication::setStyle("fusion");
...then from there I make heavy use of stylesheets. The goal being to have the
application to look the same everywhere, even if it's not always very
consistent with the current platform. I know this is a bit an opposite choice
of the usual "make application look native on each platform", but it's a
design choice - and I'm not the one making this kind of choices ;-) That said,
maybe that will change in the future, one never knows.
Anyway all of this is an old debate... I understand QML is just fine and what is
needed for a broad range of applications. For those it implies writing much less
code than doing the same in C++/widgets, that is obvious.
But for more complex cases, runtime-build or runtime-changing GUIs, QML just
doesn't fill my needs by a wide margin. Therefore I stay with widgets on the
desktop, for input-oriented applications. Then I reuse them or part of them as
much as possible on mobile platforms, for display-oriented applications.
For now, only widgets provide me with the flexibility and reusability I need.
But maybe that will change in the future, always keeping an eye on what's going on :-)
"Write once, run anywhere"... :-)
--
/- Yves Bailly - Software developer -\
\- Sescoi R&D - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
thanks to allow a little delay."
More information about the Interest
mailing list