News for hackers. Stuff that matters.
Re:Qt binding for Go with support for all major operating sy... by nardi on Friday November 11, 2016 @02:31AM (#12928715)
Please, I beg of you, do not create an iOS app using this library. Look at that screenshot: https://github.com/therecipe/qt/blob/master/internal/screens...

It looks like a tiny Windows 95 on your phone. Tap targets way too small.

Re:Qt binding for Go with support for all major operating sy... by kbroulik on Friday November 11, 2016 @02:44AM (#12928765)
Re:Qt binding for Go with support for all major operating sy... by zerr on Friday November 11, 2016 @02:51AM (#12928793)
Honestly speaking, I find "Win95" look and controls much more intuitive and easy to use.
Re:Qt binding for Go with support for all major operating sy... by abrkn on Friday November 11, 2016 @07:06AM (#12929895)
The glorious days before flat ui
Re:Qt binding for Go with support for all major operating sy... by noir_lord on Friday November 11, 2016 @08:21AM (#12930305)
Flat can be fine with shadows (though if it has shadows is it flat?) and other hints but yes I think the desktop UI in particular reached it's peak with Win2k, everything since has been different but not better.

These days I use XFCE with http://www.noobslab.com/2016/03/vivacious-colors-gtk-theme-s... and it's nice.

Re:Qt binding for Go with support for all major operating sy... by nardi on Friday November 11, 2016 @03:24AM (#12928924)
Nope, those look much better. I guess just...don't use the widgets.
Re:Qt binding for Go with support for all major operating sy... by creshal on Friday November 11, 2016 @04:26AM (#12929175)
I'm fairly sure it's the same widgets, just with a better theme overlaid.
Re:Qt binding for Go with support for all major operating sy... by sho_hn on Friday November 11, 2016 @04:47AM (#12929254)
No, it's Qt Quick vs. QWidget. QWidget was created in the pre-mobile days, and while still very useful to make high-quality work horse desktop apps, the mobile platforms are much better served by Qt Quick in terms of theming, animation and touch support.

This fragmentation is frustrating sometimes, but in the end what counts is whether the framework has solutions to your problems, and it usually does. (Meanwhile, Qt Quick is improving on the desktop over time.)

Re:Qt binding for Go with support for all major operating sy... by pjmlp on Friday November 11, 2016 @09:22AM (#12930815)
This is why on an application I have done back in the 5.3 days, I decided to throw Qt away and rewrite it using standard C++ for the logic, with Java and C++/CX for the UI.

I was much more productive and I had much better integration with the respective OS APIs.

Re:Qt binding for Go with support for all major operating sy... by zerr on Friday November 11, 2016 @02:50AM (#12928789)
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.
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.

Re:Qt binding for Go with support for all major operating sy... by bertit on Friday November 11, 2016 @03:33AM (#12928957)
I enjoy working with QML. There are a few issues, but it is not "crap" at all.
Re:Qt binding for Go with support for all major operating sy... by friendzis on Friday November 11, 2016 @03:23AM (#12928918)
IIRC 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.
Re:Qt binding for Go with support for all major operating sy... by akerro on Friday November 11, 2016 @06:12AM (#12929661)
It just doesn't have themes. You know, you can apply CSS styles and JS animations for Qt objects?
Re:Qt binding for Go with support for all major operating sy... by shmerl on Friday November 11, 2016 @02:44AM (#12928764)
I guess no one provided needed Qt Quick Components?
Re:Qt binding for Go with support for all major operating sy... by therecipe on Friday November 11, 2016 @12:04PM (#12932394)
author here; Yes, those look awful. But only because it's build with Qt's C++ widgets (intended for desktop development) and not with the recommended Qt Quick Controls. I will update the screenshots to something that is build with QML.