News for hackers. Stuff that matters.
Re:PyQt5 Tutorial: Create a Python GUI in 2018 by chaz6 on Tuesday September 25, 2018 @12:36PM (#18067869)
Just to note, there are official [1] Python bindings available for Qt and this can usually be installed with `pip install pyside2`.

[1] https://www.qt.io/qt-for-python

Re:PyQt5 Tutorial: Create a Python GUI in 2018 by omaranto on Tuesday September 25, 2018 @08:26PM (#18071673)
These aren't mentioned until the fourth paragraph of this tutorial. :)
Re:PyQt5 Tutorial: Create a Python GUI in 2018 by gusmd on Tuesday September 25, 2018 @02:23PM (#18069017)
We use (and pay for) PyQt5 at work. Do you have experience with both and if so can you comment on any tangible differences?

If possible, I would rather get behind the "official" one since we also already pay for commercial Qt licenses.

Re:PyQt5 Tutorial: Create a Python GUI in 2018 by blattimwind on Tuesday September 25, 2018 @02:48PM (#18069256)
Signal connection behaviour seems to be different in PySide2 regarding non-slot receivers.

E.g. this works in PyQt:

    def f(): pass

    signal.connect(f)
    signal.disconnect(f)
But the disconnect fails in PySide2 (RuntimError: not connected). Seems like you have to store the connection object, which is a bit of a PITA because signal.connect() does not return that.
Re:PyQt5 Tutorial: Create a Python GUI in 2018 by cpburns2009 on Tuesday September 25, 2018 @12:40PM (#18067921)
PySide2 is now out of beta?
Re:PyQt5 Tutorial: Create a Python GUI in 2018 by macco on Tuesday September 25, 2018 @12:49PM (#18068024)
Yes, it's called "Qt for Python" now
Re:PyQt5 Tutorial: Create a Python GUI in 2018 by yorwba on Tuesday September 25, 2018 @01:09PM (#18068243)
It's still just a "technical preview", but I've been using it for a while and didn't have any problems that weren't caused by me not knowing how Qt works.

Some of the examples in the documentation are still in C++, but it's pretty easy to translate them to Python since the names are the same. (Sometimes painfully so, e.g PySide2.QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff.)

Re:PyQt5 Tutorial: Create a Python GUI in 2018 by sleavey on Tuesday September 25, 2018 @01:39PM (#18068571)
Agreed. I dabbled with Pyside2 recently and it was refreshingly well structured compared to PyQt4, which is what I last used when I built a GUI a few years ago. It looks like the community might finally get behind one, good, open library for Qt5.
Re:PyQt5 Tutorial: Create a Python GUI in 2018 by toyg on Tuesday September 25, 2018 @01:49PM (#18068681)
> Some of the examples in the documentation are still in C++

If you do anything serious with Qt you'll have to read those anyway, I believe even PyQt stopped "translating" the docs to python. It's easy enough anyway, even for people like me with no real experience of C++.

Re:PyQt5 Tutorial: Create a Python GUI in 2018 by nofunsir on Tuesday September 25, 2018 @03:10PM (#18069459)
There are some things that are still missing and I have to pull from the PyQt5 package, but otherwise it's great.