You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
By clicking “Sign up for GitHub”, you agree to our
terms of service
and
privacy statement
. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
The
README says
the API is
PyQt5 compatible
, yet the PyQt5 identifiers such as
QtCore.pyqtSignal
are
explicitly deleted
in favor of PySide's.
PyQt5's symbols were removed in
#47
with IMHO not so great justification:
I still think that the duplicate imports are very weird and not needed
pyqtSignal
works only for PyQt bindings. What we tried to do in
#47
is to avoid people to use those names and use instead the more generic
Signal
and
Slot
ones.
That way it's expected that your application runs seamlessly when you move from PyQt to PySide. If you use instead
pyqtSignal
that certainly won't be the case :-)
The README doesn't claim to be PyQt5 compatible. It uses the PyQt5 layout for modules (other abstraction modules import everything into both QtGui and QtWidgets for example).
In "Basically, you write your code as if you were using PyQt5", the important word is "basically" 😉 It's not the case for Signals and Slot.
On the other hand we agree that the documentation is lacking, see
#61
.
Equivalently, you could
import PySide's Signal
:
from PySide.QtCore import Signal as pyqtSignal
Furthermore, you could agnostically:
if PYQT5:
from PyQt5.QtCore import *
Signal, Slot, Property = pyqtSignal, pyqtSlot, pyqtProperty
if PYSIDE:
from PySide.QtCore import *
pyqtSignal, pyqtSlot, pyqtProperty = Signal, Slot, Property
and avoid tensions to force the user to write their software in a certain way.
PySide folks, at least,
seem to acknowledge this
.
Hi
@kernc
just to update here,
There just isn't a reason to enforce a particular style someone randomly decided
Its not really random, the thing is that we follow the Qt5 layout (not the PyQt5 layout) so we need to update the readme.
Since having PyQtSignal was PyQt5 specific, that is why we decided to remove it. PySide (and eventually PySide2) will use Signal and Slot (which feels much better).
We can re-add them if that would make the use of QtPy in orange easier... (but I still think using Signal and Slot to be better than PyQtSignal and PyQtSlot)
all things from qt comes from the qtpy abstraction layer
renamed calls to pyqtSignal/Slot to Signal/Slot as stated in spyder-ide/qtpy#76
QtreeWidgetItem loaded from QtWidgets package