
Qt Quick Controls 2.1 and Beyond - bpierre
http://blog.qt.io/blog/2016/10/06/qt-quick-controls-2-1-and-beyond/
======
jguegant
I dream of the inverse of the react native or electron trend. In this world
one would write his application using Qt Quick for all the platforms including
the web! Using Emscriptem you would be able to compile your C++ code to asm.js
or webassembly and make your application run flawlessly in your browser with
WebGL, canvas or HTML5 as a backend. Some people already started working on
that: [https://blog.qt.io/blog/2015/09/25/qt-for-native-client-
and-...](https://blog.qt.io/blog/2015/09/25/qt-for-native-client-and-
emscripten/)

Even using React, Redux, flexbox layout and all these fancy frameworks, I
still find the web stack a huge hack that tries to bend HTML and CSS to
recreate the feeling of an app (like SPAs). QML is simply more expressive for
layouts and bindings.

~~~
ComodoHacker
I hope in that universe everybody won't be downloading a copy of
Chromium/Webkit/whatever with every desktop app.

~~~
_wmd
Qt already bundles QWebEngine, which is essentially a copy of Chromium

~~~
santaclaus
Are all Qt apps shipping and linking against QWebEngine though?

~~~
dschulz
Not if you don't explicitly link against the relevant modules. That is usually
done by adding a few entries in the Qt project file (qmake) and then including
the headers.

[http://doc.qt.io/qt-5/qtwebenginecore-
module.html](http://doc.qt.io/qt-5/qtwebenginecore-module.html)
[http://doc.qt.io/qt-5/qtwebenginewidgets-
module.html](http://doc.qt.io/qt-5/qtwebenginewidgets-module.html)

------
mixedCase
The work in the Qt camp is simply amazing. I just wish there were more stable
bindings out there for it outside of the official C++ one and PyQt (commercial
or GPL, PySide 2 is not stable last I checked).

There's a promising Qt binding for Go[1] which I'm looking forwards to, but
again, if I had to write an application and not want to struggle with the
bindings I'm forced into the previously mentioned options.

[1] [https://github.com/therecipe/qt](https://github.com/therecipe/qt)

~~~
ronjouch
Good news for you about the Python part of this: there is official interest
from The Qt Company around PySide. See 48:39 in Lars Knoll's "Project status"
keynote at QtCon2016: [http://mirror.its.dal.ca/kde-
applicationdata/akademy/2016/35...](http://mirror.its.dal.ca/kde-
applicationdata/akademy/2016/354_qt_project_status.mp4)

EDIT: Also, for anyone interested in Qt, the whole talk is worthwhile to get
an idea of where Qt is going.

~~~
azeirah
I'm really hoping they will pick up PySide again. The last update was in 2015
- 1.2.4 (2015-10-14)

~~~
radix07
Looks like PySide2 is PySide for Qt5. Seems they are putting some effort back
into development. [https://wiki.qt.io/PySide2](https://wiki.qt.io/PySide2)

------
thepumpkin1979
To anyone with experience building apps with QT: Would you recommend using it
for new apps over Electron? I know the tech stack is different and I'm aware
that Electron apps are all memory hogs which is why I wonder whether QT is a
good alternative in Desktop or not.

~~~
trishume
I certainly would. Qt is fantastic. Not only will your app be faster, but
depending on which type of Qt you use (Qt Quick controls 1, Qt Quick Controls
2 or Qt Widgets) it can also look native. I also like the UI and event model
better than HTML+JS. Plus you even get a visual GUI builder.

------
Longhanks
This looks completely out of place on every Desktop, in my opinion, which
makes Qt Quick unfortunately not an option for me.

Related: Did they stop developing Qt Widgets?

~~~
pfranz
A few months ago I was at a conference where Qt representatives were saying
something to the effect of, "We have completed development on Qt Widgets."
They were very clear that there were no current plans to deprecate them. Just
that no new development was planned.

This was a conference for the VFX industry and the people in the room mainly
wrote tools for 3d packages. So we had no interest in QML and just wanted
native dialogs and widgets to automate things.

~~~
joshuak
I'm from the VFX industry. I have a hard time understanding the logic of your
last sentence.

"just wanted native dialogs and widgets to automate things" is pretty much
exactly the benefit of QML in the way I use it for production tools. It's
certainly an improvement over multi platform compiling, and onerous build
cycles or _way_ out of date python integration.

Quick, non-product oriented, tool development would in my mind be faster and
easier to deliver to tight production timelines via an easy to edit document
in a performance oriented declarative UI language over having to write fully
compiled application UIs that are affectively hard coded. QML is a high
performance easy to edit 'scene' file that is in effect a game engine level
description for GUIs.

Am I missing something?

~~~
pfranz
I didn't mean in any way that QML was a worse solution than what qt4 offers.
More that it's not accessible (not shipping along with current 3d software) so
it is off the radar for most people. 6 months ago I was at a place where all
code had to be compatible with Python 2.6 (we had moved off of Python2.5 only
a year or so before). When I've looked at playing with PySide2 using Python2 I
see that it's not there yet.[1] I feel like I'm in the minority of people I
work with who have even seen Python3, let alone know what features it has. At
my current place we don't compile anything.

Most of the work I see are forms, running inside 3d software, that are
basically arguments for a process...maybe read from a database or your local
scene/environment. Designer UI files or hand-written UIs seem to be good
enough for most people (it's way better than the alternative scripting UIs
used before Qt). It needs to run inside and outside of Maya and other
packages, which usually means is compatible with Python 2.6 and 2.7, likely
need to support PyQt and PySide, and might need to work in Linux and Windows
(ideally following that OS' conventions). Performance isn't a huge concern
since loading the data takes way more than drawing the UI. Also, people are
really averse to learning a new language.

The understanding I had for qt5 was focusing on UI elements for alternate
devices like cellphones and touch. While a lot more flexible, in many cases
you'd have to reimplement normal UI widgets from lower-level pieces. At the
same meeting, the few people familiar with QML were asking about getting a QML
Tree View.

I'm curious to know more about qt5, but like Python3, it's currently not an
option.

[1]
[https://github.com/PySide/pyside2/wiki](https://github.com/PySide/pyside2/wiki)

------
hellofunk
I'd like to see a React or FRP approach to the Qt Quick Controls, using C++
(not JS).

~~~
zerr
I'd like to use Qt Quick Controls with C++ instead of QML/js crap.

~~~
ronjouch
I'm personally fine with QML (under the constraints the app I'm working on has
to live with), but know that you're not alone.

There's a flamewar^W discussion happening right now in the qt-interest mailing
list [1] under the name _" [Interest] What don't you like about Qt?"_.

Your concern (the lack of a pure-C++ path for QtQuick Controls) is one of the
most recurring pain points. Feel free to chime in if you have something to
contribute. Qt folks _are_ listening and do answer to well-formed arguments.

[1] [http://lists.qt-project.org/mailman/listinfo/interest](http://lists.qt-
project.org/mailman/listinfo/interest)

------
messutied
I would love to use Qt for personal for profit projects, but at $79/month (the
cheapest commercial option) I find it too expensive, as a independent
developer with pet projects that might not generate much (if at all).

What other good options do you know for building multi-platform nice-looking
desktop UIs, I dont want to go with electron but so far is the best option I
see for fast and cheap development, with the tradeoff of 50mb simple apps and
not so great performance.

~~~
zerr
You can use Qt for commercial projects for free, including mobile platforms.
This is not highly advertised, but you can... :)

~~~
ktta
AFAIK you'll have to have a GPL your code right? If you want to keep the
source closed, _then_ you'll have to get a commercial license which costs
money. Can you refer me to where you saw that you can use Qt for free with
being able to keep your source closed? (you still can monetize open source
programs so there's that)

Or are you referring to LGPL?

~~~
jtuente
The licensing has changed a bit over the past year. The biggest difference
between the LGPL and GPL versions is that Charts and Data Visualization aren't
available under LGPL, and Qt Quick is limited to OpenGL.

[https://www.qt.io/licensing-comparison/](https://www.qt.io/licensing-
comparison/)

------
rossy
I know Qt Quick Controls 2.x focuses on mobile, but I'm still waiting for it
to get a native look-and-feel on the desktop. Qt Widgets is near-perfect if
you want native look-and-feel across desktop platforms, but since all the
focus is on Qt Quick, the future of Widgets is unclear. Qt Quick Controls 1.x
also had native look-and-feel, but (as far as I know) no support for high-dpi
on Windows and Linux, making it strictly less useful than Qt Widgets 5.6+, and
like Qt Widgets, its future is also unclear.

------
Siecje
I can't wait for TableView and TreeView to start using Qt Quick Controls 2

------
jordanbaucke
I'm looking for some references to QT / QML guys to help us along on our
project that's very much active. Bonus points if you have multimedia pipeline
experience! E-mail: jordan(at)evasyst(dot)com

------
happycodework
Chrome style tabs for qt quick pleeease, I think they have proven that ui
paradigm is here to stay

------
Ono-Sendai
I wish Qt devs would fix the bugs in Qt before adding new stuff.

------
neves
Is there any sense to have hover style in a mobile interface?

------
oneplane
But what about iOS? Or macOS?

------
floopidydoopidy
I've only built front ends in QtCreator and Visual Studio WPF, but after
getting over the initial QT way of doing things, I find it delightful. It's
C++, though. So it's definitely weird in that uniquely weird C++ way.

------
zerr
Btw, your posts are marked as [dead]. You can contact HN stuff I believe, to
fix this.

~~~
sctb
We detached this subthread from
[https://news.ycombinator.com/item?id=12653151](https://news.ycombinator.com/item?id=12653151)
and marked it off-topic.

