I read this book a while ago and it was pretty good.
Qt5 is really underused for how good it is. It's a really good platform for making native apps and it even has bindings for many different languages.
And since it can be used for IOS&Android apps it's a great competitor to React Native. It is reactive and declarative like React but with way less boilerplate and everything is so much easier to do, and it supports more platforms. The only thing React Native has on it is native looking widgets for IOS, but if you plan on using your own design anyway, that's not a problem.
You get the productivity of a modern reactive framework with the completeness of Qt. It has things like a GUI builder that modifies and generates code for you, and the code it outputs is close to what a human would write, so you aren't locked into it.
I really want to like Qt5, but it's just so... big, and using it from C++ is so cumbersome. I don't suppose you're familiar with any quality Rust or Nim or D or some other compiled-language-that-sucks-less bindings? There's https://github.com/cyndis/qmlrs, but that seems very incomplete/sketchily maintained so far (which is the problem with most bindings that I know of).
The trick is that Qt5 != Qt Quick. There aren't many bindings to Qt5 since the binding surface is enormous and very C++-like.
The QML bindings for other languages don't have to cover much surface area though. They look minimal but most of them are eminently usable because all the UI logic is in the QML+JS, all you need in a binding is a way to pass data in and out.
D, Rust, Go, Ruby, Python, etc... all have good enough bindings, that work for now and even if they do need some patching, aren't that big or hard to patch yourself. I've never used them myself (I just use C++, but I plan on using D for a QML app someday), but I know some other projects that do like https://github.com/limetext/lime
Ive been contributing to this when I have free time https://github.com/salviati/go-qt5 . I am a C++ Qt 5 dev by day so its been a fun little project. Far from complete though.
The only really complete bindings for Qt 5 are PyQt5 but its not compiled so its out for me. There are solid qml bindings for go and the rust ones worked fine last time I tested. Im not really a big fan of QML though. Its really much different than using widgets and Im not a Javascript dev by any means.
Qt5 is big in its entirety, but I've found when I've sat down to do a quick gui app in C++ that the development goes reasonably quickly. It's been nice for me in desktop and embedded environments.
The QML side of things I've never tried, and the QML based bindings to other languages in general seem less mature than the C/C++ bindings. I'm keeping an eye on go-qml though.
The best bindings are the ones for Python" PyQt (I know it's not compiled, but it's definitely a nicer language than C++). Unfortunately, it's an absolute pain the butt to try to use those on mobile, especially since Python does not build out of the box on any mobile platform (!).
I used to have a good experience with py2exe in the past. We used it in production, to deliver exes to end users.
Because it looks abandoned nowadays, I've tried pyinstaller recently. It worked OK, too; the only thing that was slightly annoying was pulling in the Windows 8/2012 (api-ms-win-*) style system dlls.
Lately I've been using Python/PyQt with Nuitka, which transpiles the Python to C++ and then compiles it into a standalone exe + dlls. It (more or less) just works too, very cool indeed!
Hey -- I've got a question about that use case. So I'm familiar with Nuitka (and all the rest... ugh) but in my brief tests using it I couldn't really get it to work with any of my python code that did anything real.
For example, if I had anything that used numpy (which is most of my code) or Qt, or a lib that uses opengl, it would either fail outright saying "can't find blarg" or it would spin forever. Now I understand that the process of transpiling something huge like numpy and then compiling it will be fairly demanding, but I've literally left this stuff running in a tmux session for a day or two and it showed now sign of ever finishing.
I'm not asking you to debug my stuff or anything, but have you had a different experience? Is there a trick to getting Nuitka to build code that leverages the python ecosystem? I would really like to figure this out, because the alternatives are really quite terrible, IMO. If Nuitka can be made to work with build times less that a week, I think he's really on to something.
Huh, strange. My standalone build sucked in numpy and PyQt4 (but not PySide) no troubles at all. I did have a minor problem with ctypes (explicitly importing _ctypes was required), but apart from that surprisingly smooth sailing. I have tried Cython briefly but Nuitka seemed a lot easier; just point and go. No modification to the source code needed and I ended up with a nice .exe and a bunch of .dll and .pyd files (including those for numpy and PyQt4). Build time was 30 minutes for a small-medium size application (25000 lines) in Python 2.7.
I love Qt for cross platform desktop apps (everything looks quite native) but to be honest the mobile apps look like crap compared to native mobile toolkits.
I have used QML and JS React in different work projects, and I fail to see how QML is reactive. It is declarative but React is a different paradigm and incredibly useful, while QML is more traditional UI development dressed up in simpler syntax.
You're right in that it isn't the exact same paradigm as React, but it ends up working out the same way.
You write a declarative description of how you want your app to look given a source of data, and then the UI updates when the data changes and you can bind UI elements to change the data. When the data changes, the UI automatically updates.
React does this by generating the whole UI in a tree from a bunch of data and then diffing. QML does this by binding signals that trigger the UI to change whenever the data does.
Yes they fundamentally work a different way, but the way you write applications and think about them is the same.
I tried to use it for targeting Android and Windows Phone around 4.3 time, and was put off for how little support it provides for mobile platforms.
It was less work to use Java, C++/CX and plain C++ than having to mimic native widgets with QML and having do my own OS wrappers. Plus the additional 30 MB.
Also the C++ widgets either didn't work on mobile or were 1:1 like the desktop version, e.g. file selector.
From the documentation, it doesn't seem it has improved much.
"It’s important to note that these styles are not claiming to be native, but instead a 100% cross-platform implementation of the Material and Universal design guidelines. For example, the Material style does not adapt to any Sony or Samsung theme on Android. You can run these styles on any platform and they will look more or less identical."
I still have to do style all the standard widgets myself or build them from scratch. I don't want them to be more or less identical, they should be what the user has on their handset.
For example where is the toast, FAB, file picker, recycler view, notification..?
iOS support is still not a thing, apparently from the comments.
Also where are the OS bindings for resources, background services, IPC between apps, OS state notifications?
Currently on the mobile space, Qt adds little value over using C++ with boost and similar libraries for the portable business logic and using the platform's main language for the UI.
At least with Xamarin I have a very good coverage for the wrapped APIs and mobile widgets per platform, updated quickly after each new OS release.
Just wanted to link to where Qt are currently with cross platform QML UIs. They are making progress, but the UI is still emulated, and I don't think they have a huge team working on this.
And I agree with your comments btw. React native is another good candidate for native controls, for some types of applications
OK I be confused. This seems, to a quick poke-around, to be all about QML. The Qt that I know, from writing a couple of apps using PyQt, is about windows and widgets made by creating instances of classes, and connecting signals to sockets and menu actions to handlers. It's a whole different thing entirely! Like their discussion of MVP has the basic concepts but I know MVP by way of subclassing QAbstractTableModel and QTableView and QAbstractItemDelegate and so on.
I don't say they are wrong to say the book is about Qt5. I am just baffled by how a Qt5 book would not even mention such things.
unfortunately pyqt docs are far from perfect everytime i have to do something with pyqt i just go to qt docs and just "translate" the concepts and api calls to python. if you are able to understand c++ syntax and translate that in your head to python youll be ok. Aside from docs i used some links from this https://wiki.python.org/moin/PyQt but you have to be careful to avoid outdated resources (current version is 5 and many things differ between 4 & 5) and not all tutorials are high quality. I also wrote one tutorial myself BTW http://pawelmhm.github.io/python/pyqt/qt/webkit/2015/09/08/b...
Personally, I have enjoyed working in Qt. For anyone looking to get going, I recommend practicing by transcribing the example code and then try tweaking it a little (and more so for Qt / GUI development than with other technologies). It takes a bit of boot time, but once you get going you will find you naturally start to "get it".
The problem with Qt5 is it's almost C++ exclusively. There are some python bindings in PyQt, but all the other languages are stuck with the QML subset.
Qt5 is really underused for how good it is. It's a really good platform for making native apps and it even has bindings for many different languages.
And since it can be used for IOS&Android apps it's a great competitor to React Native. It is reactive and declarative like React but with way less boilerplate and everything is so much easier to do, and it supports more platforms. The only thing React Native has on it is native looking widgets for IOS, but if you plan on using your own design anyway, that's not a problem.
You get the productivity of a modern reactive framework with the completeness of Qt. It has things like a GUI builder that modifies and generates code for you, and the code it outputs is close to what a human would write, so you aren't locked into it.