News for hackers. Stuff that matters.
Re:Qt Quick Controls 2.1 and Beyond by messutied on Thursday October 06, 2016 @10:46AM (#12652867)
I would love to use Qt for personal for profit projects, but at $79/month (the cheapest commercial option) I find it too expensive, as a independent developer with pet projects that might not generate much (if at all).

What other good options do you know for building multi-platform nice-looking desktop UIs, I dont want to go with electron but so far is the best option I see for fast and cheap development, with the tradeoff of 50mb simple apps and not so great performance.

Re:Qt Quick Controls 2.1 and Beyond by zerr on Thursday October 06, 2016 @10:52AM (#12652945)
You can use Qt for commercial projects for free, including mobile platforms. This is not highly advertised, but you can... :)
Re:Qt Quick Controls 2.1 and Beyond by plq on Thursday October 06, 2016 @01:59PM (#12654574)
I'd love to see some evidence to back your claims regarding mobile platforms.

To satisfy LGPL, your users need to be able to swap Qt versions. For desktop platforms, that's trivial to do: Use dynamic linking and your users will be able to fiddle with the shared library files to their heart's content.

However, for IOS or Android, the moment the user changes the contents of your package, your signature is void and the vanilla platforms don't let the user install modified versions of your binary. For IOS, there are additional hurdles like the requirement to statically link or the licence incompatiblility when interfacing with IOS which to me boils down to this: If you are distributing a non-free app built with Qt Open Source via Google's Play Store or Apple's App Store, you are in violation of the terms of Qt's license.

The fact that the Qt company tries to play nice with the industry doesn't make it any less so.

I'd love to be proven wrong, but I'm just tired of watching this subject being discussed with nothing more than handwavy arguments, winks and smileys.

Re:Qt Quick Controls 2.1 and Beyond by aeruder on Thursday October 06, 2016 @03:21PM (#12655280)
100% correct. Far too many misinterpretations of the LGPL out there seem to ignore the requirement that the LGPL'd portion must be able to be replaced/updated.

I've seen way too many LGPL-licensed embedded-C libraries and VHDL libraries where it just does not make any sense. If your target platform doesn't have a dynamic linker, then LGPL is the same as GPL. There are some hacks where people distribute unlinked .o/.obj files. This is acceptable as well, but I don't see it too often.

Re:Qt Quick Controls 2.1 and Beyond by zerr on Thursday October 06, 2016 @04:52PM (#12656008)
I've answered below:

https://news.ycombinator.com/item?id=12653246

So for mobile platforms you can publish compiled .obj files.

Re:Qt Quick Controls 2.1 and Beyond by ktta on Thursday October 06, 2016 @11:07AM (#12653095)
AFAIK you'll have to have a GPL your code right? If you want to keep the source closed, then you'll have to get a commercial license which costs money. Can you refer me to where you saw that you can use Qt for free with being able to keep your source closed? (you still can monetize open source programs so there's that)

Or are you referring to LGPL?

Re:Qt Quick Controls 2.1 and Beyond by jtuente on Thursday October 06, 2016 @11:16AM (#12653186)
The licensing has changed a bit over the past year. The biggest difference between the LGPL and GPL versions is that Charts and Data Visualization aren't available under LGPL, and Qt Quick is limited to OpenGL.

https://www.qt.io/licensing-comparison/

Re:Qt Quick Controls 2.1 and Beyond by zerr on Thursday October 06, 2016 @11:23AM (#12653246)
Qt is LGPL (3 ?), so you can use it for closed source proprietary projects assuming that it is possible to re-link your project (with Qt). I.e. you should use Qt as .so/.dll dynamic lib for desktop apps. For Android it is same as I understand. As for iOS - where as I remember you have to build static binary - just providing your .obj files is enough. So it is compiled, not open source.
Re:Qt Quick Controls 2.1 and Beyond by slavik81 on Thursday October 06, 2016 @01:14PM (#12654168)
If you use dynamic linking and target open platforms, like desktops, you can easily fulfill all the terms of the LGPL [1] without releasing your own code. See 3.7 of the Qt Legal FAQ [2].

[1] https://tldrlegal.com/license/gnu-lesser-general-public-lice... [2] https://www.qt.io/faq/#_Toc453700715

Re:Qt Quick Controls 2.1 and Beyond by gcp on Thursday October 06, 2016 @11:10AM (#12653129)
Qt is LGPLv3, not only GPL afaik?
Re:Qt Quick Controls 2.1 and Beyond by messutied on Thursday October 06, 2016 @11:13AM (#12653151)
Wow I didnt know this, thanks! I'll look it up :)
Re:Qt Quick Controls 2.1 and Beyond by vesinisa on Thursday October 06, 2016 @11:02AM (#12653047)
What exactly is the issue with LGPL licensing?
Re:Qt Quick Controls 2.1 and Beyond by radix07 on Thursday October 06, 2016 @11:29AM (#12653286)
It's confusing as hell what you can actually do with it... Even talking to Qt sales, it is a little fuzzy on what is allowable or not. But in general yes, you can create commercial products as long as you don't modify their stuff or link to it improperly or look at it wrong.
Re:Qt Quick Controls 2.1 and Beyond by joezydeco on Thursday October 06, 2016 @12:07PM (#12653603)
I'm a Qt developer with 10 years under my belt and I still can't figure it out.

But something has radically changed with the new LGPL licensing in recent versions, from what I can tell.

I recently received an RFP from a very large European vehicle manufacturer, the RFP requested that Qt 5.6 should be used and no later. (The licensing changed with 5.7, so their lawyers must have figured this out)

Re:Qt Quick Controls 2.1 and Beyond by mrpippy on Thursday October 06, 2016 @01:59PM (#12654576)
5.7 dropped LGPLv2.1 as an option.

LGPLv3 includes the "anti-TiVoization" clauses which require that any device including the software must include an offer for not only the covered source code, but "Installation Information" allowing the end-user to replace the firmware on the device. Giving out this info is not something that a car company (or really any companies) want to provide.

It's unfortunate that a large car company doesn't want to buy a commercial license, but maybe they'll be forced into that once 5.6 becomes too old.

Re:Qt Quick Controls 2.1 and Beyond by joezydeco on Thursday October 06, 2016 @02:39PM (#12654905)
Can you clarify how that differed from the previous open-source license?

I thought, prior to 5.6, you could go licenseless if you provided a way for the user to replace the (dynamically linked) Qt libraries with libraries of their own.

Was it just too nebulous before, and most companies just didn't offer a way to do this or buried it in some backdoor or something?

Yeah, I agree it's a shame that a lot of companies don't want to license up, but if you've seen what they want for a per-device fee these days you'd probably understand. I did a product in 2008 and it was maybe $1/unit, now it's an order of magnitude larger.

Re:Qt Quick Controls 2.1 and Beyond by mrpippy on Thursday October 06, 2016 @05:58PM (#12656479)
(my understanding, IANAL)

Yes, that's generally the spirit of both the LGPLv2.1 (5.6 and before) and LGPLv3 (5.7 and up). Link dynamically to the LGPL covered libraries, provide the source, and you're good.

But there's a commonly-used loophole: the LGPLv2.1 does not state that the user needs to be able to actually replace the covered library with their own built binary. In 1991/1999 this may have been assumed (given dynamic linking and desktop OSes), but for embedded devices and newer platforms it is not a given.

Digital signature verification can be used to prevent the user from loading their own firmware (the only way of replacing the LGPL libraries). This is why the GPLv3 added the anti-TiVoization clauses, requiring that installation instructions be provided with the source code, so the user can actually install the libraries onto the device.

Re:Qt Quick Controls 2.1 and Beyond by joezydeco on Thursday October 06, 2016 @07:56PM (#12657123)
Thanks for clearing that up.

I'm in final test on a 4.8-based product and actually put in a backdoor to replace the libraries...just to be safe and compliant. Guess the work isn't totally wasted.

Re:Qt Quick Controls 2.1 and Beyond by radix07 on Thursday October 06, 2016 @02:06PM (#12654632)
Yeah, for a large company I would think the license would have been nothing compared to paying the lawyers to investigate the LGPL changes.
Re:Qt Quick Controls 2.1 and Beyond by heeen2 on Thursday October 06, 2016 @04:06PM (#12655648)
I think companies fear after they invest in a 5.7+ Qt stack, QtCompany can just ramp up their price after the initial contract runs out.
Re:Qt Quick Controls 2.1 and Beyond by radix07 on Thursday October 06, 2016 @05:15PM (#12656172)
Yeah... A lawyer would never do that...
Re:Qt Quick Controls 2.1 and Beyond by radix07 on Thursday October 06, 2016 @01:16PM (#12654193)
That sounds concerning, I would really like to know more about what that really means.

I briefly started investigating the changes for Qt 5.7 before I started having flashbacks of trying to figure out all this LGPL stuff again. Does not seem to be any less confusing...

Re:Qt Quick Controls 2.1 and Beyond by joezydeco on Thursday October 06, 2016 @01:41PM (#12654419)
My team didn't take the proposal, but from what I gathered during some fact-finding the 5.7 terms changed what you need to distribute to customers regarding the Qt libraries.

Before, you had to maintain a Qt source repository that matched distribution. People could build and link in Qt as they pleased, either vanilla from that repo or modified as they liked.

With 5.7 and the new LGPL, it seemed that you also have to provide the entire toolchain needed to build the source and link it into the final application. Which means you also need to provide the kernel headers and etc that match up.

I could be totally wrong. But I'm guessing 5.7 required too much other stuff be made public and the customer wasn't pleased with that. Can't say I disagree.

Re:Qt Quick Controls 2.1 and Beyond by slavik81 on Thursday October 06, 2016 @01:59PM (#12654579)
It's the same anti-tvoization stuff as GPL3. Companies were giving out the source code, but used locked down hardware or proprietary toolchains so the source code was useless. What LGPL3 specifies over LGPL2 is that the source code needs to actually be usable. The spirit of that rule rather makes sense to me.

Of course, part of the reason why The Qt Company likes LGPL3 is that other companies are going to look at the requirements to use and distribute open toolchains for their supported platforms and just buy a commercial license instead.

Re:Qt Quick Controls 2.1 and Beyond by joezydeco on Thursday October 06, 2016 @07:59PM (#12657133)
The funny thing is that the Yocto project has kind of eliminated a lot of the hurdles. You could technically branch a .bb recipe for your kernel and boardset and everything else would build on its own, including the SDK with toolchain wrapped in.

Qt seems to be almost caught up with getting qt5 in the meta directories and having everything in place.

Re:Qt Quick Controls 2.1 and Beyond by plq on Thursday October 06, 2016 @01:42PM (#12654429)
Could that be rather because Qt 5.7 and later requires C++11?

The automotive industry is notorious for hating to change what already works, after all.

Re:Qt Quick Controls 2.1 and Beyond by joezydeco on Thursday October 06, 2016 @01:50PM (#12654487)
Nope. I just pulled the RFP back up and it said, somewhat cryptically but explicitly, "Reason: Qt license changed with 5.7"
Re:Qt Quick Controls 2.1 and Beyond by distances on Thursday October 06, 2016 @05:07PM (#12656118)
This sounds weird. Why wouldn't they require the commercial version of Qt to be used instead?
Re:Qt Quick Controls 2.1 and Beyond by ihaveajob on Thursday October 06, 2016 @12:07PM (#12653604)
I've seen even legal departments get scared from some of these licenses, but it's not that complicated. GPL requires that you license ALL your code as GPL as well. LGPL lets you link against a so-licensed library without affecting the license for the rest of the software.
Re:Qt Quick Controls 2.1 and Beyond by pjmlp on Thursday October 06, 2016 @10:57AM (#12652994)
The approach I use on my hobby projects between Android and WinRT (nowadays UWP).

A MVVM architecture with the business logic in C++, and views written in Java, C++/CX.

It used to be less effort than trying to make Qt look like native UI, while at the same time having to write wrappers for the platform APIs not supported by Qt.

Other alternative I am now looking into, is moving into Xamarin.

Re:Qt Quick Controls 2.1 and Beyond by jventura on Thursday October 06, 2016 @02:34PM (#12654867)
I do the same for my apps, but with a Python "backend". It allows me to use Python on my webapps, and Python on Android through JNI and Java on the frontend (https://github.com/joaoventura/pybridge)
Re:Qt Quick Controls 2.1 and Beyond by 77pt77 on Thursday October 06, 2016 @11:05AM (#12653084)
> It used to be less effort than trying to make Qt look like native UI

So it isn't any more?

Re:Qt Quick Controls 2.1 and Beyond by pjmlp on Thursday October 06, 2016 @01:37PM (#12654382)
I don't know, since I never bothered to try it again after 5.4.
Re:Qt Quick Controls 2.1 and Beyond by macco on Thursday October 06, 2016 @10:58AM (#12653003)
libui (https://github.com/andlabs/libui) seems promising.
Re:Qt Quick Controls 2.1 and Beyond by gcp on Thursday October 06, 2016 @11:11AM (#12653137)
Doesn't do mobile (unlike Qt).

If mobile isn't an issue then by all means wxWidgets!

Re:Qt Quick Controls 2.1 and Beyond by vilya on Thursday October 06, 2016 @12:45PM (#12653919)
"Dear ImGui" (https://github.com/ocornut/imgui) is an absolute delight to use. Can't recommend it highly enough. It's not suitable for every project, but when it does fit then I can't think of anything else I'd rather use.
Re:Qt Quick Controls 2.1 and Beyond by swah on Thursday October 06, 2016 @06:33PM (#12656695)
I hope they manage to make bootstrap-like themes that people can reuse - not a fan of the original look, but the code and philosophy are superb.
Re:Qt Quick Controls 2.1 and Beyond by ComodoHacker on Thursday October 06, 2016 @02:53PM (#12655019)
Sciter is definitely an option.

http://sciter.com/

Re:Qt Quick Controls 2.1 and Beyond by mbaye on Thursday October 06, 2016 @12:01PM (#12653549)
Try wxWidgets or the python bindings wxPython.