5 ms·
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
by trishume 11y ago
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.
- PeCaN 11y agoI 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 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).
- rhodysurf 11y agoIve been contributing to this when I have free time https://github.com/salviati/go-qt5 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.
- oblio 11y agoThe 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 (!).
- PeCaN 11y agoI like PyQt except that it's a pain to deploy anything written in it on Windows—though to be fair, I haven't tried for a couple years! I wonder if PyQt works with Cython. That could be interesting.
- vetinari 11y agoI 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.
- mfgs 11y agoLately 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!
- kyzyl 11y agoHey -- 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.
- mfgs 11y ago
- janimo 11y agogo-qml is good enough for small apps, but it's QML only and not very actively maintained unfortunately.
- digikata 11y agoQt5 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.
- trishume 11y agoThe 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 https://github.com/limetext/lime
- baldfat 11y agoI now want to see if I can pull off the bindings for Racket using FFI Library. http://docs.racket-lang.org/foreign/ http://docs.racket-lang.org/foreign/ Something to do while snowed in.
- fineIllregister 11y agoSomething I've thought about, too. Dr Racket especially would benefit from a Qt version.
- rhodysurf 11y agoI 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.
- pjmlp 11y agoYeah, as I answered on another thread, they don't focus that much on mobile support, other that it compiles with the OS SDK.
- hellofunk 11y agoI 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.
- trishume 11y agoYou'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.
- adrianlmm 11y agoQt5 has been always over hyped IMHO.
- pjmlp 11y agoI 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.
- dharma1 11y agohttps://blog.qt.io/blog/2015/11/23/qt-quick-controls-re-engineered-status-update/ https://blog.qt.io/blog/2015/11/23/qt-quick-controls-re-engi...
- pjmlp 11y agoWhat do you mean by posting that link? "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.
- dharma1 11y agoJust 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