News for hackers. Stuff that matters.
Re:Qt binding for Go with support for all major operating sy... by dkersten on Friday November 11, 2016 @04:35AM (#12929211)
QML 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.

Re:Qt binding for Go with support for all major operating sy... by zerr on Friday November 11, 2016 @05:40AM (#12929504)
Of course, when I say it's crap, I mean compared to C++/Qt Widgets. I wish Quick Controls were available in pure C++.
Re:Qt binding for Go with support for all major operating sy... by dkersten on Friday November 11, 2016 @07:47AM (#12930112)
You 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.

Re:Qt binding for Go with support for all major operating sy... by enqk on Friday November 11, 2016 @09:46AM (#12931027)
It 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.
Re:Qt binding for Go with support for all major operating sy... by dkersten on Friday November 11, 2016 @12:35PM (#12932617)
Oh 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.

Re:Qt binding for Go with support for all major operating sy... by revelation on Friday November 11, 2016 @08:53AM (#12930586)
Careful 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.
Re:Qt binding for Go with support for all major operating sy... by dkersten on Friday November 11, 2016 @12:30PM (#12932582)
I don't mind code, just... I'd rather if I had choices beyond JavaScript.
Re:Qt binding for Go with support for all major operating sy... by weberc2 on Friday November 11, 2016 @10:54AM (#12931720)
How is the QML standard widget library coming? Last I looked you had to roll your own buttons.
Re:Qt binding for Go with support for all major operating sy... by dkersten on Friday November 11, 2016 @12:29PM (#12932578)
QtQuick Controls 2 is pretty complete wth more controls on the way: http://doc.qt.io/qt-5/qtquickcontrols2-index.html

They're easy to use, themeable and hardware accelerated.