4 ms·
That's because it is done with Qt Widgets. "Proper" way for mobile is to use Qt Quick Controls, but you have to deal with QML/js crap unfortunately.
by zerr 10y ago
That's because it is done with Qt Widgets. "Proper" way for mobile is to use Qt Quick Controls, but you have to deal with QML/js crap unfortunately.
- friendzis 10y agoIIRC Qt Widgets are stylable as well. I guess default distribution does not provide styles for iOS, so it defaults to the Win95 look. To me Qt Widgets is the most elegant UI API out there.
- bertit 10y agoI enjoy working with QML. There are a few issues, but it is not "crap" at all.
- dkersten 10y agoQML isn't crap. Its much nicer, IMHO, than HTML and CSS and much more intuitive. The animation and states system makes it trivial to make polished looking UI's. Granted, I wish I didn't have to use JS with it, but QML itself is fantastic.
- zerr 10y agoOf course, when I say it's crap, I mean compared to C++/Qt Widgets. I wish Quick Controls were available in pure C++.
- dkersten 10y agoYou can use them from C++, but its definitely not the expected usage and not particularly easy. I personally much prefer QtQuick to QtWidgets, and really like the QML declarative language as a better HTML/CSS for non-web. But I completely agree with you that I would prefer if I could code all my logic in C++ and not JS. I've been meaning to play around with two ideas: 1. Construct the QtQick widget scenegraph wholly from C++ (and not using QML/JS at all). Doable, but definitely not intended usecase. 2. Construct the scenegraph using QML, but using it only for setting values (and never any logic) and then manually connecting the signals from the QML-created widgets to C++ slots.
- revelation 10y agoCareful what you wish for. XAML had the whole "no code because we want designers to use it" thing going on and the result was a bazillion of converters with a SNR of <<1.
- dkersten 10y agoI don't mind code, just... I'd rather if I had choices beyond JavaScript.
- enqk 10y agoIt is not wise to even implement a lot of logic in the JS part of QML, as the JS interpreter there is quite a bit more primitive than something like V8. Your performance will suffer if you attempt to write anything too complicated in JS inside QML.
- dkersten 10y agoOh I know, I've had some complex QML/JS in the past. Even more so if you're running on iOS where the JS isn't jitted. It's really easy to write QObjects that are accessible to QML and you can connect your signals/slots with the QML widget ones, so having the logic in C++ isn't hard. It's just not quite as convenient as putting it inline in QML, I guess.
- deleted 10y ago[deleted]
- weberc2 10y agoHow is the QML standard widget library coming? Last I looked you had to roll your own buttons.
- dkersten 10y agoQtQuick Controls 2 is pretty complete wth more controls on the way: http://doc.qt.io/qt-5/qtquickcontrols2-index.html http://doc.qt.io/qt-5/qtquickcontrols2-index.html They're easy to use, themeable and hardware accelerated.