[PyQt] How to destroy SIGNAL

Mark Summerfield list at qtrac.plus.com
Tue Nov 16 08:53:42 GMT 2010


On Mon, 15 Nov 2010 21:20:35 +0000
starglider develop <starglider.dev at gmail.com> wrote:
> Hi,
> I have a QWidgetGrid that need to response to a double click signal,
> but sometimes it as the
> double grid signal disconnected to allow the user to directly edit the
> cells, and a itemChanged signal was
> implemented, my problem is that I can't delete/destroy de signals
> according to my needs.
> 
> Any help will be great.
> 
> Thank you in advance.

Have you tried using QObject.blockSignals()? This doesn't create or
destroy them but stops/starts them being acted upon.

http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html#blockSignals

And if you really want to delete a signal use QObject.disconnect():

http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html#disconnect

-- 
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
    C++, Python, Qt, PyQt - training and consultancy
        "Advanced Qt Programming" - ISBN 0321635906
            http://www.qtrac.eu/aqpbook.html


More information about the PyQt mailing list