News for hackers. Stuff that matters.
Re:Ask HN: How to do cross platform GUI? by anang on Saturday August 22, 2020 @04:53AM (#24242768)
Are there any canonical resources for learning qt with common language bindings? I know pyqt exists, but there’s a lot of info out there and it’s hard to know what’s good and what’s not. I’ve also found that generally any guides are either kitchen sink level or not much more than hello world.

Where should I look? I’m willing to put in the work!

Re:Ask HN: How to do cross platform GUI? by otterlicious on Saturday August 22, 2020 @07:52PM (#24248278)
I learned from this guide (well the PyQt4 version). It starts off small and works up to the kitchen sink if that's what you need:

http://zetcode.com/gui/pyqt5/

There are a few others here:

https://wiki.python.org/moin/PyQt/Tutorials

The 2020 one there may be what you're looking for, more than hello world but doesn't quite all the way get to the kitchen sink, just maybe the silverware drawer.

Re:Ask HN: How to do cross platform GUI? by the_pwner224 on Sunday August 23, 2020 @03:22PM (#24254540)
Someone else linked a beginner type PyQt tutorial, but just FYI the PyQt API is pretty much exactly the same as the C++ API, down to capitalization. I only use PyQt but still use to the official Qt documentation which is for C++. The only issue can be finding which module a class needs to be imported from in PyQt, which usually can be resolved with Google and then later by looking at old code and copying the few lines of import statements you build up.
Re:Ask HN: How to do cross platform GUI? by emddudley on Monday August 24, 2020 @10:51PM (#24267731)
PySide2 is the offical Qt Python bindings, and so the Qt website has reference docs and examples for it. PyQt is a separate project by Riverbank Computing.
Re:Ask HN: How to do cross platform GUI? by d0mine on Sunday August 23, 2020 @04:32AM (#24250530)
Beware of there may be Qt licensing issues.
Re:Ask HN: How to do cross platform GUI? by formerly_proven on Sunday August 23, 2020 @09:05AM (#24251617)
Not really. It's not 1997.

Qt is LGPL. PySide is LGPL. PyQt is "GPL but allows you to link from popular open source licenses".

Re:Ask HN: How to do cross platform GUI? by andi999 on Sunday August 23, 2020 @01:05PM (#24253324)
PyQt is "GPL but allows you to link from popular open source licenses" what is this supposed to mean?
Re:Ask HN: How to do cross platform GUI? by formerly_proven on Sunday August 23, 2020 @02:31PM (#24254099)
Ah, I see I'm not quite right there. PyQt _used_ to include a file listing the usual open source licenses (MIT, BSD, Apache, Python and so on) as ok to use with their GPL code base, but they since removed that, because in the meantime it has become clearer that the GPL is already giving people that freedom.

https://riverbankcomputing.com/pipermail/pyqt/2014-February/...

Re:Ask HN: How to do cross platform GUI? by andi999 on Sunday August 23, 2020 @03:06PM (#24254409)
Your statement sounds like GPL is giving a "freedom", so like you could use GPL code in an MIT licensed project (sorry if I misinterpreted your statement); this is not true, see https://www.tawesoft.co.uk/kb/article/mit-license-faq "Can I use GPL-licensed code in my MIT-licensed project? No. The project as a whole must conform to the terms of the GPL license and must be distributed under the terms of that license. Therefore such a project as a whole must be distributed as GPL, but can still contain MIT-licensed software."

So it is more like MIT licensed projects give you the freedom to use in a GPL project.

Re:Ask HN: How to do cross platform GUI? by flingo on Monday August 24, 2020 @06:10AM (#24259149)
The keyword here is "linking exception". It is a hack to sidestep the licensing problems caused by dynamic linking. e.g. If I encase gcc in java, and release gcc.class under GPL3+, but use it extensively in a separate proprietary java program, does that infringe on the terms of the GPL? Does providing copies of the two together, with a single installer make a difference?

https://en.wikipedia.org/wiki/GPL_linking_exception

Re:Ask HN: How to do cross platform GUI? by andi999 on Monday August 24, 2020 @08:37AM (#24260008)
Free PyQT does not have the linking exception (which would be lgpl); only the commercial version has.

https://riverbankcomputing.com/commercial/license-faq