Discussion:
Concern about removal of QWidget classes
Daniel Mendizabal
2011-10-07 05:14:33 UTC
Permalink
To All,

I have been using Qt for 3 years already and I have some projects going on thanks to the multi-platform approach.

I had a previous experience working with GTK and then GTKmm looking for a C++ solution. Finally I learned about Qt as a framework centralized in C++ and it was amazing to discover a very well documented and clean API with a real and perfectly working multi-platform capability.

All my projects are based on QWidget classes of course and I can compile the source code for mobile and desktop platforms with minor differences managed with #ifdef XXX. A real miracle thanks to the previous Trolltech team.

But what happen now when new mobile phones come with Qt5 without QWidget support? All existing projects based on this technology currently in OVI store or private clients will stop working from one day to the other? When I started with Qt, I read about the promise to keep source and binary compatibility across the releases, what happen with this promise?

This promise was and still is reinforced by Nokia's marketing statement:
"Qt allows you to write advanced applications and UIs once, and deploy them across desktop and embedded operating systems without rewriting the source code saving time and development cost"

I want to clarify that I'm not against QML/JavaScript, it could be an interesting approach to bring more (Java) developers into the pool. But I don't think, this is a fair and responsible decision from Qt's board to leave so many developers and current projects in the situation described above.

I hope there is still room for changes and QWidgets classes are finally included for mobile platforms in Qt5. Because porting existing and complex applications with thousands of lines of code which have been optimized for so long with bug fixes and upgrades would be economically not interesting nor I could have the heart to re-do all my work again.

On the other hand, what happen with the users who purchased these applications from OVI store? Will they loose them as soon as their devices are upgraded to Qt5...?

Thanks,

Daniel
Olivier Goffart
2011-10-07 07:49:36 UTC
Permalink
Post by Daniel Mendizabal
To All,
[...]
Hi,
Post by Daniel Mendizabal
But what happen now when new mobile phones come with Qt5 without QWidget
support?
I wonder how the message could have been given so wrong.

I'm not speaking for the Qt team. But while Qt team thinks QML is the
technology to use in the future for interface and will spend all its
development power in it, they aknoweldge that is is currently not yet ready
for all uses.

That mean that QWidget is NOT going away. It is not removed. It will stay.
It is just that it will stay in maintainence mode, and not get many new
features.
Post by Daniel Mendizabal
All existing projects based on this technology currently in OVI
store or private clients will stop working from one day to the other?
No, as stated, QWidget stays.
Post by Daniel Mendizabal
When I started with Qt, I read about the promise to keep source and binary
compatibility across the releases, what happen with this promise?
The promise is between minor releases, Qt5 is a major release, there is no
compatibility promise at all.
Qt 4.0 was a massive source compatibility break to previous version.
But in comparison, in Qt 5.0, the source compatibility changes will be limited
to the minimum
Post by Daniel Mendizabal
"Qt allows you to write advanced applications and UIs once, and deploy them
across desktop and embedded operating systems without rewriting the source
code saving time and development cost"
So it will be with QML
Post by Daniel Mendizabal
I want to clarify that I'm not against QML/JavaScript, it could be an
interesting approach to bring more (Java) developers into the pool. But I
don't think, this is a fair and responsible decision from Qt's board to
leave so many developers and current projects in the situation described
above.
I hope there is still room for changes and QWidgets classes are finally
included for mobile platforms in Qt5. Because porting existing and complex
applications with thousands of lines of code which have been optimized for
so long with bug fixes and upgrades would be economically not interesting
nor I could have the heart to re-do all my work again.
Qt5 is opensource, and merge requests are accepted. And you might have seen
Nokia's plan to open the develoment process even more.

That means if you or anyone else still interrested in QWidget want to add
feature, they still can.

The question is if it this is a good thing to spend time on QWidget.
Post by Daniel Mendizabal
On the other hand, what happen with the users who purchased these
applications from OVI store? Will they loose them as soon as their devices
are upgraded to Qt5...?
The symbian devices are not going to be upgraded to Qt5.
And if Qt5 comes on those devices, it will be in addition to Qt4.
Yves Bailly
2011-10-07 08:26:07 UTC
Permalink
Hello all,
Post by Olivier Goffart
[...]
The question is if it this is a good thing to spend time on QWidget.
Another question - and sorry if it's stupid, my knowledge of QML is currently
close to nothing: can QML handle highly dynamic interfaces?
I mean, interfaces build dynamically at runtime. I have a pair of apps like
this, in which almost everything is created "by hand" according to what is
contained in a database. Almost nothing can be predefined at coding- or
compile-time.

Is QML suited in such cases?

Regards,
--
/- Yves Bailly - Software developper -\
\- Sescoi R&D - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
thanks to allow a little delay."
Petr Vanek
2011-10-07 08:47:10 UTC
Permalink
Post by Yves Bailly
Hello all,
Post by Olivier Goffart
[...]
The question is if it this is a good thing to spend time on QWidget.
Another question - and sorry if it's stupid, my knowledge of QML is currently
close to nothing: can QML handle highly dynamic interfaces?
I mean, interfaces build dynamically at runtime. I have a pair of apps like
this, in which almost everything is created "by hand" according to what is
contained in a database. Almost nothing can be predefined at coding- or
compile-time.
Is QML suited in such cases?
yes, I'd like to know it too. I tried to find some more complex QML application to see how there can be implemented something like we have in various applications (many-level-inheritance, DB populated widgets, custom painting using 3rd party libs etc.) but I found only simple "one day to make" apps (with all respect to authors).

Some overview for large apps would be really appreciated now to reduce our fears...

petr
Pritam Ghanghas
2011-10-07 09:05:55 UTC
Permalink
Post by Petr Vanek
Post by Yves Bailly
Hello all,
Post by Olivier Goffart
[...]
The question is if it this is a good thing to spend time on QWidget.
Another question - and sorry if it's stupid, my knowledge of QML is currently
close to nothing: can QML handle highly dynamic interfaces?
I mean, interfaces build dynamically at runtime. I have a pair of apps like
this, in which almost everything is created "by hand" according to what is
contained in a database. Almost nothing can be predefined at coding- or
compile-time.
Is QML suited in such cases?
yes, I'd like to know it too. I tried to find some more complex QML application to see how there can be implemented something like we have in various applications (many-level-inheritance, DB populated widgets, custom painting using 3rd party libs etc.) but I found only simple "one day to make" apps (with all respect to authors).
Some overview for large apps would be really appreciated now to reduce our fears...
gitorious.org/qtmediahub looks like a large app. I dont know what kind
of design it has, but I have heard it uses only QML for ui. May be
someone working on it can tell you more. Try searching qml mailing list,
I think you can already fine such discussions there.
Post by Petr Vanek
petr
_______________________________________________
Qt5-feedback mailing list
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
--
Regards,
Pritam Ghanghas


**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are not
to copy, disclose, or distribute this e-mail or its contents to any other person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for any damage
you may sustain as a result of any virus in this e-mail. You should carry out your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
Andre Somers
2011-10-08 08:14:44 UTC
Permalink
Post by Petr Vanek
Post by Yves Bailly
Hello all,
Post by Olivier Goffart
[...]
The question is if it this is a good thing to spend time on QWidget.
Another question - and sorry if it's stupid, my knowledge of QML is currently
close to nothing: can QML handle highly dynamic interfaces?
I mean, interfaces build dynamically at runtime. I have a pair of apps like
this, in which almost everything is created "by hand" according to what is
contained in a database. Almost nothing can be predefined at coding- or
compile-time.
Is QML suited in such cases?
yes, I'd like to know it too. I tried to find some more complex QML application to see how there can be implemented something like we have in various applications (many-level-inheritance, DB populated widgets, custom painting using 3rd party libs etc.) but I found only simple "one day to make" apps (with all respect to authors).
Some overview for large apps would be really appreciated now to reduce our fears...
For one, some KDAB-ians made a Quick version of Kontact, the KDE suite
of email, calendar and similar applications. That is not a trivial
application at all.

André
l***@nokia.com
2011-10-07 08:48:09 UTC
Permalink
Post by Yves Bailly
Hello all,
Post by Olivier Goffart
[...]
The question is if it this is a good thing to spend time on QWidget.
Another question - and sorry if it's stupid, my knowledge of QML is currently
close to nothing: can QML handle highly dynamic interfaces?
I mean, interfaces build dynamically at runtime. I have a pair of apps like
this, in which almost everything is created "by hand" according to what is
contained in a database. Almost nothing can be predefined at coding- or
compile-time.
Is QML suited in such cases?
It's most likely better suited for the task then QWidgets. Only problem
could be if you need some functionality that we don't support in QML yet.

Cheers,
Lars
Yves Bailly
2011-10-07 09:18:32 UTC
Permalink
Post by l***@nokia.com
[...]
Post by Yves Bailly
Is QML suited in such cases?
It's most likely better suited for the task then QWidgets. Only problem
could be if you need some functionality that we don't support in QML yet.
Well, I need pretty everything QWidget-based classes provide, and a bit more...
Combos, stacks and tabs, lists, tables and trees (model-based or not, some items
may be full widgets), splitters, groups, some delegates here and there... even a
checkbox or a label sometimes ;-) Not talking about layouts of course.
All of this being build and filled dynamically at runtime.

Now if QML is said to be better suited for such cases, then maybe I should find
some hours (days?) to really learn it.

Regards,
--
/- Yves Bailly - Software developper -\
\- Sescoi R&D - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
thanks to allow a little delay."
l***@nokia.com
2011-10-07 11:23:23 UTC
Permalink
Post by Yves Bailly
Post by l***@nokia.com
[...]
Post by Yves Bailly
Is QML suited in such cases?
It's most likely better suited for the task then QWidgets. Only problem
could be if you need some functionality that we don't support in QML yet.
Well, I need pretty everything QWidget-based classes provide, and a bit more...
Combos, stacks and tabs, lists, tables and trees (model-based or not, some items
may be full widgets), splitters, groups, some delegates here and there... even a
checkbox or a label sometimes ;-) Not talking about layouts of course.
All of this being build and filled dynamically at runtime.
Now if QML is said to be better suited for such cases, then maybe I should find
some hours (days?) to really learn it.
Well, right now some of the functionality that you mention above is still
missing. We'll get there eventually. But it is most likely easier to
create a UI dynamically than with QWidgets.

Cheers,
Lars
Daniel Mendizabal
2011-10-07 13:53:13 UTC
Permalink
Post by Olivier Goffart
Post by Daniel Mendizabal
But what happen now when new mobile phones come with Qt5 without QWidget
support?
I wonder how the message could have been given so wrong.
I'm not speaking for the Qt team. But while Qt team thinks QML is the
technology to use in the future for interface and will spend all its
development power in it, they aknoweldge that is is currently not yet ready
for all uses.
That mean that QWidget is NOT going away. It is not removed. It will stay.
It is just that it will stay in maintainence mode, and not get many new
features.
I might have misunderstood the message, but if you read the Qt5 - Road map it clearly states that QWidgets module will be a "Qt Add On" only for desktop platforms.
In any case, I hope you are right and it was just an error of interpretation.
l***@nokia.com
2011-10-07 19:16:27 UTC
Permalink
Post by Daniel Mendizabal
Post by Daniel Mendizabal
Post by Daniel Mendizabal
But what happen now when new mobile phones come with Qt5 without
QWidget
Post by Daniel Mendizabal
support?
I wonder how the message could have been given so wrong.
I'm not speaking for the Qt team. But while Qt team thinks QML is the
technology to use in the future for interface and will spend all its
development power in it, they aknoweldge that is is currently not yet ready
for all uses.
That mean that QWidget is NOT going away. It is not removed. It will stay.
It is just that it will stay in maintainence mode, and not get many new
features.
I might have misunderstood the message, but if you read the Qt5 - Road
map <http://developer.qt.nokia.com/wiki/Qt_5.0> it clearly states that
QWidgets module will be a "Qt Add On" only for desktop platforms.
In any case, I hope you are right and it was just an error of
interpretation.
It's not going away. Whether an embedded device wants to ship it by
default is another question, and up to the team doing the device.

And yes, QWidgets do not make too much sense on small screen devices. On
tablets they can probably work fine. But look at the iPad and tell me a
QWidget based app would not look outdated in there.

Cheers,
Lars
Till Oliver Knoll
2011-10-07 12:27:20 UTC
Permalink
[Accidentally sent in private to wrong recipient, so here again]
Post by Daniel Mendizabal
...
But what happen now when new mobile phones come with Qt5 without QWidget support?
So I want to give my opinion about the QWidget vs QML discussion as
well. I already apologise for this lengthier post of mine, but I
followed several discussions with great interest - and concern.

For the actual question here: the answer has already been given:
QWidgets won't disappear. Period. At least not in Qt 5. Your Qt 4 code
will most likely compile on Qt 5 as before, as the promise is that the
transition Qt 4 to Qt 5 is supposed to be much less painful than it
was in some cases for Qt 3 to 4.

And that's that.

Now let me focus on some concerns of mine.

A couple of months ago my impression was that QML will "live happily
in parallel" to QWidgets. They are implemented in a separate "module",
they link to their own required libraries, but that wouldn't concern
me at all as a QWidget desktop application programmer. I would still
happily link to my QtGui which would sit on top of some low-level
QPainter-based libraries, which might also be used or not by the QML
stack.

So I don't want to use it, I don't have to use it.

But recently it turned out that the whole paint stack, the "scene
graph", will be completely rewritten, to favour the QML architecture.
And it turns out that for all these "fancy effects" we now need OpenGL
support to get any descent performance. And what's more, the whole
QWidget implementation will sit on top of all that. So in the worst
case I will have to link against all these JavaScript engine and
what-not libraries, just to display a "Hello World" in a QLineEdit,
implemented as some QML element in the background, interpreted by some
JavaScript engine, rendered by some OpenGL stack... but nicely shaded
maybe (which by the way I don't want at all, as I want my QLineEdit
look exactly as the "native" one!).

So QWidget has clearly become 2nd class and with regards to
performance "we" have to take what's left for us! At least that is my
impression from some discussions I followed.

So here are some points I'd like to throw in:

- I don't want to use any JavaScript in my code!

I chose Qt as a C++ framework for a reason! If I wanted to use a
"non-native" language I'd chosen .Net or Java. I don't understand why
everyone shouts "Hooray! Now we can code our GUI logic in
JavaScript!". And "don't use" also implies "I don't want to link
against any JavaScript library which I don't use".

Why? Because I want to be able to debug my whole GUI logic with the
same tools I develop my business logic! I don't want any "artificial"
wrapper objects which map JS values to C++ values and vice versa. And
even if my QWidget based classes would sit on top of this whole "QML
stack", running JavaScript under the hood I'd still suffer from
performance loss. For sure I would not gain any performance!

- I want performance!

I have tested one of my 4.7.3 Qt applications on a >10 year old HP
laptop running Windows 2000 on a Pentium III 600 MHz, 512 MByte RAM.
Just for the fun of it. And it ran perfectly! The main window resized
smoothly and overall GUI performance was very snappy. I am happy with
this! And that is the benchmark I will refer to when testing any
QWidget application on top of Qt 5.

But with the current requirement that even the QWidget based apps now
need OpenGL support that means I cannot even run my apps in a virtual
machine such as VirtualBox on a Mac in a decent way (and yes, I AM
cross-developing a lot in VirtualBox, for both Windows and Linux)!

But even from a user perspective (I'd accept the argument that as a
developer I should be able to invest into proper hardware) that means
I am burning battery power of my laptop/tablet/phone each time the GPU
starts cooking, simply because I resize my main window!

Oh and yes, I also do OpenGL based applications, and I'd hate it to
see the widgets taking away valuable GPU cycles and introducing locks
by GL context-switching, simply because that damn button needs to have
its drop-shadow rendered nicely! (Yes, I am aware that OS X for
instance does nothing else - but Qt would again render ON TOP of that
with its own GL context etc.).

- I want native widgets!

I want my application to look as natively as possible! Native, native,
native! Can't repeat that enough. Even better: Use native widgets
wherever possible (e.g. push buttons, drop-down boxes etc.). No
rounded corners, no drop shadow, no textures where the OS window
manager would not render them anyway!

- I for sure don't want to hand-code any XML-like GUI files!

We have Qt Designer for a reason! Editing GUI in a text file is sooo
late century, you know! And if I want to programmatically define the
GUI, then I want it to be blazing fast, means compiled. With a
well-documented API, simple to use. Oh, we already have that, it's
called Qt...

I wouldn't mind if the Qt Designer would create QML files under the
hood. Much the same way I don't care about the actual content of the
current UI files. As long as I would interface against a compiled C++
class in my own code! And there's type-safety, and not some "Oh let's
see what that string could be, let's cast it as an int at runtime..."
And if I rename a widget in Qt Designer I want to get a COMPILE error!
And not just a runtime error because the JavaScript/QML interpreter
figured only out by then.

- I want a small memory/disk footprint!

A small application on a Mac (or Windows, can't remeber)I brought to
about a little bit under 10 MBytes, linking to QtGui and QtCore (Cocoa
64 bit only, stock Qt 4.7 distribution). That is already a LOT! By
modularising Qt even more - e.g. split the special QWidgets into a
separate module than QtGui - I'd expect to bring this value to a even
lower value. I am talking about a small GUI application. Now what if I
would actually need to link against WebKit etc., just to get a decent
JavaScript engine?



I do understand that there is a "research" project on the way to bring
"desktop widgets" to QML. QActions? Oh yes, we need to research that.
Layout managers? Huh... yeah, we thought about that too, needs some
more research. Signals/slots? Menues? Toolbars? Lists? And all this
from the C++ without touching ANY JavaScript or wrapper?

Hey yes, EVENTUALLY we will be there. But my point is: we will be
there WHERE WE ARE RIGHT NOW! Because the way the QWidget approach
works in combination with Qt signals/slots and Qt Designer JUST ROCKS!
And programmatically creating "dynamic GUIs" by adding menu entries,
enabling/disabling widgets, making them in/visible, populating lists
programmatically is almost a no-brainer with the wonderful Qt API!



Now to be fair: I have not much experience with QML other than
studying some example code and running it! And I fully agree that my
points above might be a bit put into the extreme. But I wanted to
illustrate a point here, a perspective from the ordinary desktop
application engineer! And so far I am a bit surprised that there
hasn't been much discussion about the impact of QML onto ordinary
desktop applications on this list! Au contraire, it seems that more
people went like "Hooray, finally JavaScript for GUI development!"
What's so great about JavaScript anyway (what you couldn't do with
C++/Qt)? And "web apps", can't hear it anymore! If I wanted to write
such a thing then I'd grab some HTML5 editor and a JavaScript debugger
and have some smart people actually building the business logic in a
Java-based server backend!

Why do browsers want to be able to execute native C code nowadays and
become more and more of a "runtime environment" for I don't know what?
And why are desktop toolkits so keen on bringing whole web browsers
into their dialogs? (Not that I mind having a great QWebKit
implementation available - IF I need it ;)


Well, the the truth is I am very curious about the possibilities of
QML as well, and on mobile devices I strongly think that's the only
way to go! But mobile applications are fundamentally different than
desktop apps! And hey, I imagine even on the desktop QML applications
might make sense. Think "full-screen custom" games or information
systems. For sure I'll dig into QML as well!


But to summarise: as it appears to me now at least QWidgets have
clearly become second class citisen. And I am NOT talking about that
there won't be any new development, such as new widgets such as
ribbons (God beware ;). I am perfeclty fine with "it is as good as it
gets and we just reached that point". Some bugfixing here (yes, on Mac
there are still some glitches here and there), and I'd be happy!

I am talking about that they are now placed on TOP of the "QML stack",
suffering from the performance penalty (and yes, I regard the
dependency on an OpenGL backend as a performance penalty!) and
extended memory footprint ("now plus a JavaScript engine + whatnot!")
and in exchange we gain... nothing!

And don't be mad, I highly appreciate the work being done, but still I
think this whole "QML desktop research" is a waste of time! There is
nothing to gain except what we have already now! And I am HAPPY what
we have now! Don't tell me that in the future it will be so much
easier to animate my buttons, have rounded corners, glossy shiny
effects... if the window manager doesn't render that, I don't WANT
that!


Just to give you a real-world example: Adobe Flex! So I have
downloaded this "cross-platform" application from some photo studio,
as to design my photo book. And off course the first thing it does is
install its Flex runtime somewhere on the system (which later on
conflicts with another "Compressor" software by Apple due to
misbehaving read-write folder properties, but that's an entire
different story!). So anyway, I start it up on my shiny 2009 iMac...
and I start it up... and I start it up... finally! But what the... all
buttons look alien, the line edits react slughish, and DARE YOU
resizing the main window! IT SUCKS! It LOOKS BAD! It PERFORMS BAD! And
I HATE those custom-looking dialogs with drop-shadows everywhere! And
why the HELL does the toolbar have to be ANIMATED, when all I want is
to switch the tool! I give you a nano-second time, just switch that
damn tool! Don't fade in or out! YOU ARE WASTING MY PRECIOUS TIME! Now
here you got me started...! ;)

Well, the software was free and did its job.

Now usually I like to shoot at Apple fans (my favourite is the missing
Uninstaller, and don't even ask me how I like the Finder ;), but here
I am in the same row with them when I say: "It doesn't look like
Apple!" And usually I am not a big UI promoter - as long as it "just
looks native".



So here is my vote: Modularise Qt in such a way that the
"old-fashioned" QWidget approach works as before: no JavaScript
engine, no OpenGL dependency, just the clean C++ API with its blazing
performance as we know it. And if I really want to use QML I just link
to those libraries as needed - with all its fancy and shiny glory!

I know at this point it's already too late I guess, the QML-ification
of Qt is already progressed to far. At least that had been my
expectation half a year ago... and who knows, maybe I AM one of the
very few people left trying to stick to the good old working
technology, and desktop apps as we know them are dying out. Every
application will bring along its own look and feel and usability
concepts and that's what people want (or the developers at least)...
then so be it!


Thanks for those who actually read until here, and apologise again to
those who skipped reading long time ago. ;) I just had to off-load
here a few concerns, and a little bit frustration after pretty much
exactly 10 years of Qt coding and promoting! I hope I started some
CONSTRUCTIVE discussion, by starting with an admittedly somewhat
extreme point ;)

Thank you,
Oliver
C***@csiro.au
2011-10-07 12:51:35 UTC
Permalink
Feels good to vent it out sometimes, huh? ;) I have some sympathy with some of your points, but I'll restrict myself to a couple of specifics.
Post by Till Oliver Knoll
But with the current requirement that even the QWidget based apps now
need OpenGL support that means I cannot even run my apps in a virtual
machine such as VirtualBox on a Mac in a decent way (and yes, I AM
cross-developing a lot in VirtualBox, for both Windows and Linux)!
You are not alone with that combination! Actually, VirtualBox is just about there for OpenGL. It claims to support OpenGL 2.1 now, which theoretically should be sufficient for what Qt5 is aiming for. There's a small number of omissions which have been reported in their bug tracker, so if someone wants to push to have that bug addressed, you will probably have a viable VirtualBox option for OpenGL by the time Qt5 comes out. The bug ticket can be found here:

https://www.virtualbox.org/ticket/8275
Post by Till Oliver Knoll
I know at this point it's already too late I guess, the QML-ification
of Qt is already progressed to far. At least that had been my
expectation half a year ago... and who knows, maybe I AM one of the
very few people left trying to stick to the good old working
technology, and desktop apps as we know them are dying out. Every
application will bring along its own look and feel and usability
concepts and that's what people want (or the developers at least)...
then so be it!
Desktop apps won't be going away any time soon, and there are some rather big commercial companies who would likely make some noise if Qt on desktop was being neglected. Consider Autodesk - they rewrote their Maya package to use Qt for their 2011 release. I can't see them switching to QML any time soon just after expending all that effort, the cost in terms of time and additional development would be hard to justify. Maya is also very heavily dependent on OpenGL and being what it is, interactivity and overall performance are both crucial to its success. Now consider that Maya is THE package for film special effects in the movie industry (read: big $$$) and hopefully that will give you some reassurance that you have some relatively heavy hitters who should be sharing some of your concerns.
;)


--
Dr Craig Scott
Computational Software Engineering Team Leader, CSIRO (CMIS)
Melbourne, Australia
Daniel Mendizabal
2011-10-07 13:44:00 UTC
Permalink
Post by C***@csiro.au
Desktop apps won't be going away any time soon, and there are some rather big commercial companies who would likely make some noise if Qt on desktop was being neglected. Consider Autodesk - they rewrote their Maya package to use Qt for their 2011 release. I can't see them switching to QML any time soon just after expending all that effort, the cost in terms of time and additional development would be hard to justify. Maya is also very heavily dependent on OpenGL and being what it is, interactivity and overall performance are both crucial to its success. Now consider that Maya is THE package for film special effects in the movie industry (read: big $$$) and hopefully that will give you some reassurance that you have some relatively heavy hitters who should be sharing some of your concerns
. ;)
This is a good news to rise some hopes.
In any case, I don't see any woouuh having QML components in desktop applications, unless you are doing games or some specific fancy app for teenagers. But for the regular purposes and specially for productivity applications the end user is expecting a native look and feel according to its platform and the chosen theme. Any other approach would be even annoying and possibly frustrating.
Robin Burchell
2011-10-07 13:46:52 UTC
Permalink
Hi,
Post by Daniel Mendizabal
But for the regular purposes and specially for productivity applications the end user is expecting a native look and feel according to its platform and the chosen theme. Any other approach would be even annoying and possibly frustrating.
Which is precisely the approach desktop components take.

(http://labs.qt.nokia.com/2011/03/10/qml-components-for-desktop/)
Harri Porten
2011-10-07 19:07:37 UTC
Permalink
Post by C***@csiro.au
Desktop apps won't be going away any time soon, and there are some
rather big commercial companies who would likely make some noise if Qt
on desktop was being neglected.
Were and how will they make that noise? Remember that Nokia has freed
themselves of the commercial Qt sales and support business. That freedom
is now being used for experiments with new approaches. There are service
providers for classic QWidget-based programming but when it comes to new
developments the market still has to be established.

Harri.
C***@csiro.au
2011-10-08 00:42:03 UTC
Permalink
Post by Harri Porten
Post by C***@csiro.au
Desktop apps won't be going away any time soon, and there are some
rather big commercial companies who would likely make some noise if Qt
on desktop was being neglected.
Were and how will they make that noise? Remember that Nokia has freed
themselves of the commercial Qt sales and support business. That freedom
is now being used for experiments with new approaches. There are service
providers for classic QWidget-based programming but when it comes to new
developments the market still has to be established.
Hi Harri, I understand why you might also have some interest in this area (we are one of your customers!). Since I have no affiliation with Autodesk, I don't want to speculate on any specifics here. My point is more that Autodesk obviously made a business decision to rewrite Maya to be based on Qt, specifically its QWidgets. They surveyed their community of plugin developers more than once to gauge interest before they did this and since they went ahead with it, one can assume they deemed it worth the effort. Should they encounter problems with Qt's QWidgets where those problems have a strong negative impact on their product, they will simply have to find a way to address them. Being a big company (hence more $$$ and manpower), they should have more options open to them than a smaller busi
ness might. Whether they would find working through Digia to be the most effective or whether they engage with the wider Qt development community more actively, my main point is that their n
eed to keep their customers happy will drive them to find a solution. And they should have the means to do so. Currently, they rely on the LGPL version of Qt and they make available all their customisations on their website. Their community of plugin developers also rely on the LGPL version as a consequence. One would hope that the rest of the Qt community would benefit from any steps Autodesk found they had to take. I'm just using Autodesk as one example here, purely because I'm more familiar with them (we are part of the community of plugin developers for Maya).

I don't want to distract from the main discussions on this list. I was more hoping to simply point out that there are plenty of companies that rely on Qt's current QWidget functionality. For those who can't or don't want to change from QWidget in the medium term, there will be a collective need to see the QWidget-based capabilities maintained at least at some modest level. Those with the deeper pockets are probably more likely to have more options.


--
Dr Craig Scott
Computational Software Engineering Team Leader, CSIRO (CMIS)
Melbourne, Australia
Ganshorn Thomas
2011-10-10 05:22:45 UTC
Permalink
Just one thing about autodesk they are releasing already their own
version of qt which is NOT compatible with the standard version.
I work for the big $$$ special fx industry and i can assure you we are
all REALLY affraid
Post by C***@csiro.au
Post by Harri Porten
Post by C***@csiro.au
Desktop apps won't be going away any time soon, and there are some
rather big commercial companies who would likely make some noise if Qt
on desktop was being neglected.
Were and how will they make that noise? Remember that Nokia has freed
themselves of the commercial Qt sales and support business. That freedom
is now being used for experiments with new approaches. There are service
providers for classic QWidget-based programming but when it comes to new
developments the market still has to be established.
Hi Harri, I understand why you might also have some interest in this area (we are one of your customers!). Since I have no affiliation with Autodesk, I don't want to speculate on any specifics here. My point is more that Autodesk obviously made a business decision to rewrite Maya to be based on Qt, specifically its QWidgets. They surveyed their community of plugin developers more than once to gauge interest before they did this and since they went ahead with it, one can assume they deemed it worth the effort. Should they encounter problems with Qt's QWidgets where those problems have a strong negative impact on their product, they will simply have to find a way to address them. Being a big company (hence more $$$ and manpower), they should have more options open to them than a smaller bu
siness might. Whether they would find working through Digia to be the most effective or whether they engage with the wider Qt development community more actively, my main point is that their
n
Post by C***@csiro.au
eed to keep their customers happy will drive them to find a solution. And they should have the means to do so. Currently, they rely on the LGPL version of Qt and they make available all their customisations on their website. Their community of plugin developers also rely on the LGPL version as a consequence. One would hope that the rest of the Qt community would benefit from any steps Autodesk found they had to take. I'm just using Autodesk as one example here, purely because I'm more familiar with them (we are part of the community of plugin developers for Maya).
I don't want to distract from the main discussions on this list. I was more hoping to simply point out that there are plenty of companies that rely on Qt's current QWidget functionality. For those who can't or don't want to change from QWidget in the medium term, there will be a collective need to see the QWidget-based capabilities maintained at least at some modest level. Those with the deeper pockets are probably more likely to have more options.
--
Dr Craig Scott
Computational Software Engineering Team Leader, CSIRO (CMIS)
Melbourne, Australia
_______________________________________________
Qt5-feedback mailing list
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
Thiago Macieira
2011-10-07 13:48:22 UTC
Permalink
Hi Till

I'm taking your email as a vent and as a rant. And as such things go, it's
full of assumptions based on mistaken facts. Let me see if I can correct some
of them.
Post by Till Oliver Knoll
A couple of months ago my impression was that QML will "live happily
in parallel" to QWidgets. They are implemented in a separate "module",
they link to their own required libraries, but that wouldn't concern
me at all as a QWidget desktop application programmer. I would still
happily link to my QtGui which would sit on top of some low-level
QPainter-based libraries, which might also be used or not by the QML
stack.
That's more or less right and still remains so.
Post by Till Oliver Knoll
But recently it turned out that the whole paint stack, the "scene
graph", will be completely rewritten, to favour the QML architecture.
The Qt Quick stack was rewritten. Instead of Graphics View, it sits now on top
of the Scene Graph. The QWidget stack wasn't changed.
Post by Till Oliver Knoll
And it turns out that for all these "fancy effects" we now need OpenGL
support to get any descent performance. And what's more, the whole
QWidget implementation will sit on top of all that. So in the worst
That's where you got it wrong. The QWidget implementation does not sit on top
of the QML-based Scene Graph. It still uses the old backing store, to the
point that there is a class called QBackingStore. The QWidget architecture is
mostly unchanged.

That's good and that's bad: on the good side, it means what used to work will
continue to work. It was much less painful to make the migration to Qt 5 this
way. On the negative side, however, it means it got *none* of the performance
improvements that are going into the scene graph-based technologies.
Post by Till Oliver Knoll
- I don't want to use any JavaScript in my code!
You don't have to if you don't want, not now and not in the future.

But in the future it might become harder to avoid it. If you can code your UI
entirely on top of the scene graph without using the Qt Quick engine, you can.
Post by Till Oliver Knoll
I chose Qt as a C++ framework for a reason! If I wanted to use a
"non-native" language I'd chosen .Net or Java. I don't understand why
everyone shouts "Hooray! Now we can code our GUI logic in
JavaScript!". And "don't use" also implies "I don't want to link
against any JavaScript library which I don't use".
Because it's easier to use? Because designers can design the UI, instead of
engineers? There are many reasons to use it.

The fact that technologies like Python exist prove that there is a need for a
simpler way of developing things. And the fact that C and C++ continue to be
used means there's a need for native, bare-metal performance in some cases.
We're trying to marry both.
Post by Till Oliver Knoll
- I want performance!
Ok, then you want OpenGL. You said you wanted performance, therefore you want
OpenGL for your UI. You *cannot* get better performance for graphical things
than to ask the GPU to do it for you the way the GPU does it best.
Post by Till Oliver Knoll
I have tested one of my 4.7.3 Qt applications on a >10 year old HP
laptop running Windows 2000 on a Pentium III 600 MHz, 512 MByte RAM.
Just for the fun of it. And it ran perfectly! The main window resized
smoothly and overall GUI performance was very snappy. I am happy with
this! And that is the benchmark I will refer to when testing any
QWidget application on top of Qt 5.
Try going back to 4.4, before all the performance improvements targeting
mobile were in place. But the point is: we believe we have reached the limits
to what can be optimised in that architecture.

More improvements require OpenGL support and require doing it the OpenGL way
(retained state, like in the Scene Graph), not by bolting it under an
imperative painter. No wonder the raster engine in Qt 4 is better than the
OpenGL engine...
Post by Till Oliver Knoll
But even from a user perspective (I'd accept the argument that as a
developer I should be able to invest into proper hardware) that means
I am burning battery power of my laptop/tablet/phone each time the GPU
starts cooking, simply because I resize my main window!
Yes. Fortunately, your GPU will be burning less battery power than the
equivalent operation on the CPU. So you have a net gain in battery
consumption.

Do you really think that we'd be targeting OpenGL if it consumed more power?
Remember who is the main backer of the new architecture and what kind of
devices they sell.
Post by Till Oliver Knoll
- I want native widgets!
I want my application to look as natively as possible! Native, native,
native! Can't repeat that enough. Even better: Use native widgets
wherever possible (e.g. push buttons, drop-down boxes etc.). No
rounded corners, no drop shadow, no textures where the OS window
manager would not render them anyway!
You're calling for two separate things there. You want either native, or you
want no drop shadows and no rounded corners. If the native widgets have them,
asking not to have them means having non-native widgets.

I don't know how we're going to implement native widgets in the QML-based
world, though.
Post by Till Oliver Knoll
- I for sure don't want to hand-code any XML-like GUI files!
We have Qt Designer for a reason! Editing GUI in a text file is sooo
late century, you know! And if I want to programmatically define the
GUI, then I want it to be blazing fast, means compiled. With a
well-documented API, simple to use. Oh, we already have that, it's
called Qt...
There's a Qt Quick Designer too.

Whether you're going to be able to interface with generated, type-safe C++
code is uncertain. Probably unlikely.
Post by Till Oliver Knoll
- I want a small memory/disk footprint!
A small application on a Mac (or Windows, can't remeber)I brought to
about a little bit under 10 MBytes, linking to QtGui and QtCore (Cocoa
64 bit only, stock Qt 4.7 distribution). That is already a LOT! By
modularising Qt even more - e.g. split the special QWidgets into a
separate module than QtGui - I'd expect to bring this value to a even
lower value. I am talking about a small GUI application. Now what if I
would actually need to link against WebKit etc., just to get a decent
JavaScript engine?
You're getting exactly that. The widgets are in QtWidgets.

The V8 engine isn't part of WebKit and doesn't require loading QtWebKit. You
load QtWebKit if you want to display web pages.
Post by Till Oliver Knoll
I do understand that there is a "research" project on the way to bring
"desktop widgets" to QML. QActions? Oh yes, we need to research that.
Layout managers? Huh... yeah, we thought about that too, needs some
more research. Signals/slots? Menues? Toolbars? Lists? And all this
from the C++ without touching ANY JavaScript or wrapper?
Why did you put the word "research" in quotations? Did you mean to imply it's
not valid research? That it will never see the light of day? That you don't
care about it? I don't know if you realise it, but it also demeans the people
doing the research.
Post by Till Oliver Knoll
Hey yes, EVENTUALLY we will be there. But my point is: we will be
there WHERE WE ARE RIGHT NOW! Because the way the QWidget approach
works in combination with Qt signals/slots and Qt Designer JUST ROCKS!
And programmatically creating "dynamic GUIs" by adding menu entries,
enabling/disabling widgets, making them in/visible, populating lists
programmatically is almost a no-brainer with the wonderful Qt API!
No, we won't be right back where we are right now. We will have new
technologies, easier to develop with for people who are not as bright as you
are (but often have better grasp of UIs) and they will be properly hardware-
accelerated. We'll have properly separated the UI from the logic. We'll have
something sustainable for the next 5-10 years or more.

I appreciate that it just works for you today. And that's a testament to the
effort put in by the same engineers who are now telling you QML is the way
forward. However, you're failing to see the maintenance overhead that these
engineers have faced to keep the widgets working nicely for you. You're
failing to see that we've reached the limit of optimising them further. And if
you think this technology just rocks, you should be duly impressed by the new
one.

It's no wonder: of course the proven technology you know is easier than the
technology you don't, yet to prove itself.
Post by Till Oliver Knoll
Now to be fair: I have not much experience with QML other than
And this sentence should invalidate your entire email. Are you really crying
out against a technology you haven't given a chance?
Post by Till Oliver Knoll
Why do browsers want to be able to execute native C code nowadays and
become more and more of a "runtime environment" for I don't know what?
And why are desktop toolkits so keen on bringing whole web browsers
into their dialogs? (Not that I mind having a great QWebKit
implementation available - IF I need it ;)
That's exactly what we're trying to do: bridge the two worlds, of native and
of interpreted, dynamic languages. The only difference is that we're not
betting exclusively on HTML 5, but instead providing a language suitable for
dynamic UIs.
Post by Till Oliver Knoll
But to summarise: as it appears to me now at least QWidgets have
clearly become second class citisen. And I am NOT talking about that
there won't be any new development, such as new widgets such as
ribbons (God beware ;). I am perfeclty fine with "it is as good as it
gets and we just reached that point". Some bugfixing here (yes, on Mac
there are still some glitches here and there), and I'd be happy!
You're getting it. Just remember that the bugfixes won't be to little glitches
on Mac. More likely, they will be for crashes or really ugly issues.

Unless someone wants to take over maintainership and drive again development.
Remember that whoever wants to do this will have to keep the stability, so
maintainership can be revoked if too many regressions are introduced and not
fixed. In essence: we don't recommend doing this.
Post by Till Oliver Knoll
I am talking about that they are now placed on TOP of the "QML stack",
That's a mistaken assumption. They are not.
Post by Till Oliver Knoll
And don't be mad, I highly appreciate the work being done, but still I
think this whole "QML desktop research" is a waste of time! There is
nothing to gain except what we have already now! And I am HAPPY what
we have now!
That's really offensive to the people doing it.
Post by Till Oliver Knoll
Don't tell me that in the future it will be so much
easier to animate my buttons, have rounded corners, glossy shiny
effects... if the window manager doesn't render that, I don't WANT
that!
Oh, but you're forgetting that the UIs of the future will be like that because
customers are demanding it and others are driving it! So you want to keep your
UIs as they are... Let's say you had kept them as they were 14 years ago.

Here's what it looked like:
Loading Image...

So let me summarise: we cannot stop innovating.
Post by Till Oliver Knoll
So here is my vote: Modularise Qt in such a way that the
"old-fashioned" QWidget approach works as before: no JavaScript
engine, no OpenGL dependency, just the clean C++ API with its blazing
performance as we know it. And if I really want to use QML I just link
to those libraries as needed - with all its fancy and shiny glory!
You've got it. But it will stay as it is. Look at that link above again. Now
place yourself in your 2016 shoes and look at your UIs of today.
Post by Till Oliver Knoll
Thanks for those who actually read until here, and apologise again to
those who skipped reading long time ago. ;) I just had to off-load
here a few concerns, and a little bit frustration after pretty much
exactly 10 years of Qt coding and promoting! I hope I started some
CONSTRUCTIVE discussion, by starting with an admittedly somewhat
extreme point ;)
Unfortunately, you lost time writing all of that based on mistaken
assumptions. If you had just taken the time to clarify first...
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
Konstantin Tokarev
2011-10-07 14:34:46 UTC
Permalink
Post by Thiago Macieira
The Qt Quick stack was rewritten. Instead of Graphics View, it sits now on top
of the Scene Graph. The QWidget stack wasn't changed.
So it will be possible to run old faithful QWidgets without having OpenGL ES 2?
--
Regards,
Konstantin
Thiago Macieira
2011-10-07 14:41:01 UTC
Permalink
Post by Konstantin Tokarev
Post by Thiago Macieira
The Qt Quick stack was rewritten. Instead of Graphics View, it sits now on
top of the Scene Graph. The QWidget stack wasn't changed.
So it will be possible to run old faithful QWidgets without having OpenGL ES 2?
Yes. QWidgets will continue to paint to the backing store, which is QPainter-
driven and has the old raster engine. Then you upload that image to the
windowing server (or share it via shared memory), which will then take care of
uploading to the GPU.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
Иван Комиссаров
2011-10-07 16:28:59 UTC
Permalink
By the way, what about OpenGL painter backend? Can i enable it painting widgets in qt5? (last time i tried to use it, it had some painting bugs)
Post by Thiago Macieira
Post by Konstantin Tokarev
Post by Thiago Macieira
The Qt Quick stack was rewritten. Instead of Graphics View, it sits now on
top of the Scene Graph. The QWidget stack wasn't changed.
So it will be possible to run old faithful QWidgets without having OpenGL ES 2?
Yes. QWidgets will continue to paint to the backing store, which is QPainter-
driven and has the old raster engine. Then you upload that image to the
windowing server (or share it via shared memory), which will then take care of
uploading to the GPU.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
_______________________________________________
Qt5-feedback mailing list
Qt5-***@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
Samuel Rødal
2011-10-07 17:35:04 UTC
Permalink
Post by Иван Комиссаров
By the way, what about OpenGL painter backend? Can i enable it painting widgets in qt5? (last time i tried to use it, it had some painting bugs)
We realized that getting the OpenGL paint engine to render widgets was
not going to succeed, in part due to rendering quality issues (less
perfect antialiasing, incorrect line / polygon rasterization), and in
part due to performance (the imperative QPainter API _is_ more ideal for
a software based paint engine than an OpenGL based one).

So the OpenGL based window surface that we experimented with in Qt 4 has
gone away. The Qt Quick 2 scene graph is the way of getting the best
performance out of OpenGL.

--
Samuel
l***@nokia.com
2011-10-07 19:18:22 UTC
Permalink
Could be there are some bugs in that right now, but yes, that is a goal.

Lars
Post by Иван Комиссаров
By the way, what about OpenGL painter backend? Can i enable it painting
widgets in qt5? (last time i tried to use it, it had some painting bugs)
Post by Thiago Macieira
Post by Konstantin Tokarev
Post by Thiago Macieira
The Qt Quick stack was rewritten. Instead of Graphics View, it sits now on
top of the Scene Graph. The QWidget stack wasn't changed.
So it will be possible to run old faithful QWidgets without having
OpenGL ES
2?
Yes. QWidgets will continue to paint to the backing store, which is QPainter-
driven and has the old raster engine. Then you upload that image to the
windowing server (or share it via shared memory), which will then take care of
uploading to the GPU.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
_______________________________________________
Qt5-feedback mailing list
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
_______________________________________________
Qt5-feedback mailing list
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
Thomas McGuire
2011-10-07 14:43:06 UTC
Permalink
Hi,
Post by Thiago Macieira
That's where you got it wrong. The QWidget implementation does not sit on
top of the QML-based Scene Graph. It still uses the old backing store, to
the point that there is a class called QBackingStore. The QWidget
architecture is mostly unchanged.
Aha, interesting, and good to know.
http://labs.qt.nokia.com/2011/05/09/thoughts-about-qt-5/ said the difference:
"QWidgets will be layered on top of the scene graph", that is probably where
the confusion came from.

Olivier said QWindow might require OpenGL though. Is QWindow a core Lighthouse
class or something plugin-specific? I hope plugin-specific, there are still
embedded platforms without OpenGL (and without a GPU, even), and I imagine the
llvm pipe trick will not be as fast as the raster painting that is done right
now.

OT: The scene graph for QML sounds quite interesting, are there any blogs that
compare performance between QML 1 and 2 already? I am especially interested
what happens if the target platform doesn't have a GPU.

Regards,
Thomas
Robin Burchell
2011-10-07 14:49:40 UTC
Permalink
Hi,
Post by Thomas McGuire
OT: The scene graph for QML sounds quite interesting, are there any blogs that
compare performance between QML 1 and 2 already? I am especially interested
what happens if the target platform doesn't have a GPU.
This is at least one metric:
http://labs.qt.nokia.com/2011/05/31/qml-scene-graph-in-master/
specifically: Loading Image...
Thomas McGuire
2011-10-07 16:26:57 UTC
Permalink
Hi,
Post by Olivier Goffart
Post by Thomas McGuire
OT: The scene graph for QML sounds quite interesting, are there any blogs
that compare performance between QML 1 and 2 already? I am especially
interested what happens if the target platform doesn't have a GPU.
http://labs.qt.nokia.com/2011/05/31/qml-scene-graph-in-master/
http://labs.qt.nokia.com/wp-content/uploads/2011/05/numbers.png
Thanks for the links! I am surprised llvm is better than raster, great work of
the scene graph guys :)

Regards,
Thomas
Samuel Rødal
2011-10-07 17:41:09 UTC
Permalink
Post by Thomas McGuire
Hi,
Post by Thiago Macieira
That's where you got it wrong. The QWidget implementation does not sit on
top of the QML-based Scene Graph. It still uses the old backing store, to
the point that there is a class called QBackingStore. The QWidget
architecture is mostly unchanged.
Aha, interesting, and good to know.
"QWidgets will be layered on top of the scene graph", that is probably where
the confusion came from.
Yes, back then we weren't sure how the widgets would fit in the new
graphics stack, so that was one option.
Post by Thomas McGuire
Olivier said QWindow might require OpenGL though. Is QWindow a core Lighthouse
class or something plugin-specific? I hope plugin-specific, there are still
embedded platforms without OpenGL (and without a GPU, even), and I imagine the
llvm pipe trick will not be as fast as the raster painting that is done right
now.
QWindow is the new window abstraction, which both the scene graph and
the QWidget stack sit on top of. There are two supported ways of getting
content onto a QWindow, one is using QOpenGLContext which is what scene
graph (and potentially games that would want to use raw OpenGL) is
doing, and one is using QBackingStore, which is what the QWidget stack
is doing. I don't expect that QBackingStore will be used much outside of
QWidget.

--
Samuel
Till Oliver Knoll
2011-10-07 17:29:46 UTC
Permalink
Hello Thiago, hello everyone,

I read all messages so far to this subject, but will reply to Thiago's
message only for now. It kind of sums it up anyway very nicely.
Post by Thiago Macieira
Post by Till Oliver Knoll
...
And it turns out that for all these "fancy effects" we now need OpenGL
support to get any descent performance. And what's more, the whole
QWidget implementation will sit on top of all that. So in the worst
That's where you got it wrong. The QWidget implementation does not sit on top
of the QML-based Scene Graph. It still uses the old backing store, to the
point that there is a class called QBackingStore. The QWidget architecture is
mostly unchanged.
Okay then, glad I misinterpreted this. As Thomas already mentioned, I
had exactly this article in mind:

http://labs.qt.nokia.com/2011/05/09/thoughts-about-qt-5/

May I quote that specific paragraph:

"QPainter will still be available and is very useful for many things,
but it won’t be used for the main user interface. Qt will require
OpenGL (ES) 2.0 to work. QWidgets will be layered on top of the scene
graph (not the scene graph on top of QWidgets as is currently done
with Qt 4)."

Now you tell me that QWidgets won't sit on top of the scene graph
(which requires OpenGL ES etc.) and I take your word for it. My
interpretation was different and based on that assumption my
impression was that in Qt 5 the "QWidget stack" would be merely put on
top of the new scene graph, dropping the "QPainter" approach
altogether - with all the necessary additional libraries.
Post by Thiago Macieira
Post by Till Oliver Knoll
I chose Qt as a C++ framework for a reason! ...
Because it's easier to use? Because designers can design the UI, instead of
engineers? There are many reasons to use it.
The fact that technologies like Python exist prove that there is a need for a
simpler way of developing things.
Yes. Might be true for small applications, "weather apps" and sort of.
Post by Thiago Macieira
Ok, then you want OpenGL. You said you wanted performance, therefore you want
OpenGL for your UI.
No. I want OpenGL to render MY stuff, and not getting into my way when
rendering the GUI.

I already mentioned that I am fully aware that these days window
managers such as on Mac OS X, Windows 7 (Vista) also use OpenGL. But
first off that's on an "OS level", that is highly optimised, whereas
the OpenGL rendering of Qt would be "on top of that", in "application
land". The window manager would have no influence on optimising that
(which I hope it does when painting its own widgets).

Well anyway, my point is that performance for drawing a few buttons
and rectangles is way enough available these days! Heck, we're talking
GIGAHertz these days, not Megahertz!

And updating the GUI in Qt was never a bottleneck for me.

Again, I am talking about "plain old desktop applications", with the
look and feel of the underlying OS.
Post by Thiago Macieira
You *cannot* get better performance for graphical things
than to ask the GPU to do it for you the way the GPU does it best.
Well, agreed. My point was more that it is not necessary for my
desktop application needs. I fully agree with you that if you want to
do MORE effects with QML, then yes, it might be necessary to have
OpenGL support.

But let's not ride on the performance issue for too long, my
objections against QML are based more from a programming point of view
anyway.
Post by Thiago Macieira
Post by Till Oliver Knoll
... each time the GPU
starts cooking, simply because I resize my main window!
Yes. Fortunately, your GPU will be burning less battery power than the
equivalent operation on the CPU. So you have a net gain in battery
consumption.
... under the assumption that the CPU is using less or no power at all
in the meantime. Besides graphic performance is accelerated since
Window 3.1, for instance no CPU is wasting CPU cycles when drawing a
rectangle or a line! That's all being handled by dedicated chips on
the normal 2D graphic card, and the same argument with less power also
applies there I guess.

So no, I don't think that using your GPU would actually consume LESS
power than the combination CPU/2D graphic card. But let's not count
watts here either ;)
Post by Thiago Macieira
Post by Till Oliver Knoll
- I want native widgets!
I want my application to look as natively as possible!
You're calling for two separate things there. You want either native, or you
want no drop shadows and no rounded corners. If the native widgets have them,
asking not to have them means having non-native widgets.
No, my point is a different one: I want native look and feel! If the
native window manager decides to draw a nice shadow around every
dialog, then so be it! If the native window manager decides to draw
rounded corners around my main window - so be it! So I was NOT asking
for "no, I don't want to have drop-shadows or rounded corners", I was
asking to have widgets which EXACTLY (as closely as possible at least)
behave like the underlying window manager/OS would do! (And you can
extend this to anything beyond drop-shadows and rounded corners:
colour schemes, click-behaviour etc.)
Post by Thiago Macieira
I don't know how we're going to implement native widgets in the QML-based
world, though.
See what I mean? That's why I prefer to stay with the QWidget approach
for desktop applications.
Post by Thiago Macieira
Post by Till Oliver Knoll
- I for sure don't want to hand-code any XML-like GUI files!
We have Qt Designer for a reason!
There's a Qt Quick Designer too.
Yes, I know that. My point was more aimed at the "pro argument" that
it is much easier to use declarative UI design. My point is "so what?"
I am not hand-coding anyway, so this is no use to me.

Agreed, animating stuff, drawing custom widgets etc. is indeed much
easier in QML. But to repeat: I don't want to animate, I don't want
custom widgets (and I am talking about the "ordinary" and typical user
interface elements such as buttons, comboboxes, not about "custom
widgets" such as graphs, stock tickers or what not).

So all this doesn't bring me any value.
Post by Thiago Macieira
Whether you're going to be able to interface with generated, type-safe C++
code is uncertain. Probably unlikely.
Well, I once visited a presentation of Adobe Flex. First they showed
some flashy pie charts and stuff. Really impressive. Agreed, with QML
you're getting there quicker, too!

But after the presentation developers asked: "So how do I bring the
data from the Flash world into our Java world?" I got sick from all
these type-casts, assumptions like "Yeah, this string is ALWAYS a
float, sure", weird JavaScript code just to get the value out of a
combobox etc. NO WAY!

Now yes, off course we're talking Flex here, and QML might or might
not be different. But when I looked at the Qt 4.7 examples with all
their JavaScript flying around, every foobar button in its own QML
file... how am I supposed to debug this!

So I like the SIMPLICITY of having all GUI elements of a dialog in my
UI file which gives my a nice C++ class with all it's typesafety (as
long as typesafety in C++ goes), I can access all this data without
typecasts from my own clean C++ class, I don't see ANY generated
code... NICE!
Post by Thiago Macieira
Post by Till Oliver Knoll
- I want a small memory/disk footprint!
A small application on a Mac (or Windows, can't remeber)I brought to
about a little bit under 10 MBytes, linking to QtGui and QtCore ...
You're getting exactly that. The widgets are in QtWidgets.
Good! :)
Post by Thiago Macieira
The V8 engine isn't part of WebKit and doesn't require loading QtWebKit. You
load QtWebKit if you want to display web pages.
There was some discussions recently about which JavaScript engine to
use. Either put it into QtCore (well, I am not complaining about an
extra 200 KBytes in QtCore) or - even worse - use the one from Webkit
(meaning you always have to link against a whole browser rendering
engine, just for a simple GUI application!).

So apparently the outcome was to use a separate "V8" JavaScript
engine, in its own library (separate from any Webkit - even though I'm
not sure whether that would mean having TWO JS engines in total - or
is it really the idea to rip out the JS engine implementation out of
Webkit? Or is Webkit using a separate JS library anyway? Don't know.
Post by Thiago Macieira
Post by Till Oliver Knoll
I do understand that there is a "research" project on the way to bring
"desktop widgets" to QML. ...
Why did you put the word "research" in quotations? Did you mean to imply it's
not valid research?
No, not at all! Sorry, but I had a specific mail in mind here which
was exactly mentioning that there would be a LOT of work to do, to
have the equivalent of QActions/Signals/Widgets of what we have today
already. And my mind was probably automatically think in "quotes",
without actually telling you the source of my "quote".

Really, I did not intend to put any other meaning behind my "'s,
except to mean that I was referring to some other posting here on the
list!
Post by Thiago Macieira
Post by Till Oliver Knoll
Hey yes, EVENTUALLY we will be there. But my point is: we will be
there WHERE WE ARE RIGHT NOW! ...
No, we won't be right back where we are right now. We will have new
technologies, easier to develop with for people who are not as bright as you
are (but often have better grasp of UIs)
I have a pretty well-defined grasp of UIs, and I tell you, the people
you are referring to are probably the same people that are either
responsible for the "Nokia PC Suite" (which is used to synchronise
Nokia phones on Windows) or the mentioned "Photo album designer" done
in Flex, backed up by some marketing and PR guys.

Now I already gave an impression on how much - as a user of software,
not as a developer! - I could kick those peoples but! Really! That's
EXACTLY the reason I am objecting to QML on desktops so much!

Yes, let the designers draw some nice icons! Let a usability
professional decide on how many icons there maximum in the toolbar
should be or how many entries per menu. Let them decide about
USABILITY!

But for God's sake, don't let them near any coding of the user
interface! Don't let them think that if they were able to code some
website that they would do any good with "custom buttons", animating
windows and stuff and then you stumble over UI items not being
properly disabled/enabled, texts cut off because "Ups, the german
sentence is longer than the english one - but hey, we HAVE to have a
fixed size button here, because otherwise the texture wouldn't cover
the entire background"...

Seen that, been there, NOT going to do that!

Oh I am getting started here again! ;)
Post by Thiago Macieira
and they will be properly hardware-
accelerated.
Again, what we have so far doesn't need any hardware acceleration
other what we ALREADY HAVE! My Qt apps render nicely on Mac (with
drop-shadows added by the window manager) and they even perform on a
Pentium III - even on a recent KDE 4.7 on said Pentium III! (Off
course with most graphic effects turned off, but still impressive
looking).
Post by Thiago Macieira
We'll have properly separated the UI from the logic. We'll have
something sustainable for the next 5-10 years or more.
Yes, but there would be so much more work in Qt which could be done:

- SOAP
- JSON
- C++ 11
- Document architecture (think "Abstraction of NSDocument" in Cococa)
- Extended gesture support
- OAuth2 support (agreed, that's also a no-brainer with the current Qt 4.7)
- Make sure Qt rocks with IPv6 (anyone checked that? Just saying...)
- Proper file monitoring support ("did the file xy change?")

Etc. etc. stuff like modularisation, THAT brings value for desktop development!

Again, I don't mind having a separate QML stack besides my QWidget approach.
Post by Thiago Macieira
I appreciate that it just works for you today. And that's a testament to the
effort put in by the same engineers who are now telling you QML is the way
forward. However, you're failing to see the maintenance overhead that these
engineers have faced to keep the widgets working nicely for you.
And I am very happy to fail in seeing that - after all that's my
number one reason to use a framework like Qt (even if I would only
develop on ONE platform ;)
Post by Thiago Macieira
You're
failing to see that we've reached the limit of optimising them further.
Well, I did not say I was unhappy with the current performance of Qt widgets ;)
Post by Thiago Macieira
And if
you think this technology just rocks, you should be duly impressed by the new
one.
I am impressed with how easy you can animate stuff, add gradients... I
am just saying I don't need this for desktop development! I want
BORING widgets! ;)
Post by Thiago Macieira
Post by Till Oliver Knoll
Now to be fair: I have not much experience with QML other than
And this sentence should invalidate your entire email. Are you really crying
out against a technology you haven't given a chance?
Well, probably more experience than you might think! I am just saying
I studied the existing Qt 4.7 QML code and was NOT impressed! Why?
Because the whole UI logic was spread around in JavaScript, QML files
and some additional C++ code! Maintenance nightmare when it comes to
"large-scale" applications!

I ran the examples and was NOT impressed from a desktop perspective,
because I could not even resize the examples, the buttons looked
weird, and I did not get the point in animating rectangles and stuff.
However I WAS impressed how easy it seemed to populate lists of images
with feeds such as from Flickr. However I don't see why networking in
Qt should be not as easy as that, too, given a proper JSON parser (the
existing one QJson, works very well!)
Post by Thiago Macieira
That's exactly what we're trying to do: bridge the two worlds, of native and
of interpreted, dynamic languages.
And I am saying that is exactly what I DON'T need in desktop apps! I
want ONE language. And for sure not an interpreted language such as
JavaScript, heck!
Post by Thiago Macieira
Post by Till Oliver Knoll
But to summarise: as it appears to me now at least QWidgets have
clearly become second class citisen. And I am NOT talking about that
there won't be any new development, such as new widgets such as
ribbons (God beware ;). I am perfeclty fine with "it is as good as it
gets and we just reached that point". Some bugfixing here (yes, on Mac
there are still some glitches here and there), and I'd be happy!
You're getting it. Just remember that the bugfixes won't be to little glitches
on Mac. More likely, they will be for crashes or really ugly issues.
Well that's too bad then that QWidgets won't be fixed anymore! At
least not from Nokia, as it seems.
Post by Thiago Macieira
Unless someone wants to take over maintainership and drive again development.
That's my hope anyway.
Post by Thiago Macieira
Remember that whoever wants to do this will have to keep the stability, so
maintainership can be revoked if too many regressions are introduced and not
fixed. In essence: we don't recommend doing this.
Well, that's true for pretty much every development, also new one. So
no reason to scare away people in fixing stuff.
Post by Thiago Macieira
Post by Till Oliver Knoll
I am talking about that they are now placed on TOP of the "QML stack",
That's a mistaken assumption. They are not.
Your word in my ears!
Post by Thiago Macieira
Post by Till Oliver Knoll
And don't be mad, I highly appreciate the work being done, but still I
think this whole "QML desktop research" is a waste of time! There is
nothing to gain except what we have already now! And I am HAPPY what
we have now!
That's really offensive to the people doing it.
I apologize. My frustration about loosing a GREAT Qt API was just
letting go I assume.

Again, I am not saying to drop QML! As long as it lives in PARALLEL to
QWidgets and I don't ever have to use it (unless I want to), then I am
PERFECTLY fine!

But re-inventing the wheel when trying to do desktop development with
QML (not QML itself!), so to speak, to come up with something we
already have, but just with more bads than goods (OpenGL dependency,
interpreted language under the hood, clumsy data exchange with
JavaScript, ...)., that is a waste of precious resources!

I mean you already hinted above that once you get on the scene graph
train there's hardly any way around dealing with JavaScript. And that
alone is a HUGE drawback for me!

But let's see, maybe I am wrong.
Post by Thiago Macieira
Post by Till Oliver Knoll
Don't tell me that in the future it will be so much
easier to animate my buttons, have rounded corners, glossy shiny
effects... if the window manager doesn't render that, I don't WANT
that!
Oh, but you're forgetting that the UIs of the future will be like that because
customers are demanding it and others are driving it! So you want to keep your
UIs as they are... Let's say you had kept them as they were 14 years ago.
       http://www.linux-kongress.org/1997/kde_desktop.gif
So let me summarise: we cannot stop innovating.
No we can't. But also remember that the trend in UI is now in the
OTHER direction again, towards SIMPLER and MINIMALISTIC ways of
drawing stuff, see Mac OS X! The time of "Hey, KDE can draw wobbly
wobbly dialogs (but requires OpenGL support to do so)" is long time
over!

And Qt just performs fine (with QWidgets!) on todays hardware, so why worry?
Post by Thiago Macieira
...
You've got it. But it will stay as it is. Look at that link above again. Now
place yourself in your 2016 shoes and look at your UIs of today.
There will be more "individually looking apps" and I will still want
to kick those people's butt for making apps which look different than
my Windows or Mac or KDE?
Post by Thiago Macieira
Post by Till Oliver Knoll
Thanks for those who actually read until here, and apologise again to
those who skipped reading long time ago. ;)
Unfortunately, you lost time writing all of that based on mistaken
assumptions. If you had just taken the time to clarify first...
No, my point still stands: as long as I can code with Qt 5 without
touching any JavaScript/QML if I don't want to, I am perfectly happy!
I had reasons to believe that I would not be able to do so, but you
said otherwise. I have to take your word for that.

But I gave valid reasons why I don't want to use QML and fancy UI
design for desktop applications, both as a developer and a user! I
gave a concrete example - the Adobe Flex one - and maybe placed it a
bit too pointy, but bottom line is the performance there sucked big
time(1) and the user experience, well: "it just didn't fit into my
Mac!" Luckily it was a "one time usage" only...


(1) I am not saying that I am comparing Flex vs QML, but it is the
same paradigm and the same "misuse" potential is there.


Have a nice week-end all!

Cheers, Oliver
Samuel Rødal
2011-10-07 18:08:55 UTC
Permalink
Post by Till Oliver Knoll
Hello Thiago, hello everyone,
I read all messages so far to this subject, but will reply to Thiago's
message only for now. It kind of sums it up anyway very nicely.
Post by Thiago Macieira
Post by Till Oliver Knoll
...
And it turns out that for all these "fancy effects" we now need OpenGL
support to get any descent performance. And what's more, the whole
QWidget implementation will sit on top of all that. So in the worst
That's where you got it wrong. The QWidget implementation does not sit on top
of the QML-based Scene Graph. It still uses the old backing store, to the
point that there is a class called QBackingStore. The QWidget architecture is
mostly unchanged.
Okay then, glad I misinterpreted this. As Thomas already mentioned, I
http://labs.qt.nokia.com/2011/05/09/thoughts-about-qt-5/
"QPainter will still be available and is very useful for many things,
but it won’t be used for the main user interface. Qt will require
OpenGL (ES) 2.0 to work. QWidgets will be layered on top of the scene
graph (not the scene graph on top of QWidgets as is currently done
with Qt 4)."
Now you tell me that QWidgets won't sit on top of the scene graph
(which requires OpenGL ES etc.) and I take your word for it. My
interpretation was different and based on that assumption my
impression was that in Qt 5 the "QWidget stack" would be merely put on
top of the new scene graph, dropping the "QPainter" approach
altogether - with all the necessary additional libraries.
Yep, we were considering different options. In the end QWindow supports
both QPainter based rendering with QBackingStore and OpenGL based
rendering with QOpenGLContext.
Post by Till Oliver Knoll
Post by Thiago Macieira
Post by Till Oliver Knoll
I chose Qt as a C++ framework for a reason! ...
Because it's easier to use? Because designers can design the UI, instead of
engineers? There are many reasons to use it.
The fact that technologies like Python exist prove that there is a need for a
simpler way of developing things.
Yes. Might be true for small applications, "weather apps" and sort of.
Post by Thiago Macieira
Ok, then you want OpenGL. You said you wanted performance, therefore you want
OpenGL for your UI.
No. I want OpenGL to render MY stuff, and not getting into my way when
rendering the GUI.
I already mentioned that I am fully aware that these days window
managers such as on Mac OS X, Windows 7 (Vista) also use OpenGL. But
first off that's on an "OS level", that is highly optimised, whereas
the OpenGL rendering of Qt would be "on top of that", in "application
land". The window manager would have no influence on optimising that
(which I hope it does when painting its own widgets).
Well anyway, my point is that performance for drawing a few buttons
and rectangles is way enough available these days! Heck, we're talking
GIGAHertz these days, not Megahertz!
And updating the GUI in Qt was never a bottleneck for me.
Again, I am talking about "plain old desktop applications", with the
look and feel of the underlying OS.
QPainter on Linux is using Xlib and Xrender, which was probably still
accelerated by the GPU to some degree (pixmap blits, text rendering,
etc). It's just that a lot of operations weren't supported so we have to
fall back to QImage and do an expensive pixmap / texture upload. Thus,
both the CPU and GPU are not really being used in the most efficient
manner. It turned out that Xlib and Xrender was lacking as an
abstraction for what the GPU is capable of, which is why we moved toward
doing most of the rendering to a QImage and instead doing controlled
uploads of the dirty areas of the window surface in the end, faster than
having to read back data from a pixmap, do the rendering to a QImage,
and re-upload the QImage for blending for individual paint commands.

Still, using OpenGL efficiently is better for CPU (not a lot of
rendering done there) and GPU usage (not doing a lot of texture uploads
all the time). That's what the scene graph enables us to do. OpenGL is
becoming ubiquitous these days, it's time to take full advantage of it.

Since scene graph is using the GPU in a better way than traditional
widgets, I doubt it would steal any performance from your more demanding
OpenGL applications.
Post by Till Oliver Knoll
Post by Thiago Macieira
Post by Till Oliver Knoll
... each time the GPU
starts cooking, simply because I resize my main window!
Yes. Fortunately, your GPU will be burning less battery power than the
equivalent operation on the CPU. So you have a net gain in battery
consumption.
... under the assumption that the CPU is using less or no power at all
in the meantime. Besides graphic performance is accelerated since
Window 3.1, for instance no CPU is wasting CPU cycles when drawing a
rectangle or a line! That's all being handled by dedicated chips on
the normal 2D graphic card, and the same argument with less power also
applies there I guess.
So no, I don't think that using your GPU would actually consume LESS
power than the combination CPU/2D graphic card. But let's not count
watts here either ;)
I think most GPUs don't separate too much between the 2D and 3D
rendering these days, when it comes to rendering gradients and blitting
/ scaling pixmaps it's the same thing.
Post by Till Oliver Knoll
Post by Thiago Macieira
Post by Till Oliver Knoll
- I want native widgets!
I want my application to look as natively as possible!
You're calling for two separate things there. You want either native, or you
want no drop shadows and no rounded corners. If the native widgets have them,
asking not to have them means having non-native widgets.
No, my point is a different one: I want native look and feel! If the
native window manager decides to draw a nice shadow around every
dialog, then so be it! If the native window manager decides to draw
rounded corners around my main window - so be it! So I was NOT asking
for "no, I don't want to have drop-shadows or rounded corners", I was
asking to have widgets which EXACTLY (as closely as possible at least)
behave like the underlying window manager/OS would do! (And you can
colour schemes, click-behaviour etc.)
QWidgets weren't really able to produce perfectly native look and feel
on Mac OS X. And scene graph items shouldn't be _less_ capable that
QWidgets, as long as the theme data ends up in a texture somehow. The
desktop components for QML already wrap the native style APIs.
Post by Till Oliver Knoll
Agreed, animating stuff, drawing custom widgets etc. is indeed much
easier in QML. But to repeat: I don't want to animate, I don't want
custom widgets (and I am talking about the "ordinary" and typical user
interface elements such as buttons, comboboxes, not about "custom
widgets" such as graphs, stock tickers or what not).
So all this doesn't bring me any value.
It's not necessarily about glaring animations, rather of subtle fading
etc (which granted can be done with QWidgets as well, but in a way
that's less easy to experiment with and tweak for a designer). See the
YouTube video in this blog post to see the possibilities:

http://labs.qt.nokia.com/2011/03/10/qml-components-for-desktop/
Post by Till Oliver Knoll
But for God's sake, don't let them near any coding of the user
interface! Don't let them think that if they were able to code some
website that they would do any good with "custom buttons", animating
windows and stuff and then you stumble over UI items not being
properly disabled/enabled, texts cut off because "Ups, the german
sentence is longer than the english one - but hey, we HAVE to have a
fixed size button here, because otherwise the texture wouldn't cover
the entire background"...
There needs to be interaction between the UI designer and the developer.
QML simplifies that interaction :)
Post by Till Oliver Knoll
No we can't. But also remember that the trend in UI is now in the
OTHER direction again, towards SIMPLER and MINIMALISTIC ways of
drawing stuff, see Mac OS X! The time of "Hey, KDE can draw wobbly
wobbly dialogs (but requires OpenGL support to do so)" is long time
over!
And Qt just performs fine (with QWidgets!) on todays hardware, so why worry?
We're not talking wobbly dialogs here, rather subtle and refined
transition effects and highlighting etc.
Post by Till Oliver Knoll
Post by Thiago Macieira
Post by Till Oliver Knoll
Thanks for those who actually read until here, and apologise again to
those who skipped reading long time ago. ;)
Unfortunately, you lost time writing all of that based on mistaken
assumptions. If you had just taken the time to clarify first...
No, my point still stands: as long as I can code with Qt 5 without
touching any JavaScript/QML if I don't want to, I am perfectly happy!
I had reasons to believe that I would not be able to do so, but you
said otherwise. I have to take your word for that.
You won't have to, unless you change your mind in 5.1, 5.2, or later,
and want to give scene graph another chance.

--
Samuel
Thiago Macieira
2011-10-07 18:59:40 UTC
Permalink
Post by Samuel Rødal
Post by Till Oliver Knoll
Agreed, animating stuff, drawing custom widgets etc. is indeed much
easier in QML. But to repeat: I don't want to animate, I don't want
custom widgets (and I am talking about the "ordinary" and typical user
interface elements such as buttons, comboboxes, not about "custom
widgets" such as graphs, stock tickers or what not).
So all this doesn't bring me any value.
It's not necessarily about glaring animations, rather of subtle fading
etc (which granted can be done with QWidgets as well, but in a way
that's less easy to experiment with and tweak for a designer). See the
http://labs.qt.nokia.com/2011/03/10/qml-components-for-desktop/
Till, I think Samuel's words here are the issue that you're missing. The main
message of your email seemed to be "I can do my UI today with Qt 4, therefore
I will be able to do that for the next 5 years". That strikes me as rather
naïve...

You're assuming that either:

a) the UIs of 5 years from now will be remarkably similar to today's, so the
needs in the architecture won't be too different

b) the architecture is so impressive that it will be able to handle the
requirements of UIs 5 years from now

or c) the architecture will evolve and will be able to support the new UI
requirements

My sending of a screenshot of a Qt-based KDE screenshot of 14 years ago is to
show that UIs change quite a lot. The change is constant, it's not one major
change at a fixed point in time.

And even if we could predict when exactly a new architecture needs to be
ready, we still need to research, test, mature and productise this
architecture. That's what Qt Quick is supposed to be: the foundation of our
needs for a long time. Maybe we're wrong, but this is our opinion based on our
understanding of today.

Please note what Samuel said: it's not about wobbly windows or drop shadows
outside your window. It's about subtle animations, fading effects,
transitions, proper anti-aliasing, etc. *inside* your window. And that's to
match the native look and feel that you're looking for: if the native look and
feel has them, so should Qt and then those technologies will be required.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
Konstantin Tokarev
2011-10-07 19:04:59 UTC
Permalink
Post by Thiago Macieira
My sending of a screenshot of a Qt-based KDE screenshot of 14 years ago is to
show that UIs change quite a lot. The change is constant, it's not one major
change at a fixed point in time.
BTW, some people still use KDE 2 (OpenSUSE still packages it), and find it more
usable than, say, KDE 4. Seems like changes are driven by "trends", not regular
user needs...
--
Regards,
Konstantin
Frans Klaver
2011-10-07 20:13:31 UTC
Permalink
Post by Konstantin Tokarev
BTW, some people still use KDE 2 (OpenSUSE still packages it), and find it more
usable than, say, KDE 4. Seems like changes are driven by "trends", not
regular user needs...
Hmm, let's consider this.

Regular user needs can largely be met using a console and a text editor
(sending mails, typing documents, reading news). KDE2 may be usable, but
looks clunky (although may have looked slick fourteen years ago). You may
have overlooked the fact that yesterday half the world was mourning over a
man who was basically pedantic about things not looking clunky. The large
audience no longer accepts clunkiness in your user interfaces. Would you
prefer a handset that looks like a fridge and takes a hammer to actually
dial a number? A TV that's twice as large as the actual screen requires?
Would you prefer a car that looks and drives like a T-ford? A T-Ford is
usable, why then doesn't anyone drive it?

Of course user interfaces are driven by trends. Everything is driven by
trends. Hybrid engines are the trend today. Do regular users actually need
hybrid engines? Not really. Petrol engines meet the need, but hybrid
engines meet the need and come with some extra niceness. It is niceness
that people want -- it is niceness that sells your product. Oh and
function. Making a product is always a cooperation between wants and
needs. If you have two systems that do the same thing equally well, the
users are probably going to look for the one that looks nicest.

Just because some people enjoy driving VW Beetles or 2-Cheveaux doesn't
mean technology should stand still and everyone should be driving those
cars. It's as simple as that. If you stand still while everyone keeps
running, you're going to have to do the work twice as fast. If you know
where the ball is going to be, you don't have to run (I think that one
belongs to Johan Cruyff).

Cheers,
Frans
Peter Kümmel
2011-10-07 18:32:13 UTC
Permalink
Hi Till,

good to know there are others who are skeptical about QML.
But the QWidget time is over at Nokia. Someone else has
to care about.

I assume at Nokia the briefing is "we will not waste any
time or money for QWidget like stuff, someone else should do".

But we are accustomed to rely on Trolltech/Nokia for Qt
development. But this will change with the new development
model. And hey, maybe in QtWidget not only crashes will be
fixed, when a active maintainer could be found.

Peter
Post by Till Oliver Knoll
Post by Thiago Macieira
You're getting it. Just remember that the bugfixes won't be to little glitches
on Mac. More likely, they will be for crashes or really ugly issues.
Well that's too bad then that QWidgets won't be fixed anymore! At
least not from Nokia, as it seems.
Post by Thiago Macieira
Unless someone wants to take over maintainership and drive again development.
That's my hope anyway.
Post by Thiago Macieira
Remember that whoever wants to do this will have to keep the stability, so
maintainership can be revoked if too many regressions are introduced and not
fixed. In essence: we don't recommend doing this.
Well, that's true for pretty much every development, also new one. So
no reason to scare away people in fixing stuff.
Post by Thiago Macieira
Post by Till Oliver Knoll
I am talking about that they are now placed on TOP of the "QML stack",
That's a mistaken assumption. They are not.
Your word in my ears!
Post by Thiago Macieira
Post by Till Oliver Knoll
And don't be mad, I highly appreciate the work being done, but still I
think this whole "QML desktop research" is a waste of time! There is
nothing to gain except what we have already now! And I am HAPPY what
we have now!
That's really offensive to the people doing it.
I apologize. My frustration about loosing a GREAT Qt API was just
letting go I assume.
Again, I am not saying to drop QML! As long as it lives in PARALLEL to
QWidgets and I don't ever have to use it (unless I want to), then I am
PERFECTLY fine!
But re-inventing the wheel when trying to do desktop development with
QML (not QML itself!), so to speak, to come up with something we
already have, but just with more bads than goods (OpenGL dependency,
interpreted language under the hood, clumsy data exchange with
JavaScript, ...)., that is a waste of precious resources!
I mean you already hinted above that once you get on the scene graph
train there's hardly any way around dealing with JavaScript. And that
alone is a HUGE drawback for me!
But let's see, maybe I am wrong.
Post by Thiago Macieira
Post by Till Oliver Knoll
Don't tell me that in the future it will be so much
easier to animate my buttons, have rounded corners, glossy shiny
effects... if the window manager doesn't render that, I don't WANT
that!
Oh, but you're forgetting that the UIs of the future will be like that because
customers are demanding it and others are driving it! So you want to keep your
UIs as they are... Let's say you had kept them as they were 14 years ago.
http://www.linux-kongress.org/1997/kde_desktop.gif
So let me summarise: we cannot stop innovating.
No we can't. But also remember that the trend in UI is now in the
OTHER direction again, towards SIMPLER and MINIMALISTIC ways of
drawing stuff, see Mac OS X! The time of "Hey, KDE can draw wobbly
wobbly dialogs (but requires OpenGL support to do so)" is long time
over!
And Qt just performs fine (with QWidgets!) on todays hardware, so why worry?
Post by Thiago Macieira
...
You've got it. But it will stay as it is. Look at that link above again. Now
place yourself in your 2016 shoes and look at your UIs of today.
There will be more "individually looking apps" and I will still want
to kick those people's butt for making apps which look different than
my Windows or Mac or KDE?
Post by Thiago Macieira
Post by Till Oliver Knoll
Thanks for those who actually read until here, and apologise again to
those who skipped reading long time ago. ;)
Unfortunately, you lost time writing all of that based on mistaken
assumptions. If you had just taken the time to clarify first...
No, my point still stands: as long as I can code with Qt 5 without
touching any JavaScript/QML if I don't want to, I am perfectly happy!
I had reasons to believe that I would not be able to do so, but you
said otherwise. I have to take your word for that.
But I gave valid reasons why I don't want to use QML and fancy UI
design for desktop applications, both as a developer and a user! I
gave a concrete example - the Adobe Flex one - and maybe placed it a
bit too pointy, but bottom line is the performance there sucked big
time(1) and the user experience, well: "it just didn't fit into my
Mac!" Luckily it was a "one time usage" only...
(1) I am not saying that I am comparing Flex vs QML, but it is the
same paradigm and the same "misuse" potential is there.
Have a nice week-end all!
Cheers, Oliver
_______________________________________________
Qt5-feedback mailing list
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
Christian Ehrlicher
2011-10-07 18:52:58 UTC
Permalink
Post by Peter Kümmel
Hi Till,
good to know there are others who are skeptical about QML.
But the QWidget time is over at Nokia. Someone else has
to care about.
I assume at Nokia the briefing is "we will not waste any
time or money for QWidget like stuff, someone else should do".
But we are accustomed to rely on Trolltech/Nokia for Qt
development. But this will change with the new development
model. And hey, maybe in QtWidget not only crashes will be
fixed, when a active maintainer could be found.
I fully agree... :(


Christian
l***@nokia.com
2011-10-07 19:32:14 UTC
Permalink
Post by Till Oliver Knoll
Post by Thiago Macieira
Oh, but you're forgetting that the UIs of the future will be like that because
customers are demanding it and others are driving it! So you want to keep your
UIs as they are... Let's say you had kept them as they were 14 years ago.
http://www.linux-kongress.org/1997/kde_desktop.gif
So let me summarise: we cannot stop innovating.
No we can't. But also remember that the trend in UI is now in the
OTHER direction again, towards SIMPLER and MINIMALISTIC ways of
drawing stuff, see Mac OS X! The time of "Hey, KDE can draw wobbly
wobbly dialogs (but requires OpenGL support to do so)" is long time
over!
You haven't looked close enough. Much of the simplicity is achieved
through small and animations that guide the eye. They are very subtle but
in many places. Implementing all of this in QWidgets is close to
impossible.

Have you looked ad QMainWindow and how it animates certain transitions
when you try to insert a dock window? A great feature, but it required a
man year to implement properly.
Animating things properly in the item views is something we tried, but
simply couldn't do. We've reached the limits of QWidgets.
Post by Till Oliver Knoll
And Qt just performs fine (with QWidgets!) on todays hardware, so why worry?
Post by Thiago Macieira
...
You've got it. But it will stay as it is. Look at that link above again. Now
place yourself in your 2016 shoes and look at your UIs of today.
There will be more "individually looking apps" and I will still want
to kick those people's butt for making apps which look different than
my Windows or Mac or KDE?
So you're basically saying you know how a good UI should look like and
everybody else is wrong?

Cheers,
Lars
l***@nokia.com
2011-10-07 19:13:30 UTC
Permalink
Hi Till,

let me also add some of my comments here. What I'm seeing here is lots of
fears that I don't believe are rooted in reality.

Did you try to compile Qt5 and run the Qt5 Designer lately? I have done it
and while there are some smaller things from our move to Lighthouse and
the reimplementation of the platform integration layer, it does run more
or less smoothly (and yes, I tried in a VM without hardware acceleration).

You sound like you ideally don't want any changes at all. Simply keep Qt
as it was for the last few years.

But you should be more afraid if we were not doing any of the changes we
are right now working on. Why? Because the world has changed rather
radically over the last 6 years. I have seen many toolkits disappear in
the course of a year or two (remember Motif?), simply because they were
stagnant and didn't adjust to a world that has changed. At some point your
then find out that the world has moved on.

I don't think it's in anyone's interest (speaking for the people on this
list) that this will happen. So yes, there is a big need for Qt to adjust
and make changes to avoid this.

The work we're doing right now is there to keep Qt relevant for the world
and thus it's users. We do have a strong commitment to keep compatibility
with Qt 4.x. But we also need to evolve Qt and have some new and to an
extent rather different solutions for the different problems we are facing
today.


Thiago already commented on many things, I'll fill in a bit my side of
things.
Post by Thiago Macieira
Hi Till
I'm taking your email as a vent and as a rant. And as such things go, it's
full of assumptions based on mistaken facts. Let me see if I can correct some
of them.
Post by Till Oliver Knoll
A couple of months ago my impression was that QML will "live happily
in parallel" to QWidgets. They are implemented in a separate "module",
they link to their own required libraries, but that wouldn't concern
me at all as a QWidget desktop application programmer. I would still
happily link to my QtGui which would sit on top of some low-level
QPainter-based libraries, which might also be used or not by the QML
stack.
That's more or less right and still remains so.
Yes, nothing has changed here. QtWidgets do neither require QML nor the
scene graph. The don't even really require OpenGL, even though QtGui links
against it.

If you disregard QML for a second the architectural changes are as follows:

* We split QtGui into a new, smaller QtGui, QtPrintSupport and QtWidgets.
It's all very transparent and almost completely source compatible (except
for include statements).
* We moved some cleaned up QOpenGl* classes into QtGui.
* We are using the Lighthouse architecture to implement our window system
integration. This is so that we can adjust easier to new architectures
(even if you don't care about devices, how about Windows 8 on the desktop?)

And that's pretty much it.
Post by Thiago Macieira
Post by Till Oliver Knoll
But recently it turned out that the whole paint stack, the "scene
graph", will be completely rewritten, to favour the QML architecture.
The Qt Quick stack was rewritten. Instead of Graphics View, it sits now on top
of the Scene Graph. The QWidget stack wasn't changed.
Scene graph is in libQtDeclarative. QtWidgets doesn't even link against
it. In fact what we're currently doing is less than what I had announced
in my original paper in May.

Putting QWidgets on top of/inside the scene graph is doable without
performance regressions. We haven't done it though. The good side is that
it's less work and easier to keep full compatibility with 4.x. The bad
side is that QML and QWidgets are more separated and it's somewhat harder
to integrate between the two worlds (Alexis send a mail about his problems
trying to merge the worlds a week ago).
Post by Thiago Macieira
Post by Till Oliver Knoll
And it turns out that for all these "fancy effects" we now need OpenGL
support to get any descent performance. And what's more, the whole
QWidget implementation will sit on top of all that. So in the worst
That's where you got it wrong. The QWidget implementation does not sit on top
of the QML-based Scene Graph. It still uses the old backing store, to the
point that there is a class called QBackingStore. The QWidget
architecture is
mostly unchanged.
That's good and that's bad: on the good side, it means what used to work will
continue to work. It was much less painful to make the migration to Qt 5 this
way. On the negative side, however, it means it got *none* of the performance
improvements that are going into the scene graph-based technologies.
Not right now at least.
Post by Thiago Macieira
Post by Till Oliver Knoll
- I don't want to use any JavaScript in my code!
You don't have to if you don't want, not now and not in the future.
But in the future it might become harder to avoid it. If you can code your UI
entirely on top of the scene graph without using the Qt Quick engine, you can.
It will most likely be possible to avoid this fully in the future, as long
as you only use QWidgets. But my bet is that in two years time from now
most people will want to use QML on the desktop.
Post by Thiago Macieira
Post by Till Oliver Knoll
I chose Qt as a C++ framework for a reason! If I wanted to use a
"non-native" language I'd chosen .Net or Java. I don't understand why
everyone shouts "Hooray! Now we can code our GUI logic in
JavaScript!". And "don't use" also implies "I don't want to link
against any JavaScript library which I don't use".
Because it's easier to use? Because designers can design the UI, instead of
engineers? There are many reasons to use it.
The fact that technologies like Python exist prove that there is a need for a
simpler way of developing things. And the fact that C and C++ continue to be
used means there's a need for native, bare-metal performance in some cases.
We're trying to marry both.
Exactly. Use C++ where you want, but do things that can more easily be
done in a different language in that other language. It's been like that
forever. I don't think you implement parser by hand, but you use tools
like flex and bison for it.
Post by Thiago Macieira
Post by Till Oliver Knoll
- I want performance!
Ok, then you want OpenGL. You said you wanted performance, therefore you want
OpenGL for your UI. You *cannot* get better performance for graphical things
than to ask the GPU to do it for you the way the GPU does it best.
To add to Thiago: Many of the changes we're doing is to be able to get
better graphical performance out of the system.
Post by Thiago Macieira
Post by Till Oliver Knoll
I have tested one of my 4.7.3 Qt applications on a >10 year old HP
laptop running Windows 2000 on a Pentium III 600 MHz, 512 MByte RAM.
Just for the fun of it. And it ran perfectly! The main window resized
smoothly and overall GUI performance was very snappy. I am happy with
this! And that is the benchmark I will refer to when testing any
QWidget application on top of Qt 5.
Try going back to 4.4, before all the performance improvements targeting
mobile were in place. But the point is: we believe we have reached the limits
to what can be optimised in that architecture.
Let's be very explicit: The work Nokia has done over the last few years
was to make Qt perform better. The reason is that phones are by nature a
lot less performant than desktop systems. It's obvious that this has
helped the desktop a lot.
Post by Thiago Macieira
More improvements require OpenGL support and require doing it the OpenGL way
(retained state, like in the Scene Graph), not by bolting it under an
imperative painter. No wonder the raster engine in Qt 4 is better than the
OpenGL engine...
Post by Till Oliver Knoll
But even from a user perspective (I'd accept the argument that as a
developer I should be able to invest into proper hardware) that means
I am burning battery power of my laptop/tablet/phone each time the GPU
starts cooking, simply because I resize my main window!
Yes. Fortunately, your GPU will be burning less battery power than the
equivalent operation on the CPU. So you have a net gain in battery
consumption.
Do you really think that we'd be targeting OpenGL if it consumed more power?
Remember who is the main backer of the new architecture and what kind of
devices they sell.
And as long as you have a static UI, your GPU will still be idle, just as
it was with Qt 4. Using OpenGL doesn't mean we'll constantly redraw the
screen even if nothing has changed.
Post by Thiago Macieira
Post by Till Oliver Knoll
- I want native widgets!
I want my application to look as natively as possible! Native, native,
native! Can't repeat that enough. Even better: Use native widgets
wherever possible (e.g. push buttons, drop-down boxes etc.). No
rounded corners, no drop shadow, no textures where the OS window
manager would not render them anyway!
You're calling for two separate things there. You want either native, or you
want no drop shadows and no rounded corners. If the native widgets have them,
asking not to have them means having non-native widgets.
I don't know how we're going to implement native widgets in the QML-based
world, though.
Post by Till Oliver Knoll
- I for sure don't want to hand-code any XML-like GUI files!
We have Qt Designer for a reason! Editing GUI in a text file is sooo
late century, you know! And if I want to programmatically define the
GUI, then I want it to be blazing fast, means compiled. With a
well-documented API, simple to use. Oh, we already have that, it's
called Qt...
There's a Qt Quick Designer too.
Whether you're going to be able to interface with generated, type-safe C++
code is uncertain. Probably unlikely.
Post by Till Oliver Knoll
- I want a small memory/disk footprint!
A small application on a Mac (or Windows, can't remeber)I brought to
about a little bit under 10 MBytes, linking to QtGui and QtCore (Cocoa
64 bit only, stock Qt 4.7 distribution). That is already a LOT! By
modularising Qt even more - e.g. split the special QWidgets into a
separate module than QtGui - I'd expect to bring this value to a even
lower value. I am talking about a small GUI application. Now what if I
would actually need to link against WebKit etc., just to get a decent
JavaScript engine?
Well, we're fully aligned on that goal then. Low memory footprint (both
binary size and RAM) is one of the things we're striving for.
Post by Thiago Macieira
You're getting exactly that. The widgets are in QtWidgets.
The V8 engine isn't part of WebKit and doesn't require loading QtWebKit. You
load QtWebKit if you want to display web pages.
Post by Till Oliver Knoll
I do understand that there is a "research" project on the way to bring
"desktop widgets" to QML. QActions? Oh yes, we need to research that.
Layout managers? Huh... yeah, we thought about that too, needs some
more research. Signals/slots? Menues? Toolbars? Lists? And all this
from the C++ without touching ANY JavaScript or wrapper?
Why did you put the word "research" in quotations? Did you mean to imply it's
not valid research? That it will never see the light of day? That you don't
care about it? I don't know if you realise it, but it also demeans the people
doing the research.
And I've seen some pretty good stuff coming out of this already. It's how
a lot of our development is done. We try out things first and only put
them into the product once we are confident it's the right thing. We could
have simply added some hooks for the desktop to QML, but chances are we'd
have gotten it wrong. Then it's better to leave it out until we are
confident.
Post by Thiago Macieira
Post by Till Oliver Knoll
Hey yes, EVENTUALLY we will be there. But my point is: we will be
there WHERE WE ARE RIGHT NOW! Because the way the QWidget approach
works in combination with Qt signals/slots and Qt Designer JUST ROCKS!
And programmatically creating "dynamic GUIs" by adding menu entries,
enabling/disabling widgets, making them in/visible, populating lists
programmatically is almost a no-brainer with the wonderful Qt API!
See my comment above.

For many use cases QWidgets are simply not adequate. And developing and
maintaining them is a lot harder than doing the equivalent functionality
in QML. Everybody that has really tried it will confirm that.

In addition I believe you'll start seeing this on the desktop as well
pretty soon also need things QWidgets can't support (e.g. with Windows 8).
Already now, we had huge problems implementing the Mac style. The
animations built into it required rather ugly hacks inside Qt to be able
to get the native look and feel you so loudly shout for. Doing the same in
QML is trivial.
Post by Thiago Macieira
No, we won't be right back where we are right now. We will have new
technologies, easier to develop with for people who are not as bright as you
are (but often have better grasp of UIs) and they will be properly hardware-
accelerated. We'll have properly separated the UI from the logic. We'll have
something sustainable for the next 5-10 years or more.
I appreciate that it just works for you today. And that's a testament to the
effort put in by the same engineers who are now telling you QML is the way
forward. However, you're failing to see the maintenance overhead that these
engineers have faced to keep the widgets working nicely for you. You're
failing to see that we've reached the limit of optimising them further. And if
you think this technology just rocks, you should be duly impressed by the new
one.
It's no wonder: of course the proven technology you know is easier than the
technology you don't, yet to prove itself.
Post by Till Oliver Knoll
Now to be fair: I have not much experience with QML other than
And this sentence should invalidate your entire email. Are you really crying
out against a technology you haven't given a chance?
Post by Till Oliver Knoll
Why do browsers want to be able to execute native C code nowadays and
become more and more of a "runtime environment" for I don't know what?
And why are desktop toolkits so keen on bringing whole web browsers
into their dialogs? (Not that I mind having a great QWebKit
implementation available - IF I need it ;)
That's exactly what we're trying to do: bridge the two worlds, of native and
of interpreted, dynamic languages. The only difference is that we're not
betting exclusively on HTML 5, but instead providing a language suitable for
dynamic UIs.
Post by Till Oliver Knoll
But to summarise: as it appears to me now at least QWidgets have
clearly become second class citisen. And I am NOT talking about that
there won't be any new development, such as new widgets such as
ribbons (God beware ;). I am perfeclty fine with "it is as good as it
gets and we just reached that point". Some bugfixing here (yes, on Mac
there are still some glitches here and there), and I'd be happy!
You're getting it. Just remember that the bugfixes won't be to little glitches
on Mac. More likely, they will be for crashes or really ugly issues.
Unless someone wants to take over maintainership and drive again development.
Remember that whoever wants to do this will have to keep the stability, so
maintainership can be revoked if too many regressions are introduced and not
fixed. In essence: we don't recommend doing this.
Post by Till Oliver Knoll
I am talking about that they are now placed on TOP of the "QML stack",
That's a mistaken assumption. They are not.
Post by Till Oliver Knoll
And don't be mad, I highly appreciate the work being done, but still I
think this whole "QML desktop research" is a waste of time! There is
nothing to gain except what we have already now! And I am HAPPY what
we have now!
That's really offensive to the people doing it.
And it's as far from the truth as it can get.

Simply because also the desktop is evolving and following that evolution
with QWidgets will be impossible. Look a the new Windows 8 UI, then try to
implement it with QWidgets and with QML. Then we talk again.
Post by Thiago Macieira
Post by Till Oliver Knoll
Don't tell me that in the future it will be so much
easier to animate my buttons, have rounded corners, glossy shiny
effects... if the window manager doesn't render that, I don't WANT
that!
The window manager has nothing to do with it. It cares about top level
windows, not what's happening within.
Post by Thiago Macieira
Oh, but you're forgetting that the UIs of the future will be like that because
customers are demanding it and others are driving it! So you want to keep your
UIs as they are... Let's say you had kept them as they were 14 years ago.
http://www.linux-kongress.org/1997/kde_desktop.gif
So let me summarise: we cannot stop innovating.
Post by Till Oliver Knoll
So here is my vote: Modularise Qt in such a way that the
"old-fashioned" QWidget approach works as before: no JavaScript
engine, no OpenGL dependency, just the clean C++ API with its blazing
performance as we know it. And if I really want to use QML I just link
to those libraries as needed - with all its fancy and shiny glory!
You've got it. But it will stay as it is. Look at that link above again. Now
place yourself in your 2016 shoes and look at your UIs of today.
Post by Till Oliver Knoll
Thanks for those who actually read until here, and apologise again to
those who skipped reading long time ago. ;) I just had to off-load
here a few concerns, and a little bit frustration after pretty much
exactly 10 years of Qt coding and promoting! I hope I started some
CONSTRUCTIVE discussion, by starting with an admittedly somewhat
extreme point ;)
Unfortunately, you lost time writing all of that based on mistaken
assumptions. If you had just taken the time to clarify first...
The basic mistake is to assume the future will look exactly like things
look today. We know it wont.

Cheers,
Lars
Petr Vanek
2011-10-07 19:20:42 UTC
Permalink
Post by Peter Kümmel
Hi Till,
let me also add some of my comments here. What I'm seeing here is lots of
fears that I don't believe are rooted in reality.
Did you try to compile Qt5 and run the Qt5 Designer lately? I have done it
what is the best repo to test it, please?
l***@nokia.com
2011-10-07 19:35:50 UTC
Permalink
Post by Petr Vanek
Post by Peter Kümmel
Hi Till,
let me also add some of my comments here. What I'm seeing here is lots of
fears that I don't believe are rooted in reality.
Did you try to compile Qt5 and run the Qt5 Designer lately? I have done it
what is the best repo to test it, please?
On X11 with the xcb backend (as that's furthest right now, the other
platforms still have more problems). Compile qtbase, qtdeclarative (as
some small part of qtools, not designer depends on it), then qttools.

Cheers,
Lars
Stefan Majewsky
2011-10-10 09:39:48 UTC
Permalink
Post by l***@nokia.com
Putting QWidgets on top of/inside the scene graph is doable without
performance regressions. We haven't done it though.
Personally, I consider such an effort top priority if you want people
to migrate from QtWidgets to Qt Quick 2.

At kdegames, we have 40 applications which are nearly all based on
QGraphicsView. Reality is that GUI and logic are not separated
properly; the views, scenes and items contain most of the logic.

It's simply not feasible to start porting these towards a
scene-graph-based interface unless there is a way to embed the
QGraphicsView into the chrome provided by Qt Quick 2.

Greetings
Stefan
Konstantin Tokarev
2011-10-10 10:05:02 UTC
Permalink
Post by Stefan Majewsky
 Putting QWidgets on top of/inside the scene graph is doable without
 performance regressions. We haven't done it though.
Personally, I consider such an effort top priority if you want people
to migrate from QtWidgets to Qt Quick 2.
Like what Apple is doing: to make people use something new one should
make them feel that something old is less attractive than it was before...
Post by Stefan Majewsky
At kdegames, we have 40 applications which are nearly all based on
QGraphicsView. Reality is that GUI and logic are not separated
properly; the views, scenes and items contain most of the logic.
However, I can see benefits of specifically QGraphicsView running on top
of scene graph.
--
Regards,
Konstantin
Stefan Majewsky
2011-10-10 12:16:41 UTC
Permalink
Post by Konstantin Tokarev
Post by Stefan Majewsky
Personally, I consider such an effort top priority if you want people
to migrate from QtWidgets to Qt Quick 2.
Like what Apple is doing: to make people use something new one should
make them feel that something old is less attractive than it was before...
Stop turning the words in my mouth around. Although I approve of most
of the criticisms in Qt Quick as it is now, I want to migrate to it
when it is up to the task (most importantly for the upcoming
touch-optimised versions of our games).

It's not about making QtWidgets "less attractive than it was before",
but about making Qt Quick more attractive as it is now.

Greetings
Stefan
Alexis Menard
2011-10-10 11:23:57 UTC
Permalink
On Mon, Oct 10, 2011 at 6:39 AM, Stefan Majewsky
Post by Stefan Majewsky
Post by l***@nokia.com
Putting QWidgets on top of/inside the scene graph is doable without
performance regressions. We haven't done it though.
Personally, I consider such an effort top priority if you want people
to migrate from QtWidgets to Qt Quick 2.
I think this opens a pandora box just like QGraphicsProxyWidget.
People will expect to put anything inside and hope that it will work
and get angry when it doesn't (not knowing why it can't work).
But if it's easier and less error prone that QGraphicsProxyWidget then
yes perhaps it's a good step.

QWidget->QML is not a trivial port though so at some point people will
have to move the code from C++ to QML.

I think we should focus on having a good Qt Component for desktop.
Post by Stefan Majewsky
At kdegames, we have 40 applications which are nearly all based on
QGraphicsView. Reality is that GUI and logic are not separated
properly; the views, scenes and items contain most of the logic.
It's simply not feasible to start porting these towards a
scene-graph-based interface unless there is a way to embed the
QGraphicsView into the chrome provided by Qt Quick 2.
Thing is that most of the logic could be written JS. I was wondering
if that's better to have an intermediate solution rather than thinking
if it could be worth to re-think the entire thing (for simple kdegames
of course).
Post by Stefan Majewsky
Greetings
Stefan
_______________________________________________
Qt5-feedback mailing list
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
--
Alexis Menard (darktears)
Software Engineer
INdT Recife Brazil
Stefan Majewsky
2011-10-10 12:36:40 UTC
Permalink
On Mon, Oct 10, 2011 at 1:23 PM, Alexis Menard
Post by Alexis Menard
I think this opens a pandora box just like QGraphicsProxyWidget.
People will expect to put anything inside and hope that it will work
and get angry when it doesn't (not knowing why it can't work).
But if it's easier and less error prone that QGraphicsProxyWidget then
yes perhaps it's a good step.
QWidget->QGraphicsView is (or at least feels like) an entirely
different porting story than QWidget+QGraphicsView->QtQuick for two
reasons:

1. QGraphicsView and QtWidgets have blatantly different usecases (user
interface vs. visualization), while QtQuick is a "UI Construction
Toolkit" (the "uick" in "Quick") just like QWidgets.

2. Porting QWidget to QGraphicsView can happen from inside to outside
(usually single widgets with custom paintEvent() have been converted
into a QGraphicsView) while, from what I can currently project,
porting to Qt Quick while happen from the outside, starting at the
mainwindow level, while leaving the contained QWidgets (or
QGraphicsView) intact during the porting.
Post by Alexis Menard
QWidget->QML is not a trivial port though so at some point people will
have to move the code from C++ to QML.
That's why I want to do it step to step, and again, starting at the
standardized chrome layer (mainwindow with menu, tool, and status
bars) looks like the obvious direction, not only because this is the
point where most needs to be changed in touch-friendly ports for
mobile.
Post by Alexis Menard
Thing is that most of the logic could be written JS. I was wondering
if that's better to have an intermediate solution rather than thinking
if it could be worth to re-think the entire thing (for simple kdegames
of course).
We have a handful spare-time developers on a codebase of 260 KLOC, and
you're asking to switch languages? No, thanks.

As I said numerours times, I really like the idea behind Qt Quick and
QML. And I agree that many things can be done in JavaScript very well.
But we're talking about existing code here. So there must be a huge
improvement if you want us to just consider using JS for the game
logic. But there is no improvement: It's not faster, it's not simpler
(just because of a direct port to JS), but on the other hand the bug
will definitely introduce regressions. That hasn't to do with the
quality of the involved technologies and/or people, it's simple math
for N = 260 KLOC.

My point is, you should stop wondering about people who have never
used Qt Quick complaining about Qt Quick if you tell people to rewrite
their business logic in JS. Of course these are not your exact words,
but many people seem to take it like this, and in some way I
understand them.

Greetings
Stefan
Alexis Menard
2011-10-10 12:41:13 UTC
Permalink
On Mon, Oct 10, 2011 at 9:36 AM, Stefan Majewsky
Post by Stefan Majewsky
On Mon, Oct 10, 2011 at 1:23 PM, Alexis Menard
Post by Alexis Menard
I think this opens a pandora box just like QGraphicsProxyWidget.
People will expect to put anything inside and hope that it will work
and get angry when it doesn't (not knowing why it can't work).
But if it's easier and less error prone that QGraphicsProxyWidget then
yes perhaps it's a good step.
QWidget->QGraphicsView is (or at least feels like) an entirely
different porting story than QWidget+QGraphicsView->QtQuick for two
1. QGraphicsView and QtWidgets have blatantly different usecases (user
interface vs. visualization), while QtQuick is a "UI Construction
Toolkit" (the "uick" in "Quick") just like QWidgets.
2. Porting QWidget to QGraphicsView can happen from inside to outside
(usually single widgets with custom paintEvent() have been converted
into a QGraphicsView) while, from what I can currently project,
porting to Qt Quick while happen from the outside, starting at the
mainwindow level, while leaving the contained QWidgets (or
QGraphicsView) intact during the porting.
Post by Alexis Menard
QWidget->QML is not a trivial port though so at some point people will
have to move the code from C++ to QML.
That's why I want to do it step to step, and again, starting at the
standardized chrome layer (mainwindow with menu, tool, and status
bars) looks like the obvious direction, not only because this is the
point where most needs to be changed in touch-friendly ports for
mobile.
Post by Alexis Menard
Thing is that most of the logic could be written JS. I was wondering
if that's better to have an intermediate solution rather than thinking
if it could be worth to re-think the entire thing (for simple kdegames
of course).
We have a handful spare-time developers on a codebase of 260 KLOC, and
you're asking to switch languages? No, thanks.
As I said numerours times, I really like the idea behind Qt Quick and
QML. And I agree that many things can be done in JavaScript very well.
But we're talking about existing code here. So there must be a huge
improvement if you want us to just consider using JS for the game
logic. But there is no improvement: It's not faster, it's not simpler
(just because of a direct port to JS), but on the other hand the bug
will definitely introduce regressions. That hasn't to do with the
quality of the involved technologies and/or people, it's simple math
for N = 260 KLOC.
That's why I talked about small project.
Post by Stefan Majewsky
My point is, you should stop wondering about people who have never
used Qt Quick complaining about Qt Quick if you tell people to rewrite
their business logic in JS. Of course these are not your exact words,
but many people seem to take it like this, and in some way I
understand them.
I don't tell them to do so, I ask them to think that it could be a
possible solution if the amount of code is small.

Many parts can't be written in JS and I'm aware of it. I just say that
in some cases it makes sense.
Post by Stefan Majewsky
Greetings
Stefan
_______________________________________________
Qt5-feedback mailing list
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
--
Alexis Menard (darktears)
Software Engineer
INdT Recife Brazil
Adriano Rezende
2011-10-10 16:44:06 UTC
Permalink
On Mon, Oct 10, 2011 at 6:39 AM, Stefan Majewsky
Post by Stefan Majewsky
Post by l***@nokia.com
Putting QWidgets on top of/inside the scene graph is doable without
performance regressions. We haven't done it though.
Personally, I consider such an effort top priority if you want people
to migrate from QtWidgets to Qt Quick 2.
At kdegames, we have 40 applications which are nearly all based on
QGraphicsView. Reality is that GUI and logic are not separated
properly; the views, scenes and items contain most of the logic.
It's simply not feasible to start porting these towards a
scene-graph-based interface unless there is a way to embed the
QGraphicsView into the chrome provided by Qt Quick 2.
Supporting QWidget or QGV on top of QtQuick2 would be a huge mistake
IMO. It would be a political movement that will not end up well in the
long term. If one wants to use QML, they must use it in the right way,
avoiding creating a Frankestein application. We already suffered with
QGraphicsProxyWidget for no real gain. QtQuick2 needs to provide all
features to support all the real use cases without creating a
bridge/portal that could summon old demons.

Br,
Adriano
Georg Rudoy
2011-10-10 17:52:02 UTC
Permalink
Post by Alexis Menard
On Mon, Oct 10, 2011 at 6:39 AM, Stefan Majewsky
Post by Stefan Majewsky
Post by l***@nokia.com
Putting QWidgets on top of/inside the scene graph is doable without
performance regressions. We haven't done it though.
Personally, I consider such an effort top priority if you want people
to migrate from QtWidgets to Qt Quick 2.
At kdegames, we have 40 applications which are nearly all based on
QGraphicsView. Reality is that GUI and logic are not separated
properly; the views, scenes and items contain most of the logic.
It's simply not feasible to start porting these towards a
scene-graph-based interface unless there is a way to embed the
QGraphicsView into the chrome provided by Qt Quick 2.
Supporting QWidget or QGV on top of QtQuick2 would be a huge mistake
IMO. It would be a political movement that will not end up well in the
long term. If one wants to use QML, they must use it in the right way,
avoiding creating a Frankestein application. We already suffered with
QGraphicsProxyWidget for no real gain. QtQuick2 needs to provide all
features to support all the real use cases without creating a
bridge/portal that could summon old demons.
But that's the only sane and feasible way of porting big QWidget-based
applications to QML. One would do it iteratively, for example,
top-down, first putting the whole QMainWindow into QML context, then
start rewriting different parts of it in QML.

I guess it's quite obvious that this way is much better, much more
manageable, doable by small opensource teams, feasible for
more-or-less mature projects, and such.
--
  Georg Rudoy
  LeechCraft — http://leechcraft.org
Adriano Rezende
2011-10-10 20:26:23 UTC
Permalink
Post by Georg Rudoy
Post by Adriano Rezende
Supporting QWidget or QGV on top of QtQuick2 would be a huge mistake
IMO. It would be a political movement that will not end up well in the
long term. If one wants to use QML, they must use it in the right way,
avoiding creating a Frankestein application. We already suffered with
QGraphicsProxyWidget for no real gain. QtQuick2 needs to provide all
features to support all the real use cases without creating a
bridge/portal that could summon old demons.
But that's the only sane and feasible way of porting big QWidget-based
applications to QML. One would do it iteratively, for example,
top-down, first putting the whole QMainWindow into QML context, then
start rewriting different parts of it in QML.
I know that it would give you faster results but it would also lead to
a very bad/ugly integration since both worlds have different ways to
expose their features; a different architecture would also be required
for a QtQuick application. If source quality must be preserved, a
bottom-up approach would be better, since the critical parts resides
in the development of the custom widgets that cannot be created using
pure QML.

Br,
Adriano
Georg Rudoy
2011-10-10 20:34:37 UTC
Permalink
Post by Adriano Rezende
Post by Georg Rudoy
Post by Adriano Rezende
Supporting QWidget or QGV on top of QtQuick2 would be a huge mistake
IMO. It would be a political movement that will not end up well in the
long term. If one wants to use QML, they must use it in the right way,
avoiding creating a Frankestein application. We already suffered with
QGraphicsProxyWidget for no real gain. QtQuick2 needs to provide all
features to support all the real use cases without creating a
bridge/portal that could summon old demons.
But that's the only sane and feasible way of porting big QWidget-based
applications to QML. One would do it iteratively, for example,
top-down, first putting the whole QMainWindow into QML context, then
start rewriting different parts of it in QML.
I know that it would give you faster results but it would also lead to
a very bad/ugly integration since both worlds have different ways to
expose their features; a different architecture would also be required
for a QtQuick application. If source quality must be preserved, a
bottom-up approach would be better, since the critical parts resides
in the development of the custom widgets that cannot be created using
pure QML.
That's more of migration process details, I guess. Whether bottom-up
or top-down, you'd still need to be able to have both QWidget-based
stuff and QML-based stuff in your application.

And, well, buggy/ugly integration is OK as long it is not a final
result. I think there is just no way of porting a >200 kLOC
application seamlessly, quickly and without much pain.

Anyway, the more logic was separated from UI in the original app, the
less changes should be made to the architecture. So one could split
this into two parts: separate the logic and then change the UI to QML.
--
  Georg Rudoy
  LeechCraft — http://leechcraft.org
Stefan Majewsky
2011-10-10 17:54:12 UTC
Permalink
On Mon, Oct 10, 2011 at 6:44 PM, Adriano Rezende
Post by Adriano Rezende
Supporting QWidget or QGV on top of QtQuick2 would be a huge mistake
IMO. It would be a political movement that will not end up well in the
long term. If one wants to use QML, they must use it in the right way,
avoiding creating a Frankestein application.
Fine. If that's the general attitude, I'm staying with QtWidgets. I'm
not stubborn or anything, I just cannot afford so much time at once.

Greetings
Stefan

P.S. If this is only about communication, then do it as a part of Qt4Support.
Olivier Goffart
2011-10-07 13:32:02 UTC
Permalink
On Friday 07 October 2011 14:27:20 Till Oliver Knoll wrote:
[...]
Post by Till Oliver Knoll
But recently it turned out that the whole paint stack, the "scene
graph", will be completely rewritten, to favour the QML architecture.
The scene graph is a technology that has been writen specifically for QML,
If you want to use it, you indeed need QML.

But QPainter and QWidget stays there, and are not that bad.
(QWidget can't use the scene graph because it has been designed for imperative
programming (the way QStyle works))
Post by Till Oliver Knoll
And it turns out that for all these "fancy effects" we now need OpenGL
support to get any descent performance. And what's more, the whole
QWidget implementation will sit on top of all that.
I am not sure you are correct.
Don't confuse lighthouse and scene graph.
QWindow (the replacement for top level widget) may indeed require OpenGL (to
simplify the implementation)
Post by Till Oliver Knoll
So in the worst case I will have to link against all these JavaScript engine
and what-not libraries, just to display a "Hello World" in a QLineEdit,
implemented as some QML element in the background, interpreted by some
JavaScript engine, rendered by some OpenGL stack... but nicely shaded
maybe (which by the way I don't want at all, as I want my QLineEdit
look exactly as the "native" one!).
No, as you stated before, if you do not want Javascript or QML, you don't link
to it.

There was a huge thread before regarding moving V8 (the javascript engine) to
QtCore. But the result of this discussion is that this will not happen.
QtV8 stays a separate library, and you don't need to link to it to use your
QWidgets
Post by Till Oliver Knoll
So QWidget has clearly become 2nd class and with regards to performance "we"
have to take what's left for us! At least that is my impression from some
discussions I followed.
QWidget has some performence limitations in their design that are not possible
to solve. This is why the scenegraph has been developed. And that will not
work for QPainter and it's imperative drawing.
Now, QWidget do not loose anything, it just stays behind, where it was.
Post by Till Oliver Knoll
- I don't want to use any JavaScript in my code!
[...]

Qt5 is not a problem here.
Post by Till Oliver Knoll
- I want performance!
I have tested one of my 4.7.3 Qt applications on a >10 year old HP
laptop running Windows 2000 on a Pentium III 600 MHz, 512 MByte RAM.
Just for the fun of it. And it ran perfectly! The main window resized
smoothly and overall GUI performance was very snappy. I am happy with
this! And that is the benchmark I will refer to when testing any
QWidget application on top of Qt 5.
Please try it with the current development branch of Qt5. I see no reason why
it would not work anymore.
Post by Till Oliver Knoll
But with the current requirement that even the QWidget based apps now
need OpenGL support that means I cannot even run my apps in a virtual
machine such as VirtualBox on a Mac in a decent way (and yes, I AM
cross-developing a lot in VirtualBox, for both Windows and Linux)!
You should be able to use software randering. (llvmpipe)
If you still use the plain widget as before without fancy effect, it should
not be slower than the current raster engine.
http://labs.qt.nokia.com/2011/05/31/qml-scene-graph-in-master/
Post by Till Oliver Knoll
But even from a user perspective (I'd accept the argument that as a
developer I should be able to invest into proper hardware) that means
I am burning battery power of my laptop/tablet/phone each time the GPU
starts cooking, simply because I resize my main window!
The GPU is optimized to do draw, it may uses less power than the CPU.
Post by Till Oliver Knoll
Oh and yes, I also do OpenGL based applications, and I'd hate it to
see the widgets taking away valuable GPU cycles and introducing locks
by GL context-switching, simply because that damn button needs to have
its drop-shadow rendered nicely! (Yes, I am aware that OS X for
instance does nothing else - but Qt would again render ON TOP of that
with its own GL context etc.).
I can't answer to that.
Post by Till Oliver Knoll
- I want native widgets!
I want my application to look as natively as possible! Native, native,
native! Can't repeat that enough. Even better: Use native widgets
wherever possible (e.g. push buttons, drop-down boxes etc.). No
rounded corners, no drop shadow, no textures where the OS window
manager would not render them anyway!
Even with QML, there is some work in the desktop componenent to do exactly
that.
Post by Till Oliver Knoll
- I for sure don't want to hand-code any XML-like GUI files!
We have Qt Designer for a reason! Editing GUI in a text file is sooo
late century, you know! And if I want to programmatically define the
GUI, then I want it to be blazing fast, means compiled. With a
well-documented API, simple to use. Oh, we already have that, it's
called Qt...
I wouldn't mind if the Qt Designer would create QML files under the
hood. Much the same way I don't care about the actual content of the
current UI files. As long as I would interface against a compiled C++
class in my own code! And there's type-safety, and not some "Oh let's
see what that string could be, let's cast it as an int at runtime..."
And if I rename a widget in Qt Designer I want to get a COMPILE error!
And not just a runtime error because the JavaScript/QML interpreter
figured only out by then.
QtCreator has an embedded QML visual editor for exactly this purpose.
It is still far from being equal to designer, but it is actively developped.
Post by Till Oliver Knoll
- I want a small memory/disk footprint!
[...]

Again, i suggest you to try the current snapshot of Qt5 and see the actual
problem. Qt5 should be smaller.
Post by Till Oliver Knoll
I do understand that there is a "research" project on the way to bring
"desktop widgets" to QML. QActions? Oh yes, we need to research that.
Layout managers? Huh... yeah, we thought about that too, needs some
more research. Signals/slots? Menues? Toolbars? Lists?
Yes, there is research and it takes time. QML is still very young.
Let it mature.
Post by Till Oliver Knoll
And all this from the C++ without touching ANY JavaScript or wrapper?
It is clear that QML will require you to touch JavaScript. But only for simple
bindings.
Post by Till Oliver Knoll
Now to be fair: I have not much experience with QML other than
studying some example code and running it! [...]
Now to be fair: your post is a bit long and I stopped reading here :-)

But I think your post was based on incorrect asumptions that I hope are
clarified.
Thanks for your input anyway.
Petr Vanek
2011-10-07 13:53:03 UTC
Permalink
I agree with all points you listed here.

It would be great if some core Qt developers can provide more informations or let's say edification about this "all is QML" stuff. What does it improve - I mean *really* improve. Now it seems it's just less-doing another syntax for widgets. Maybe accelerated over GPU.
But enforcing GPU acceleration blocks (as it was said) various virtualization tools etc.

Then imagine that we chose Qt as a GUI toolkit for our product using it with special language bindings (smoke, etc.) and those tools sometimes run over network (X11) from old solaris machine...

OK, maybe I'm fearing some non-existing problems but definitely it needs more evangelization. Now I feel like "hey, QML works, it can paint button, throw away qwidgets, let's move all to qml..."
Post by Till Oliver Knoll
A couple of months ago my impression was that QML will "live happily
in parallel" to QWidgets. They are implemented in a separate "module",
they link to their own required libraries, but that wouldn't concern
me at all as a QWidget desktop application programmer. I would still
...

this is what I thought - it will stay forever and QML can be used for some "quick development" (still I cannot imagine myself that coding QML can be quick).

cheers,
petr

P.S.: I don't mean this message as a rude or an un-polite scream...
Uwe Rathmann
2011-10-07 14:11:57 UTC
Permalink
Post by Till Oliver Knoll
But recently it turned out that the whole paint stack, the "scene
graph", will be completely rewritten, to favour the QML architecture.
And it turns out that for all these "fancy effects" we now need OpenGL
support to get any descent performance. And what's more, the whole
QWidget implementation will sit on top of all that.
From what I understood this is not true. The QML stuff will sit on the
Scene Graph but QWidget continues using the old paint stack. It seems to
be undecided if both graphic systems can be used in the same application.

So when you want to stay with QWidget you won't have a problem. But
people who want to use QML in general, but have to use QWidget for only
one specific use case they might have lost. But as far as I understood
you can use the scene graph from C++ too - what might be the solution to
work around limitations of QML.

We all remember what was wrong with how Qt4 was introduced and I honor,
that the developers take care, that this happens again with Qt5. But what
we can see this time seems to be the opposite: 2 completely different
implementations for the same thing.

But what does this mean for the future:

Sooner or later you will find more functionality in QML components and
you will find yourself in the situation that you have to use this world -
or reimplement it in application code for QWidget.

Another scenario I can imagine is, that QWidgets will become its own
project maintained by people who are interested in it. Then we might see
real competition between both solutions.

But, what do I know,

Uwe
Uwe Rathmann
2011-10-07 14:33:50 UTC
Permalink
Post by Uwe Rathmann
We all remember what was wrong with how Qt4 was introduced and I honor,
that the developers take care, that this ...
Of course I wanted to write: "... won't happen again with Qt5.

Sorry,
Uwe
Quim Gil
2011-10-07 16:55:18 UTC
Permalink
Hi Daniel,

In short, QWidget has probably a long life in the desktop but in mobile
it's fading away fast already in Qt 4.7/4.8 since Qt Quick is just a lot
better to obtain a good user experience. We are talking about the UI
frontend only, in the backend your Qt code is just as good for any form
factor.
Post by Daniel Mendizabal
But what happen now when new mobile phones come with Qt5 without
QWidget support? All existing projects based on this technology
currently in OVI store or private clients will stop working from one
day to the other?
First note that one thing is the Qt Project (deciding e.g. what is
supported in Qt 5) and another thing is Nokia or any other vendor
shipping Qt enabled products (deciding what Qt versions and support they
have for their products).
Post by Daniel Mendizabal
On the other hand, what happen with the users who purchased these
applications from OVI store? Will they loose them as soon as their
devices are upgraded to Qt5...?
Symbian Belle and MeeGo 1.2 Harmattan are the last Nokia releases
shipping Qt libraries. They are based on Qt 4 and afaik there haven't
been any announcements on upgrading them to Qt 5. As a matter of fact
Nokia Developer has been insisting on the use of Qt Quick for mobile
apps for a while now. For instance, in the Nokia N9 QWidget is not
supported already.

Would you mind pointing to your Qt apps in the Nokia store? Just curious
and interested in thinking their best upgrade path to Qt 5 enabled
products. You say they have a bunch of code behind but is all of it
QWidget UI? Note that you can keep your Qt backend intact and plug it to
a QML UI with relative ease. This is probably a good idea for mobile
apps based on Qt 4 already.

--
Quim Gil
Michael Hasselmann
2011-10-07 17:07:15 UTC
Permalink
Post by Quim Gil
Hi Daniel,
In short, QWidget has probably a long life in the desktop but in mobile
it's fading away fast already in Qt 4.7/4.8 since Qt Quick is just a lot
better to obtain a good user experience. We are talking about the UI
frontend only, in the backend your Qt code is just as good for any form
factor.
If only. Traditional widget-based code seems to always gravitate to
implement business logic within (derived) widgets themselves. It just
seems to be the natural way. Your business logic then also starts to
depend on widget-specific behaviour.

Actually, one of Qt's portability promises was that you did not have to
worry too much about splitting your QWidgets from the rest of your (Qt)
code – it would still run on all supported platforms.

It seems that cutting the QWidget dependency can be rather painful for
established projects.

regards,
Michael
Daniel Mendizabal
2011-10-08 14:00:08 UTC
Permalink
Post by Quim Gil
Note that you can keep your Qt backend intact and plug it to
a QML UI with relative ease. This is probably a good idea for mobile
apps based on Qt 4 already.
I have been reading about using C++ with QML UI, but I don't find it straight forward at all. And the reason is simple, Qt project is focusing to change C++ to java in the future, so I assume that only a minimum effort will be invested in making C++ an alternative to code for QML.
I chose Qt because of C++ centralization. I have no intention to change and use Java. Any improvement to the graphic system and the UI design should be also well supported for applications written in pure C++ without having to touch the QML file. Same as we were used to before with the .ui files which were created automatically by QtDesigner and I never had to bother changing anything inside or even opening the file to study the structure.

Going forward, the procedure to use QML in C++ environment that I've been analyzing is:
- Changing the inherited class QWidget to QDeclarativeView for each window and load the UI using setSource("file.qml"). The latter would replace setupUI(this).
- Act on the children of this window with: findChild<QObject*>("children")->setProperty(..)
- Receive signals from the children of this windows connecting QML signals with handlers inside the C++ class.

It comes with a lot of tricky methods for something that was very simple before. And on top of the complexity there are some restrictions that I can foresee already:
- Multi platform capability isn't as simple anymore: The inclusion of QML components for different platforms make that the source code needs to be changing to compile for MeeGo, Symbian, Linux, Windows or Mac platform every single time. The current Qt4 is as simple as changing the target in QtCreator and the application is compiled to the next OS without absolutely any change in your code.
- Some of the UI in my case are created dynamically either at compile time or at runtime. The former depending on the target platform and the latter depending on the device screen resolution. I don't see this possibility with QML.

Conclusion:
Many people think that making this change and moving to a declarative language will be a boost for the framework in the future. I don't want to stop the progress, but you need to understand that there are two type of applications:
- Applications that need to maximize user experience with animation, colors booms and flash here and there to catch your interest. Which I agree would be difficult to develop with the classical approach and therefore the flexibility of QML is very welcome. However, it should be possible to use the QGraphics framework, but it is another story.
- Applications oriented to productivity, utilities, etc. with the only requirement to have the feel and look from the underlying OS and theme will also possibly need more complex routines and the classical approach (QWidget/C++) would be much more suitable.
- You don't have to tell me again, I know that Qt project isn't going to have QWidgets as part of the core modules. But fortunately they are still part of the add-on libraries for all desktop platforms. I just want to SCREAM OUT that are developers requiring this API also for mobile platforms (Symbian, MeeGo, Android,...) so if potential maintainers are subscribed in this mail-list be confident that you will have many followers.
Thiago Macieira
2011-10-08 14:11:38 UTC
Permalink
Post by Daniel Mendizabal
- Applications oriented to productivity, utilities, etc. with the only
requirement to have the feel and look from the underlying OS and theme will
also possibly need more complex routines and the classical approach
(QWidget/C++) would be much more suitable.
What data do you have to base your conclusion that QWidget / C++ is more
suitable?
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
Uwe Rathmann
2011-10-08 15:46:43 UTC
Permalink
Post by Thiago Macieira
What data do you have to base your conclusion that QWidget / C++ is more
suitable?
I can follow the argumentation for using the scene graph instead of
QWidget because of technical limitations. But introducing QML instead of C
++ is a completely unrelated decision and it's not valid to argue for QML
because of the scene graph - like it is not valid to argue for QWidget
because of C++.

The question what programming language is "more suitable" is a matter of
taste to a certain degree. Developers who are used to work with Qt/C++
will hate to learn/use something else ( read Olivers comments ) - others
might love it, because they hope not having to invest in learning about C+
+ or software development at all.

Fighting about which group is the majority is IMHO pointless - both
groups are relevant. And the success of Qt5 will depend on how far it
will support both.

Uwe
Daniel Mendizabal
2011-10-10 01:52:09 UTC
Permalink
Post by Uwe Rathmann
I can follow the argumentation for using the scene graph instead of
QWidget because of technical limitations. But introducing QML instead of C
++ is a completely unrelated decision and it's not valid to argue for QML
because of the scene graph - like it is not valid to argue for QWidget
because of C++.
The question what programming language is "more suitable" is a matter of
taste to a certain degree. Developers who are used to work with Qt/C++
will hate to learn/use something else ( read Olivers comments ) - others
might love it, because they hope not having to invest in learning about C+
+ or software development at all.
I think Uwe got just exactly the point.

QML is welcome from my point of view as long as it is easy and naturally usable with C++. I'm investing some time doing a small app with QML and coding with C++, so I'll put my feedback by then.
Peter Kümmel
2011-10-09 08:38:51 UTC
Permalink
Post by Thiago Macieira
Post by Daniel Mendizabal
- Applications oriented to productivity, utilities, etc. with the only
requirement to have the feel and look from the underlying OS and theme will
also possibly need more complex routines and the classical approach
(QWidget/C++) would be much more suitable.
What data do you have to base your conclusion that QWidget / C++ is more
suitable?
Duck typing?

Is there any mechanism in QML that guaranties that no run-time errors
will happen when the QML script is interpreted?

Qt5 will introduce static type checking for signal/slots-connects
so no connect could fail at run-time. But with interpreting QML at
run-time all the static checks of connects seems worthless when
QML is used, because much more errors could be introduced by the
QML script.

Peter
Post by Thiago Macieira
_______________________________________________
Qt5-feedback mailing list
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
Thiago Macieira
2011-10-09 09:31:30 UTC
Permalink
Post by Peter Kümmel
Duck typing?
Is there any mechanism in QML that guaranties that no run-time errors
will happen when the QML script is interpreted?
Qt5 will introduce static type checking for signal/slots-connects
so no connect could fail at run-time. But with interpreting QML at
run-time all the static checks of connects seems worthless when
QML is used, because much more errors could be introduced by the
QML script.
You seem to imply that any UI written in C++ will work out-of-the-box,
regardless of the quality of the code written, just because the slot
connections will error out at compile-time.

I don't know, I think spending 30 minutes in the #qt channel on Freenode
disproves that.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
Christian Ehrlicher
2011-10-09 09:41:44 UTC
Permalink
Post by Thiago Macieira
Post by Peter Kümmel
Duck typing?
Is there any mechanism in QML that guaranties that no run-time errors
will happen when the QML script is interpreted?
Qt5 will introduce static type checking for signal/slots-connects
so no connect could fail at run-time. But with interpreting QML at
run-time all the static checks of connects seems worthless when
QML is used, because much more errors could be introduced by the
QML script.
You seem to imply that any UI written in C++ will work out-of-the-box,
regardless of the quality of the code written, just because the slot
connections will error out at compile-time.
That's not the point. The point here is that js is an interpreted language
which means (as a simple example) a simple typo in the variable name can not
be found until the project is actually executed. I spent a lot of time to
throw a script language (tcl/tk) out of a project just to avoid this crap by
replacing it with C++/Qt and now Qt introduce exactly the same...


Christian Ehrlicher
Peter Kümmel
2011-10-09 10:36:12 UTC
Permalink
Post by Christian Ehrlicher
Post by Thiago Macieira
Post by Peter Kümmel
Duck typing?
Is there any mechanism in QML that guaranties that no run-time errors
will happen when the QML script is interpreted?
Qt5 will introduce static type checking for signal/slots-connects
so no connect could fail at run-time. But with interpreting QML at
run-time all the static checks of connects seems worthless when
QML is used, because much more errors could be introduced by the
QML script.
You seem to imply that any UI written in C++ will work out-of-the-box,
regardless of the quality of the code written, just because the slot
connections will error out at compile-time.
That's not the point. The point here is that js is an interpreted language
which means (as a simple example) a simple typo in the variable name can not
be found until the project is actually executed. I spent a lot of time to
That's exactly what I mean.
Post by Christian Ehrlicher
throw a script language (tcl/tk) out of a project just to avoid this crap by
replacing it with C++/Qt and now Qt introduce exactly the same...
Christian Ehrlicher
_______________________________________________
Qt5-feedback mailing list
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
Peter Kümmel
2011-10-09 09:49:48 UTC
Permalink
Post by Thiago Macieira
Post by Peter Kümmel
Duck typing?
Is there any mechanism in QML that guaranties that no run-time errors
will happen when the QML script is interpreted?
Qt5 will introduce static type checking for signal/slots-connects
so no connect could fail at run-time. But with interpreting QML at
run-time all the static checks of connects seems worthless when
QML is used, because much more errors could be introduced by the
QML script.
You seem to imply that any UI written in C++ will work out-of-the-box,
regardless of the quality of the code written, just because the slot
connections will error out at compile-time.
I never said that.

Static connect only catches errors at compile times which apart from that
would happen at run time.

But I have the impression nobody wanna here any critic of QML.
Seems all the Trolls have become SCRIPT-KIDDIES, which don't
wanna see the advantage of static typed languages.

But this already started with QVariant, with all the casting...


Peter
Thiago Macieira
2011-10-09 10:16:58 UTC
Permalink
Post by Peter Kümmel
But I have the impression nobody wanna here any critic of QML.
Seems all the Trolls have become SCRIPT-KIDDIES, which don't
wanna see the advantage of static typed languages.
And it seems the critics here do not see the advantage of QML over C++.

Both languages have their advantages and their disadvantages. Time will tell
which one has the upper hand.

My money is on the ease of making your UI in QML.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
Peter Kümmel
2011-10-09 10:35:12 UTC
Permalink
Post by Thiago Macieira
Post by Peter Kümmel
But I have the impression nobody wanna here any critic of QML.
Seems all the Trolls have become SCRIPT-KIDDIES, which don't
wanna see the advantage of static typed languages.
And it seems the critics here do not see the advantage of QML over C++.
Back to my original question: Is it somehow possible to catch typos
in QML variable names before running the app? Will QtCreator check it?
Or is there already a tool?
Post by Thiago Macieira
Both languages have their advantages and their disadvantages. Time will tell
which one has the upper hand.
Google already learned it. They plan to replace JS by Dart which will be
a typed language. I assume most important is that such a language could be
better optimized, but also for large projects such a language fits better.

Maybe it isn't that bad in Qt because only the GUI is implemented in QML,
business logic could still be C++.

But it looks like Google has already learned the JS-lesson, and Nokia not.

Peter
Post by Thiago Macieira
My money is on the ease of making your UI in QML.
_______________________________________________
Qt5-feedback mailing list
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
Uwe Rathmann
2011-10-09 14:32:53 UTC
Permalink
Post by Peter Kümmel
Maybe it isn't that bad in Qt because only the GUI is implemented in
QML, business logic could still be C++.
Yes and it looks like the idea of having different teams with different
skills for these tasks ( something I don't believe in, because for non
developers QML isn't easy enough ).

But where is this business logic separated from the GUI in applications
like these:
or http://


Or maybe other examples with more GUI stuff where QML is made for, but
what might be unusable because QML is not the right choice for only one
widget:
or http://


Uwe
Adriano Rezende
2011-10-10 16:42:11 UTC
Permalink
Post by Uwe Rathmann
Post by Peter Kümmel
Maybe it isn't that bad in Qt because only the GUI is implemented in
QML, business logic could still be C++.
Yes and it looks like the idea of having different teams with different
skills for these tasks ( something I don't believe in, because for non
developers QML isn't easy enough ).
I have to disagree, some designers are already using QML/JS for
prototyping instead of Flex.
Post by Uwe Rathmann
But where is this business logic separated from the GUI in applications
like these: http://youtu.be/j5FQmKPqhwg or http://
http://youtu.be/84SpU0OLSew
This case just shows a custom data provider integrated with a custom
widget. In the end, you just need to develop the widget and the data
provider in C++, as you already do, and expose them to QML as plugins,
providing configurable properties like the following:

import CustomWidgets 1.0

Oscilloscope {
width: 300
height: 300
xLineColor: "red"
yLineColor: "blue"
zLineColor: "green"

provider: SerialDataProvider {
source: "/dev/ttyS0"
}
}

This Oscilloscope plugin could also accept custom data providers in
order to handle different inputs.

I have a real use case that could also be addressed. I've created a
game (http://circus.indt.org) in pure C++ using QGraphicsView, but
I've decided to port to QML (keeping some parts in C++). That reduced
a lot the complexity of the code regarding screen
flows/states/animations, giving me more time to focus on the game
engine. In the end, the game canvas, the sound mixer and the level
provider are written in C++ and are used in the QML side as plugins or
global objects.
The developer must decide what makes sense to be kept in C++ and what
could be easily handled in Javascript.

Br,
Adriano
Quim Gil
2011-10-10 17:04:57 UTC
Permalink
Post by Adriano Rezende
Post by Uwe Rathmann
Post by Peter Kümmel
Maybe it isn't that bad in Qt because only the GUI is implemented in
QML, business logic could still be C++.
Yes and it looks like the idea of having different teams with different
skills for these tasks ( something I don't believe in, because for non
developers QML isn't easy enough ).
I have to disagree, some designers are already using QML/JS for
prototyping instead of Flex.
In fact this "designers and programmers working together" meme was my
first motivation to try Qt Quick myself instead of believing nice slides
& Henrik Hartz. ;) Now I'm designing functional and decent looking UIs
without any prior (or current) C/C++ knowledge, and not even decent JS
knowledge.

I work with Michael Hasselman (also in this list) in
http://miniature-chess.org , a mobile chess app. He is a "real
programmer" while I'm not even a real designer. He takes care of the
backend in C/C++ and I take care of the UI in QML, leaving some hooks in
the code for each other. It's working very well! Before QML my chances
of actually contributing any code were... very thin. Check
http://flors.wordpress.com/2011/08/25/how-quick-i-got-started-with-qt-quick/
if you are interested in the full story.

--
Quim
Uwe Rathmann
2011-10-10 19:06:04 UTC
Permalink
Post by Adriano Rezende
I have to disagree, some designers are already using QML/JS for
prototyping instead of Flex.
Kudos to all of these designers.

In my daily work ( http://www.fendt.com/us/tractors_variotronic.asp ) we
are supported by a designer team who made a beautiful design concept. But
they are artist - very far away from any programing.

On the Qwt support channels I see a completely different group of users
with limited programming skills: engineers and scientist. Maybe QML would
help them - but I'm not sure as they have to write the rest of the
application in C++ anyway.

I will try to offer an optional QML API for Qwt 7 ( even if the Qwt
community will hit me for another major redesign ) and let them decide.

Uwe
Adriano Rezende
2011-10-10 20:27:10 UTC
Permalink
Post by Uwe Rathmann
Post by Adriano Rezende
I have to disagree, some designers are already using QML/JS for
prototyping instead of Flex.
Kudos to all of these designers.
In my daily work ( http://www.fendt.com/us/tractors_variotronic.asp ) we
are supported by a designer team who made a beautiful design concept. But
they are artist - very far away from any programing.
Yes, they are artists. They just need minimal programming skills to
provide a good prototype. The quality of their source code is
irrelevant since in a real product the final code would be
reviewed/rewritten by real developers.
The advantage here, is that they work with final technology and they
are bounded to its limitation. Their widgets/screens could be used
temporarily during the application development so the developers could
focus on the critical parts letting the UI refinements/optimizations
for later stage.
Post by Uwe Rathmann
On the Qwt support channels I see a completely different group of users
with limited programming skills: engineers and scientist. Maybe QML would
help them - but I'm not sure as they have to write the rest of the
application in C++ anyway.
I will try to offer an optional QML API for Qwt 7 ( even if the Qwt
community will hit me for another major redesign ) and let them decide.
I think a QML API for Qwt would be great. Recently I had to create QML
widgets for Histograms and PieCharts in a desktop project. If a
library was already provided I would use it.

Br,
Adriano
Konstantin Tokarev
2011-10-09 09:22:55 UTC
Permalink
Post by Daniel Mendizabal
Post by Quim Gil
Note that you can keep your Qt backend intact and plug it to
a QML UI with relative ease. This is probably a good idea for mobile
apps based on Qt 4 already.
I have been reading about using C++ with QML UI, but I don't find it straight forward at all. And the reason is simple, Qt project is focusing to change C++ to java in the future, so I assume that only a minimum effort will be invested in making C++ an alternative to code for QML.
Wait, who said "Java"? Seems like you're confusing Java and JavaScript, but these are two very different languages, former being closer to C++ spirit.
--
Regards,
Konstantin
j***@nokia.com
2011-10-09 10:42:20 UTC
Permalink
It comes with a lot of tricky methods for something that was very simple before. And on top of the complexity there are some restrictions that I can foresee already:
- Multi platform capability isn't as simple anymore: The inclusion of QML components for different platforms make that the source code needs to be changing to compile for MeeGo, Symbian, Linux, Windows or Mac platform every single time. The current Qt4 is as simple as changing the target in QtCreator and the application is compiled to the next OS without absolutely any change in your code.

Are you saying that you usually deploy your C++ Qt desktop applications on mobile phones with no changes to the source code? And that you care about native look and feel? No ifdefs? Did you actually use the same .ui files? Qt never performed that magic and will not in the future. As for the desktop components. They will work and look just as native across the Mac, Windows and Linux desktop platforms. You can even use them on Symbian and Meego if you like. But combo box, group box, toolbars and tab widgets simply make no sense in that environment. If you are not willing to make any platform specific changes to your UI, you simply don't care about look and feel.

- Some of the UI in my case are created dynamically either at compile time or at runtime. The former depending on the target platform and the latter depending on the device screen resolution. I don't see this possibility with QML.

Why is that? The fact that the UI is declarative in nature does not mean that it is static or that you have to declare everything beforehand. That is a misconception. It is far easier to change the UI dynamically than it ever was with QWidget and .ui files. Qt Quick is actually designed precicely to target multiple resolutions. Did you have a specific use case in mind?

Regards,

Jens Bache-Wiig
Kishore Jonnalagadda
2011-10-09 15:56:29 UTC
Permalink
Post by j***@nokia.com
Post by Daniel Mendizabal
- Some of the UI in my case are created dynamically either at compile
time or at runtime. The former depending on the target platform and the
latter depending on the device screen resolution. I don't see this
possibility with QML.
Post by j***@nokia.com
Why is that? The fact that the UI is declarative in nature does not mean
that it is static or that you have to declare everything beforehand. That is
a misconception. It is far easier to change the UI dynamically than it ever
was with QWidget and .ui files. Qt Quick is actually designed precicely to
target multiple resolutions. Did you have a specific use case in mind?

Just for my curiosity, how would a case like the following be handled in
qml?
My application in plugin based in which a pointer to a QWidget is returned
by a factory in the plugin. The main program then adds the returned widget
as a tab in a QTabWidget.

About QML, I would like to see some ways to draw primitives like a dot,
line, circle, spline etc.

Cheers!
Kishore

Ps: I have no previous knowledge of interpreted languages and hence my
question might just be a language related one.
Daniel Mendizabal
2011-10-10 05:11:07 UTC
Permalink
Post by Daniel Mendizabal
- Multi platform capability isn't as simple anymore: The inclusion of QML components for different platforms make that the source code needs to be changing to compile for MeeGo, Symbian, Linux, Windows or Mac platform every single time. The current Qt4 is as simple as changing the target in QtCreator and the application is compiled to the next OS without absolutely any change in your code.
Are you saying that you usually deploy your C++ Qt desktop applications on mobile phones with no changes to the source code? And that you care about native look and feel? No ifdefs? Did you actually use the same .ui files? Qt never performed that magic and will not in the future. As for the desktop components. They will work and look just as native across the Mac, Windows and Linux desktop platforms. You can even use them on Symbian and Meego if you like. But combo box, group box, toolbars and tab widgets simply make no sense in that environment. If you are not willing to make any platform specific changes to your UI, you simply don't care about look and feel.
- Some of the UI in my case are created dynamically either at compile time or at runtime. The former depending on the target platform and the latter depending on the device screen resolution. I don't see this possibility with QML.
Why is that? The fact that the UI is declarative in nature does not mean that it is static or that you have to declare everything beforehand. That is a misconception. It is far easier to change the UI dynamically than it ever was with QWidget and .ui files. Qt Quick is actually designed precicely to target multiple resolutions. Did you have a specific use case in mind?
The same code means just that, the same set of .cpp, .h and .ui files. No need to link to different libraries or make changes in my .pro. I have to use #ifdefs in the code to make the difference, but it is not a problem.
I'm not expert in QML and I may be wrong in some comments, but instead of fighting back it would be more proactive to be guided to real examples for instance clarifying my doubts and possibly enforcing your point.
As mentioned in my last email and to conclude this thread, I'm giving a real try to QML to develop a small and simple application using pure C++ so let's see how it works.
j***@nokia.com
2011-10-10 10:18:46 UTC
Permalink
Post by Daniel Mendizabal
Multi platform capability isn't as simple anymore: The inclusion of QML components for different platforms make that the source code needs to be changing to compile for MeeGo, Symbian, Linux, Windows or Mac platform every single time. The current Qt4 is as simple as changing the target in QtCreator and the application is compiled to the next OS without absolutely any change in your code.
There is also exists a Meego C++ SDK framework for Meego based on the QWidget stack. (MeegoTouch) I could just as well use the existence of that as an argument against the C++ widget based stack. It is unfortunate that the SDK needs to expose specific UI elements that are platform specific. But I think this is a better solution than forcing every single mobile platform into a single API. That said, the basic API for Slider and Button is exactly the same in all the component sets. I honestly think Qt needs more platform specific components and widgets. Not less of them. We should enable cross platform development by default, but you should also have the _possibility_ of having a few platform specific components when you really need to give your app that little bit of extra polish. I think e
veryone developing end-user centric applications for Mac would agree to that. If you don't like the idea of having platform specific code in your application, you really don't have to.
Post by Daniel Mendizabal
The same code means just that, the same set of .cpp, .h and .ui files. No need to link to different libraries or make changes in my .pro. I have to use #ifdefs in the code to make the difference, but it is not a problem.
I have a cross platform Qt Quick application. It consists of .cpp, .h, js and .qml files. You can still use #ifdefs in your code. You can use properties on the qml side to define different behavior on different platforms. This by itself is not an argument against Qt Quick.
Post by Daniel Mendizabal
I'm not expert in QML and I may be wrong in some comments, but instead of fighting back it would be more proactive to be guided to real examples for instance clarifying my doubts and possibly enforcing your point.
I apologize that I sounded negative. There were a lot of claims and arguments flying in both directions and I think we all got a little bit carried away. I tried to stay out of this thread until someone started claiming that QML could not possibly look native and at the same time that we should not make any effort in ensuring that it could. My point is that we can make Qt Quick look every bit as native as QWidget for the traditional desktop platforms. So that by itself is also not an argument against it. You can look up the Loader and Component API for seeing how to Load or create QML components dynamically.
Post by Daniel Mendizabal
As mentioned in my last email and to conclude this thread, I'm giving a real try to QML to develop a small and simple application using pure C++ so let's see how it works.
Thank you. I think that is a very good idea. There are a lot of good arguments against Qt Quick and I am sure you will find real issues with it but at least they should be based on facts and not assumptions. If you run into problems, let us know so we can address them.

I would again like to stress that the widget stack is not going away in Qt 5 and as of this thread we also clarified that we will not force it on top of OpenGL. It will in fact stay there and be the correct and best solution for many project also in Qt 5. When it comes to desktop development, I want to make sure that people choose Qt Quick because they feel it benefits their project and not because they feel forced into using it. Anything else would be insane.

Regards,

Jens Bache-Wiig
Konstantin Tokarev
2011-10-10 10:28:17 UTC
Permalink
Post by j***@nokia.com
I would again like to stress that the widget stack is not going away in Qt 5 and as of this thread we also clarified that we will not force it on top of OpenGL. It will in fact stay there and be the correct and best solution for many project also in Qt 5. When it comes to desktop development, I want to make sure that people choose Qt Quick because they feel it benefits their project and not because they feel forced into using it. Anything else would be insane.
BTW, currently folks who need WebKit 2 are actually forced to use QML because no Qt/C++ API exists.
--
Regards,
Konstantin
Alexis Menard
2011-10-10 11:17:19 UTC
Permalink
Hi,

Beurk this thread is just about people ranting never tried to use QML
or thought about using it as a real alternative or don't even let time
for the technology to mature. I write down this date and we will see
in 1-2 years when QML will spread a bit, when Qt Components will be
mature and released. C++/QML lives very well together, you can almost
do all your ugly hack in C++ that you have in your code. Custom
painting -> custom items that you export so you can use them in QML.

4 years ago you guys ranted about QGraphicsView, it matured, it's
stable (It has its flaws for sure) and now many people use it, work on
it and have stuff based on it. N9 UI, Plasma, and many more.

Half of this thread is FUD.

Of course if you don't want to change any of your code and expect to
get Qt5 for free, this is not going to happen like almost any of major
upgrades. Now for the ease of the move QWidget was let as a separate
library which is good. You can move to QML when you feel QML is ready
for your project.

And yes I make a desktop app on QML.
Post by Konstantin Tokarev
Post by j***@nokia.com
I would again like to stress that the widget stack is not going away in Qt 5 and as of this thread we also clarified that we will not force it on top of OpenGL. It will in fact stay there and be the correct and best solution for many project also in Qt 5. When it comes to desktop development, I want to make sure that people choose Qt Quick because they feel it benefits their project and not because they feel forced into using it. Anything else would be insane.
BTW, currently folks who need WebKit 2 are actually forced to use QML because no Qt/C++ API exists.
This is bullshit based again on not checking out stuff. Dude, git
clone WebKit trunk and look the h files are exported, the method
public, and everything is there. What we promised is a good QML API
but we let around the C++ (which is the one our QML plugin use also
btw). By good API in QML I mean a property based one which in some
cases is less convenient in C++ but *still there*.

QWidget is there, it's not gonna move, your app can use it, it will
not get major improvements, so you can start using QML and fix it if
something is missing.
Post by Konstantin Tokarev
--
Regards,
Konstantin
_______________________________________________
Qt5-feedback mailing list
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
--
Alexis Menard (darktears)
Software Engineer
INdT Recife Brazil
Ville M. Vainio
2011-10-10 11:40:20 UTC
Permalink
On Mon, Oct 10, 2011 at 2:17 PM, Alexis Menard
Post by Alexis Menard
Post by Konstantin Tokarev
BTW, currently folks who need WebKit 2 are actually forced to use QML because no Qt/C++ API exists.
This is bullshit based again on not checking out stuff. Dude, git
clone WebKit trunk and look the h files are exported, the method
public, and everything is there. What we promised is a good QML API
but we let around the C++ (which is the one our QML plugin use also
btw). By good API in QML I mean a property based one which in some
cases is less convenient in C++ but *still there*.
So you can use the Webkit C++ api directly in your Qt application? Is
there a public example for this (like the plugin you mention)?
Alexis Menard
2011-10-10 11:47:41 UTC
Permalink
Post by Ville M. Vainio
On Mon, Oct 10, 2011 at 2:17 PM, Alexis Menard
Post by Alexis Menard
Post by Konstantin Tokarev
BTW, currently folks who need WebKit 2 are actually forced to use QML because no Qt/C++ API exists.
This is bullshit based again on not checking out stuff. Dude, git
clone WebKit trunk and look the h files are exported, the method
public, and everything is there. What we promised is a good QML API
but we let around the C++ (which is the one our QML plugin use also
btw). By good API in QML I mean a property based one which in some
cases is less convenient in C++ but *still there*.
So you can use the Webkit C++ api directly in your Qt application? Is
there a public example for this (like the plugin you mention)?
Of course the trunk of WebKit (which we didn't import yet in Qt5).

http://trac.webkit.org/browser/trunk/Source/WebKit2/UIProcess/API/qt/qdesktopwebview.h

http://trac.webkit.org/browser/trunk/Source/WebKit2/UIProcess/API/qt/qmlplugin/plugin.cpp
--
Alexis Menard (darktears)
Software Engineer
INdT Recife Brazil
Kishore Jonnalagadda
2011-10-10 16:47:59 UTC
Permalink
Post by Alexis Menard
Beurk this thread is just about people ranting never tried to use QML
or thought about using it as a real alternative or don't even let time
for the technology to mature. I write down this date and we will see
in 1-2 years when QML will spread a bit, when Qt Components will be
mature and released. C++/QML lives very well together, you can almost
do all your ugly hack in C++ that you have in your code. Custom
painting -> custom items that you export so you can use them in QML.
4 years ago you guys ranted about QGraphicsView, it matured, it's
stable (It has its flaws for sure) and now many people use it, work on
it and have stuff based on it. N9 UI, Plasma, and many more.
Half of this thread is FUD.
Of course if you don't want to change any of your code and expect to
get Qt5 for free, this is not going to happen like almost any of major
upgrades. Now for the ease of the move QWidget was let as a separate
library which is good. You can move to QML when you feel QML is ready
for your project.
I want to change my code eventually. I just don't know how! Maybe the one
thing that can help most the transition is if QtComponents were soon released
and most if not all the QWidget/QGrapicsView based examples and demos were
ported to QML.

That would give the C++ people (such as myself) a clear idea of how something
that is done in C++ can now be done in QML.
--
Cheers!
Kishore
Иван Комиссаров
2011-10-10 16:58:11 UTC
Permalink
Most of letters from nokia developers that says that QML is great technology mention mobile platforms. Guys, there is NO mobile platforms with Qt…
Quim Gil
2011-10-10 17:12:02 UTC
Permalink
Post by Иван Комиссаров
Most of letters from nokia developers that says that QML is great
technology mention mobile platforms.
Just in case you missed it, the opener of this thread expressed his
concerns on QWidget vs QML in mobile platforms - and this is the topic
Post by Иван Комиссаров
But what happen now when new mobile phones come with Qt5 without
QWidget support?
--
Quim
Иван Комиссаров
2011-10-10 17:27:42 UTC
Permalink
Qt is _not_ used for mobile development as i see. In fact, i agree that QWidgets are bad there. But main use-case for qt framework is desktop. Lot of arguments was about "limitations" of qwidgets and one of the example was mac style. First produce "next billion devices" (that would be sold), than let us your managers use nokia phones (Green still uses IPhone?), that we talk about mobile development.

Not to be rude, i just don't share your optimism about mobile development with Qt. Development of new technologies is great, but do not break
main and only place Qt works on - desktop platforms.
Post by Quim Gil
Post by Иван Комиссаров
Most of letters from nokia developers that says that QML is great
technology mention mobile platforms.
Just in case you missed it, the opener of this thread expressed his
concerns on QWidget vs QML in mobile platforms - and this is the topic
Post by Иван Комиссаров
But what happen now when new mobile phones come with Qt5 without
QWidget support?
--
Quim
_______________________________________________
Qt5-feedback mailing list
Qt5-***@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
v***@gmail.com
2011-10-10 17:51:09 UTC
Permalink
Be realist, people that get paid to work on Qt mostly get paid with the expectation that Qt will deliver on mobile. Expecting anyone to not care about mobile use cases is not going to fly here.


On 10/10/11 8:27 PM ИваМ КПЌОссарПв wrote:

Qt is _not_ used for mobile development as i see. In fact, i agree that QWidgets are bad there. But main use-case for qt framework is desktop. Lot of arguments was about "limitations" of qwidgets and one of the example was mac style. First produce "next billion devices" (that would be sold), than let us your managers use nokia phones (Green still uses IPhone?), that we talk about mobile development.

Not to be rude, i just don't share your optimism about mobile development with Qt. Development of new technologies is great, but do not break
main and only place Qt works on - desktop platforms.
Post by Quim Gil
Post by Иван Комиссаров
Most of letters from nokia developers that says that QML is great
technology mention mobile platforms.
Just in case you missed it, the opener of this thread expressed his
concerns on QWidget vs QML in mobile platforms - and this is the topic
Post by Иван Комиссаров
But what happen now when new mobile phones come with Qt5 without
QWidget support?
--
Quim
Thiago Macieira
2011-10-10 17:54:39 UTC
Permalink
Qt is not used for mobile development as i see. In fact, i agree that
QWidgets are bad there. But main use-case for qt framework is desktop. Lot
of arguments was about "limitations" of qwidgets and one of the example was
mac style. First produce "next billion devices" (that would be sold), than
let us your managers use nokia phones (Green still uses IPhone?), that we
talk about mobile development.
Not to be rude, i just don't share your optimism about mobile development
with Qt. Development of new technologies is great, but do not break main
and only place Qt works on - desktop platforms.
Once and for all:

* QWIDGETS ARE NOT BEING REMOVED

* WE WANT QML TO WORK ON THE DESKTOP, with desktop use-cases

* You don't get to tell people what they work on. That's the principle of Open
Source. That leads to:

* If you want something to happen, convince someone to do it by arguments or
do it yourself.

The arguments don't seem to be convincing anyone. The people who have been
developing QWidget for 15 years are telling you it's at its limit. They don't
want to continue evolving it.

This thread has gone on long enough. People's tempers are flared to the point
that some emails have no sense at all. We're rehashing the same arguments over
and over again.

I will not reply to any more emails on it and hopefully the thread will
eventually die. It's also going on KMail's auto-ignore feature.

(btw, did anyone say Kontact Touch is a complex app mixing QML and C++?)
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
Иван Комиссаров
2011-10-10 18:05:21 UTC
Permalink
I know that no one will remove QWidgets.

But i need bug fixes. Bugs that i reported to Qt bug tracker about TWO YEARS old, some of them with high priority. Even merge requests are waiting for weeks to be reviewed. So please, stop developing that cool stuff for developing 100line applications and fix what you have already done.
Qt is not used for mobile development as i see. In fact, i agree that
QWidgets are bad there. But main use-case for qt framework is desktop. Lot
of arguments was about "limitations" of qwidgets and one of the example was
mac style. First produce "next billion devices" (that would be sold), than
let us your managers use nokia phones (Green still uses IPhone?), that we
talk about mobile development.
Not to be rude, i just don't share your optimism about mobile development
with Qt. Development of new technologies is great, but do not break main
and only place Qt works on - desktop platforms.
Once and for all:

* QWIDGETS ARE NOT BEING REMOVED

* WE WANT QML TO WORK ON THE DESKTOP, with desktop use-cases

* You don't get to tell people what they work on. That's the principle of Open
Source. That leads to:

* If you want something to happen, convince someone to do it by arguments or
do it yourself.

The arguments don't seem to be convincing anyone. The people who have been
developing QWidget for 15 years are telling you it's at its limit. They don't
want to continue evolving it.

This thread has gone on long enough. People's tempers are flared to the point
that some emails have no sense at all. We're rehashing the same arguments over
and over again.

I will not reply to any more emails on it and hopefully the thread will
eventually die. It's also going on KMail's auto-ignore feature.

(btw, did anyone say Kontact Touch is a complex app mixing QML and C++?)
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
_______________________________________________
Qt5-feedback mailing list
Qt5-***@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
Frans Klaver
2011-10-10 20:22:32 UTC
Permalink
Post by Иван Комиссаров
But i need bug fixes. Bugs that i reported to Qt bug tracker about TWO
YEARS old, some of them with high priority. Even merge requests are
waiting for weeks to be reviewed.
This is something I think isn't good. At least the merge requests should
be handled properly. Hopefully the contribution flow changes are going to
clear the way for people to actively develop on QtWidgets.
Post by Иван Комиссаров
So please, stop developing that cool stuff for developing 100line
applications and fix what you have already done.
Don't tell them to stop looking forward. Even though the work on the old
stuff has to be done, you still need to accept that Qt has to move forward
and that takes work.

This whole thread ended up with a lot of people venting frustration about
everything and nothing. It all seems to boil down to something that is
entirely not related to Qt5 -- people think the priorities are wrong.

I do agree with Thiago that if you want something done, you need to do it
yourself or get someone else to do it for you. If, however, the 'do it
yourself'-part is done, but the results are ignored, there isn't much use
in doing it yourself.

Ah well, that's a different discussion I guess.

Cheers,
Frans
Peter Kümmel
2011-10-10 20:31:54 UTC
Permalink
Post by Frans Klaver
people think the priorities are wrong.
That's the point:

Priority for Desktop is very low at Nokia.

We all see it, feel it, any many old-school desktop
develors don't like it.

Peter
Thiago Macieira
2011-10-10 17:33:03 UTC
Permalink
Post by Иван Комиссаров
Most of letters from nokia developers that says that QML is great technology
mention mobile platforms. Guys, there is NO mobile platforms with Qt

I think your definition of "no platforms" is quite a bit restrictive.

I've just paid 4490 kr for a mobile with Qt. If you are right, the box I'll
receive in the mail will be empty.

You probably meant "no platforms I care about".
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
Иван Комиссаров
2011-10-10 17:37:00 UTC
Permalink
This is your decision - to throw money on wind:)

I meant "no platforms that have future".
Post by Thiago Macieira
Post by Иван Комиссаров
Most of letters from nokia developers that says that QML is great technology
mention mobile platforms. Guys, there is NO mobile platforms with Qt…
I think your definition of "no platforms" is quite a bit restrictive.
I've just paid 4490 kr for a mobile with Qt. If you are right, the box I'll
receive in the mail will be empty.
You probably meant "no platforms I care about".
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
_______________________________________________
Qt5-feedback mailing list
Qt5-***@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
Peter Kümmel
2011-10-10 20:17:30 UTC
Permalink
Post by Иван Комиссаров
Most of letters from nokia developers that says that QML is great technology mention mobile platforms. Guys, there is NO mobile platforms with Qt…
I assume Nokia need QML for their next billions low-cost mobile phones.
And maybe these phone run a Linux made by Nokia.

Peter
Georg Rudoy
2011-10-10 17:57:26 UTC
Permalink
Post by Kishore Jonnalagadda
Post by Alexis Menard
Beurk this thread is just about people ranting never tried to use QML
or thought about using it as a real alternative or don't even let time
for the technology to mature. I write down this date and we will see
in 1-2 years when QML will spread a bit, when Qt Components will be
mature and released. C++/QML lives very well together, you can almost
do all your ugly hack in C++ that you have in your code. Custom
painting -> custom items that you export so you can use them in QML.
4 years ago you guys ranted about QGraphicsView, it matured, it's
stable (It has its flaws for sure) and now many people use it, work on
it and have stuff based on it. N9 UI, Plasma, and many more.
Half of this thread is FUD.
Of course if you don't want to change any of your code and expect to
get Qt5 for free, this is not going to happen like almost any of major
upgrades. Now for the ease of the move QWidget was let as a separate
library which is good. You can move to QML when you feel QML is ready
for your project.
I want to change my code eventually. I just don't know how! Maybe the one
thing that can help most the transition is if QtComponents were soon released
and most if not all the QWidget/QGrapicsView based examples and demos were
ported to QML.
That would give the C++ people (such as myself) a clear idea of how something
that is done in C++ can now be done in QML.
I support this idea.

Moreover, some documentation/tutorials/exampls regarding porting
typical C++/QWidget-based code to QML would be very helpful. So would
be something that describes general philosophy of QML for
QWidget-users.

Trolls' documentation was always excellent, it'd be nice if it'd be
also the case with porting from old, mature and well-known
technologies to newer ones like QML.
--
  Georg Rudoy
  LeechCraft — http://leechcraft.org
Ganshorn Thomas
2011-10-10 06:15:06 UTC
Permalink
Post by j***@nokia.com
Post by Daniel Mendizabal
- Some of the UI in my case are created dynamically either at compile
time or at runtime. The former depending on the target platform and
the latter depending on the device screen resolution. I don't see
this possibility with QML.
Why is that? The fact that the UI is declarative in nature does not
mean that it is static or that you have to declare everything
beforehand. That is a misconception. It is far easier to change the UI
dynamically than it ever was with QWidget and .ui files. Qt Quick is
actually designed precicely to target multiple resolutions. Did you
have a specific use case in mind?
Regards,
Jens Bache-Wiig
I don't know about his usecases but because this discussion is really
interesting for me i can send my usecases.

I have an application.
This application needs to control multiple objects (character rig in
vfx, or rig for fluid simulation of flowline)

I need now an ui that can, in certain circumstances reconfigure itself
based on the existing and configured objects.
That means as one example for each object we have some common states
(enabled, disabled, animated or not, active, inactive, stopped, running,
keyframe, .... )
and we want to have a dynamic ui that shows these objects in a grouped
grid (see windows explorer) where the grouping can be changed at runtime
and even created at runtime.

Currently this is a nobrainer in qt widgets.
i have eg an "SysButton" class that shows the name of the system, the
state, some functionality.
If i have 100 systems i just create 100 buttons, give them in their
"initialize" function the name of the system, the button uses that name
to find the system from a global class and connecting itself with it.
For the 100 buttons i created my own layout class that can show them
based on the screensize.
The buttons are simply organized in groups, if the screensize is to
small for the number of system buttons it will use automatic scale so
that the non important buttons get smaller, it can scroll and reorder
the buttons if necessary
to show the "Important" ones (they red or orange ones) at top.

This is just a "simple" example.
We have much more complex Userinterfaces that need to be automatically
created by the software based on the current scene or workflow step.

Now i thought cool with qml this might be easier and we can have a
cooler looking ui for all the artists. They can probably even modify
that stuff for their own needs.
Part of it is, i don't have to write my SysButton class in c++ and can
easily change the visual style great.

BUT ... how can i create 100 of them without extreme large development
overhead ?
I can't. In C++ it is only
SysButton* newButton = new SysButton ( myUIContainer, sysName );
FINISHED !
I did not find a good way to do it in qml, show me one please.
I tried to work with models but really ? Writing a modell for creating a
list of sysbuttons ?
Sorry this is just not real. It can't be because this would be just stupid.

What is with layout ? i have no idea of how to create a real working
dynamic layout in qml.
It is just not working in real world situations. Yes it may be possible
by using hacks and thousand of lines of javascript code, but this is
just not practical.
We thought in the end even about creating hundred of qml views in the
end that are controlled by c++.


How can i connect the QML SysButtons ? Only if i make all my systems
accessible to qml (wich are in the end several thousand objects that i
have to make accessible.
And doing this IS a large overhead runtime and development wise)
(Also here show me a good way instead of having a c++ initialize
function that belongs to my widget, having a javascript function that
belongs to my qml object)
Yes i know exactly HERE qml COULD be better because of its runtime
capabilities. But the truth is ... it is just not usable

Because debugging IS a REAL nightmare.
Whatever you say i can say from my metrics that using qml took as more
than 12 times longer for the current tests than with qwidgets.
And yes there is stuff like learning time. But the debugging is just
real shit and i know why i say shit. It can be only worse if you have to
use remote debugging on a ui application that only writes some traces
every now and then and you do not have an debugger.

The ui quality gets much worse than before, not because of missing
features but because of the really bad separation of logic and ui.
Whatever you say including javascript in files that are to be handled by
designers was NOT a good idea and WILL NEVER be a good idea.
We dont have ANY designer who can code. Yes they CAN hack some
javascript yay. But that is exactly the SHIT that costs time.
Because they can't code, they can only hack some stuff into it, That is
untested, in many cases not working and just (if you need to integrate
more complex functionality) way to much for them.
So we realized we have to divide javascript functions and qml separately
creating an additional layer on our own that the designers could use.
That leaded to much more effort for code maintenance, more complex
project structure and more error possibilities.




So we tried another approach ... we use javascript and html5 and what to
say ?
It has in reality less problems because it wants to do less.
it works better in our case because there is a separation between
layout, look and code.
And we have more functionality (we can now easily have a remote ui and
even use an ipad to control the system).
Needless to say we needed less time to develop this approach including
an integrated http server for the communication with our server process
than it took as to use qml.



So in reality
i LOVE the idea of an explicit ui layer.
But not like qml does it.
Although html5 has its own problems it IS much better than qml is.
Not performance wise, that is true. But in all other parts.

It is a better structure of
- a html file containing your basic data and elements that can easily
created by a c++ part (the 100 button problem).
- css for the style
- at least some layout mechanisms for different screensizes (even if you
have to use sometimes device dependent css files, but because these css
rules work togehter you do not have to do everyting again and again for
each resolution)
- a clear separation from code and ui, the code is in its own js file.
You only have to initialize your ui once in one initial function that
does something like
function initUi()
{
uiLib.createSlider ( divId );
uiLib.createTextLine ( divId );
uiLib.bindFunction ( divId, function );
}



Can qml come to this ? Yes if the nokia trolls really think about that
is the problem of html5, how to make it better, where are the strengths
of it.
Currently they don't do it.

Thats why qml is a fail and WILL fail
Because why should you use it ?
if the ui is small enough to be managable, you can easily do it in html5
and javascript and be real platform independent.
iOs, android, win8 metro, macosX even the nokia smartphones can use it.

For now qml has only ONE pro.
It is theoretically faster (but not if you do not know how to overcome
the billion of speed problems you can easily create)
But it has many cons like
-> untested not finished
-> missing features
-> platform independency
-> way more overhead to accomplish things.



Greetings Thomas
Post by j***@nokia.com
_______________________________________________
Qt5-feedback mailing list
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
Ganshorn Thomas
2011-10-10 06:30:56 UTC
Permalink
An addition

Try to draw some line diagrams in qml please.
HTML5 Canvas no problem.
QML ? Please write your own c++ class that you register at qml.

Fail
Post by Ganshorn Thomas
Post by j***@nokia.com
Post by Daniel Mendizabal
- Some of the UI in my case are created dynamically either at
compile time or at runtime. The former depending on the target
platform and the latter depending on the device screen resolution. I
don't see this possibility with QML.
Why is that? The fact that the UI is declarative in nature does not
mean that it is static or that you have to declare everything
beforehand. That is a misconception. It is far easier to change the
UI dynamically than it ever was with QWidget and .ui files. Qt Quick
is actually designed precicely to target multiple resolutions. Did
you have a specific use case in mind?
Regards,
Jens Bache-Wiig
I don't know about his usecases but because this discussion is really
interesting for me i can send my usecases.
I have an application.
This application needs to control multiple objects (character rig in
vfx, or rig for fluid simulation of flowline)
I need now an ui that can, in certain circumstances reconfigure itself
based on the existing and configured objects.
That means as one example for each object we have some common states
(enabled, disabled, animated or not, active, inactive, stopped,
running, keyframe, .... )
and we want to have a dynamic ui that shows these objects in a grouped
grid (see windows explorer) where the grouping can be changed at
runtime and even created at runtime.
Currently this is a nobrainer in qt widgets.
i have eg an "SysButton" class that shows the name of the system, the
state, some functionality.
If i have 100 systems i just create 100 buttons, give them in their
"initialize" function the name of the system, the button uses that
name to find the system from a global class and connecting itself with it.
For the 100 buttons i created my own layout class that can show them
based on the screensize.
The buttons are simply organized in groups, if the screensize is to
small for the number of system buttons it will use automatic scale so
that the non important buttons get smaller, it can scroll and reorder
the buttons if necessary
to show the "Important" ones (they red or orange ones) at top.
This is just a "simple" example.
We have much more complex Userinterfaces that need to be automatically
created by the software based on the current scene or workflow step.
Now i thought cool with qml this might be easier and we can have a
cooler looking ui for all the artists. They can probably even modify
that stuff for their own needs.
Part of it is, i don't have to write my SysButton class in c++ and can
easily change the visual style great.
BUT ... how can i create 100 of them without extreme large development
overhead ?
I can't. In C++ it is only
SysButton* newButton = new SysButton ( myUIContainer, sysName );
FINISHED !
I did not find a good way to do it in qml, show me one please.
I tried to work with models but really ? Writing a modell for creating
a list of sysbuttons ?
Sorry this is just not real. It can't be because this would be just stupid.
What is with layout ? i have no idea of how to create a real working
dynamic layout in qml.
It is just not working in real world situations. Yes it may be
possible by using hacks and thousand of lines of javascript code, but
this is just not practical.
We thought in the end even about creating hundred of qml views in the
end that are controlled by c++.
How can i connect the QML SysButtons ? Only if i make all my systems
accessible to qml (wich are in the end several thousand objects that i
have to make accessible.
And doing this IS a large overhead runtime and development wise)
(Also here show me a good way instead of having a c++ initialize
function that belongs to my widget, having a javascript function that
belongs to my qml object)
Yes i know exactly HERE qml COULD be better because of its runtime
capabilities. But the truth is ... it is just not usable
Because debugging IS a REAL nightmare.
Whatever you say i can say from my metrics that using qml took as more
than 12 times longer for the current tests than with qwidgets.
And yes there is stuff like learning time. But the debugging is just
real shit and i know why i say shit. It can be only worse if you have
to use remote debugging on a ui application that only writes some
traces every now and then and you do not have an debugger.
The ui quality gets much worse than before, not because of missing
features but because of the really bad separation of logic and ui.
Whatever you say including javascript in files that are to be handled
by designers was NOT a good idea and WILL NEVER be a good idea.
We dont have ANY designer who can code. Yes they CAN hack some
javascript yay. But that is exactly the SHIT that costs time.
Because they can't code, they can only hack some stuff into it, That
is untested, in many cases not working and just (if you need to
integrate more complex functionality) way to much for them.
So we realized we have to divide javascript functions and qml
separately creating an additional layer on our own that the designers
could use.
That leaded to much more effort for code maintenance, more complex
project structure and more error possibilities.
So we tried another approach ... we use javascript and html5 and what
to say ?
It has in reality less problems because it wants to do less.
it works better in our case because there is a separation between
layout, look and code.
And we have more functionality (we can now easily have a remote ui and
even use an ipad to control the system).
Needless to say we needed less time to develop this approach including
an integrated http server for the communication with our server
process than it took as to use qml.
So in reality
i LOVE the idea of an explicit ui layer.
But not like qml does it.
Although html5 has its own problems it IS much better than qml is.
Not performance wise, that is true. But in all other parts.
It is a better structure of
- a html file containing your basic data and elements that can easily
created by a c++ part (the 100 button problem).
- css for the style
- at least some layout mechanisms for different screensizes (even if
you have to use sometimes device dependent css files, but because
these css rules work togehter you do not have to do everyting again
and again for each resolution)
- a clear separation from code and ui, the code is in its own js file.
You only have to initialize your ui once in one initial function that
does something like
function initUi()
{
uiLib.createSlider ( divId );
uiLib.createTextLine ( divId );
uiLib.bindFunction ( divId, function );
}
Can qml come to this ? Yes if the nokia trolls really think about that
is the problem of html5, how to make it better, where are the
strengths of it.
Currently they don't do it.
Thats why qml is a fail and WILL fail
Because why should you use it ?
if the ui is small enough to be managable, you can easily do it in
html5 and javascript and be real platform independent.
iOs, android, win8 metro, macosX even the nokia smartphones can use it.
For now qml has only ONE pro.
It is theoretically faster (but not if you do not know how to overcome
the billion of speed problems you can easily create)
But it has many cons like
-> untested not finished
-> missing features
-> platform independency
-> way more overhead to accomplish things.
Greetings Thomas
Post by j***@nokia.com
_______________________________________________
Qt5-feedback mailing list
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
_______________________________________________
Qt5-feedback mailing list
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
Robin Burchell
2011-10-10 06:43:49 UTC
Permalink
Post by Ganshorn Thomas
An addition
Try to draw some line diagrams in qml please.
HTML5 Canvas no problem.
QML ? Please write your own c++ class that you register at qml.
two things to note here:

#1: it's already been written for you
(https://qt.gitorious.org/qt-labs/qmlcanvas)
#2: canvas functionality is integrated into Qt Quick v2
(http://doc.qt.nokia.com/qt5-snapshot/qml-qtquick2-canvas.html)

All the best,

Robin
j***@nokia.com
2011-10-10 07:42:29 UTC
Permalink
Try to draw some line diagrams in qml please.
HTML5 Canvas no problem.
QML ? Please write your own c++ class that you register at qml.

I had the same reaction last year. Which is why I created:
http://qt.gitorious.org/qt-labs/qmlcanvas

In Qt 5, html5 Canvas is part of the language.

BUT ... how can i create 100 of them without extreme large development overhead ?
I can't. In C++ it is only
SysButton* newButton = new SysButton ( myUIContainer, sysName );
FINISHED !

Depends on your use case. Sounds indeed like you could use a model. But if that sounds
too heavy handed. You can use a Repeater:

Repeater {
model: 100
SysButton {}
onItemAadded: { initialize button }
}

And if you prefer something closer to C++, you create a button Component and instantiate it:
var sysButton = buttoncomponent.createObject(conainer)

What is with layout ? i have no idea of how to create a real working dynamic layout in qml.
It is just not working in real world situations. Yes it may be possible by using hacks and thousand of lines of javascript code, but this is just not practical.
We thought in the end even about creating hundred of qml views in the end that are controlled by c++.

It is a bit hard to answer without seeing a picture of what you want to achieve. In general you can get far with the built in layouts and anchoring. I have written some layouts in javascript though. If there are valid use cases, I certainly see that we might add more complex layouts in Qt Quick 2. Perhaps you are making things a bit more difficult by avoiding the model and being explicit about the buttons. A GridView sounded like a good fit for an explorer type layout of icons or buttons. But I also wonder how you did the layout easily in html5.

How can i connect the QML SysButtons ? Only if i make all my systems accessible to qml (wich are in the end several thousand objects that i have to make accessible.
And doing this IS a large overhead runtime and development wise)

I don't know enough about the use case or why these buttons are so complex. How do you connect it in C++? Your button has an index. Can't you simply have a buttonClicked(int) slot on the C++ side?

Because debugging IS a REAL nightmare.
Whatever you say i can say from my metrics that using qml took as more than 12 times longer for the current tests than with qwidgets.
And yes there is stuff like learning time. But the debugging is just real shit and i know why i say shit.

Debugging can certainly get better. It is already a lot better than it was a year ago if you use the tools available. I agree that a C++ application at the moment feels more predictable.

We dont have ANY designer who can code. Yes they CAN hack some javascript yay. But that is exactly the SHIT that costs time.
Because they can't code, they can only hack some stuff into it, That is untested, in many cases not working and just (if you need to integrate more complex functionality) way to much for them.

Regular designers should not have write code. Web designers with javascript skills might have the skill set required. I personally find it a lot easier to implement complex UI designs in QML than with C++ though. Our designers usually just send us pretty pictures and tell us how they want it to work. And if they ask me to tweak the margin a few pixels, I know it takes me 5 seconds to try it out in Qt Quick without having to recompile the whole project. But having a designer taking over the actual interface code is probably not a good idea. You can keep all your code in .js files if you want to. Perhaps we should introduce a flag in Qt Quick that enforces that as a policy. I think the majority would prefer the convenience of being able to do a simple signal emission inline though.

So we tried another approach ... we use javascript and html5 and what to say ?
it works better in our case because there is a separation between layout, look and code.

I thought html5 was every bit as javascript enabled as Qt Quick. But it is great that you found a technology that works for your project. Qt supports and strongly encourages html5 hybrid development. In fact we are pushing it more than ever. It is not the solution for everyone though. I don't think you could do a full native looking UI with it for instance.

Regards,

Jens Bache-Wiig
j***@nokia.com
2011-10-10 08:35:16 UTC
Permalink
As someone pointed out, my new mail client was somewhat confused about quotations on this mailing list. :)
Post by Ganshorn Thomas
Try to draw some line diagrams in qml please.
HTML5 Canvas no problem.
QML ? Please write your own c++ class that you register at qml.
I had the same reaction last year. Which is why I created:
http://qt.gitorious.org/qt-labs/qmlcanvas

In Qt 5, html5 Canvas is part of the language.
Post by Ganshorn Thomas
BUT ... how can i create 100 of them without extreme large development overhead ?
I can't. In C++ it is only
SysButton* newButton = new SysButton ( myUIContainer, sysName );
FINISHED !
Depends on your use case. Sounds indeed like you could use a model. But if that sounds
too heavy handed. You can use a Repeater:

Repeater {
model: 100
SysButton {}
onItemAadded: { initialize button }
}

And if you prefer something closer to C++, you create a button Component and instantiate it:
var sysButton = buttoncomponent.createObject(conainer)
Post by Ganshorn Thomas
What is with layout ? i have no idea of how to create a real working dynamic layout in qml.
It is just not working in real world situations. Yes it may be possible by using hacks and thousand of lines of javascript code, but this is just not practical.
We thought in the end even about creating hundred of qml views in the end that are controlled by c++.
It is a bit hard to answer without seeing a picture of what you want to achieve. In general you can get far with the built in layouts and anchoring. I have written some layouts in javascript though. If there are valid use cases, I certainly see that we might add more complex layouts in Qt Quick 2. Perhaps you are making things a bit more difficult by avoiding the model and being explicit about the buttons. A GridView sounded like a good fit for an explorer type layout of icons or buttons. But I also wonder how you did the layout easily in html5.
Post by Ganshorn Thomas
How can i connect the QML SysButtons ? Only if i make all my systems accessible to qml (wich are in the end several thousand objects that i have to make accessible.
And doing this IS a large overhead runtime and development wise)
I don't know enough about the use case or why these buttons are so complex. How do you connect it in C++? Your button has an index. Can't you simply have a buttonClicked(int) slot on the C++ side?
Post by Ganshorn Thomas
Because debugging IS a REAL nightmare.
Whatever you say i can say from my metrics that using qml took as more than 12 times longer for the current tests than with qwidgets.
And yes there is stuff like learning time. But the debugging is just real shit and i know why i say shit.
Debugging can certainly get better. It is already a lot better than it was a year ago if you use the tools available. I agree that a C++ application at the moment feels more predictable.
Post by Ganshorn Thomas
We dont have ANY designer who can code. Yes they CAN hack some javascript yay. But that is exactly the SHIT that costs time.
Because they can't code, they can only hack some stuff into it, That is untested, in many cases not working and just (if you need to integrate more complex functionality) way to much for them.
Regular designers should not have write code. Web designers with javascript skills might have the skill set required. I personally find it a lot easier to implement complex UI designs in QML than with C++ though. Our designers usually just send us pretty pictures and tell us how they want it to work. And if they ask me to tweak the margin a few pixels, I know it takes me 5 seconds to try it out in Qt Quick without having to recompile the whole project. But having a designer taking over the actual interface code is probably not a good idea. You can keep all your code in .js files if you want to. Perhaps we should introduce a flag in Qt Quick that enforces that as a policy. I think the majority would prefer the convenience of being able to do a simple signal emission inline though.
Post by Ganshorn Thomas
So we tried another approach ... we use javascript and html5 and what to say ?
it works better in our case because there is a separation between layout, look and code.
I thought html5 was every bit as javascript enabled as Qt Quick. But it is great that you found a technology that works for your project. Qt supports and strongly encourages html5 hybrid development. In fact we are pushing it more than ever. It is not the solution for everyone though. I don't think you could do a full native looking UI with it for instance.

Regards,

Jens Bache-Wiig
Quim Gil
2011-10-10 16:47:12 UTC
Permalink
The problem is multi form-factor in mobile - regardless of the
technology you are using. Cross-compatibility in desktop is simpler not
only because QWidget is well established but also because you know what
form factor to expect regardless of the OS. If you want to address
efficiently handset, tablet etc (with different display resolutions,
hardware buttons, sensors etc) you will probably need to do some
homework. A good C++/QML split for backend and UI makes your life easier.
Post by Daniel Mendizabal
The inclusion of
QML components for different platforms make that the source code needs
to be changing to compile for MeeGo, Symbian, Linux, Windows or Mac
platform every single time.
That is indeed a pain now, although in reality it is not so painful:
MeeGo Harmattan and Symbian are the only platforms really shipping Qt
Quick Components in products and both are pretty compatible. I hope the
Qt Project leads the way of homogenization and the rest just follows and
contributes upstream whatever else is needed.

For what is worth, the diff for making our Harmattan C++/QML app work in
Maemo is pretty trivial, and actually less related to QML itself than to
Maemo specific Components port and packaging:
http://wiki.maemo.org/QtComponents/Miniature
Post by Daniel Mendizabal
The current Qt4 is as simple as changing the
target in QtCreator and the application is compiled to the next OS
without absolutely any change in your code.
Perhaps, but with QWidget your app probably looks bad in mobile
platforms making your cross-compatibility of little value for actual
mobile users. (Maybe I'm wrong, again having links to your apps would
help making more accurate judgments).

--
Quim
Loading...