Giter Site home page Giter Site logo

Comments (10)

kernc avatar kernc commented on July 17, 2024 1

I don't think we will have much problem switching to Signals and Slots here. There just isn't a reason to enforce a particular style someone randomly decided upon when working to convenience the user can prove as fruitful and, in this case, so effortless.

from qtpy.

ccordoba12 avatar ccordoba12 commented on July 17, 2024

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 :-)

from qtpy.

Nodd avatar Nodd commented on July 17, 2024

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.

from qtpy.

kernc avatar kernc commented on July 17, 2024

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.

from qtpy.

ccordoba12 avatar ccordoba12 commented on July 17, 2024

@Nodd, your final thoughts on this? You were the one who proposed #47 :-)

I'm -0.5 on the idea because (as I said) I'd prefer projects use the more generic Signal instead of pyqtSignal. But I understand this can be hard for big projects like Orange which decided to use pyqtSignal from the beginning :-)

from qtpy.

goanpeca avatar goanpeca commented on July 17, 2024

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)

from qtpy.

rlaverde avatar rlaverde commented on July 17, 2024

This is somehow related to #115

from qtpy.

goanpeca avatar goanpeca commented on July 17, 2024

Yep, this is now updated, we should close

from qtpy.

raidsan avatar raidsan commented on July 17, 2024

not use spyder, just want to use PyQt4, PyQt5 compatible, if you delete pyqtSignal and pyqtSlot and use SIgnal/Slot in spyder way, why not rename the project to spyder-qt ?

from qtpy.

ccordoba12 avatar ccordoba12 commented on July 17, 2024

Where in this discussion do we say that we decided to use Signal and Slot due to Spyder? The only mention to Spyder is yours.

from qtpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.