The Python Oracle

Suppress PyQt event temporarily?

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Mysterious Puzzle

--

Chapters
00:00 Suppress Pyqt Event Temporarily?
00:24 Accepted Answer Score 8
00:54 Thank you

--

Full question
https://stackoverflow.com/questions/7323...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #pyqt #qtreewidget

#avk47



ACCEPTED ANSWER

Score 8


You can set blocking of signals using QObject::blockSignals.
http://doc.qt.nokia.com/stable/qobject.html#blockSignals

bool QObject::blockSignals ( bool block )
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). If block is false, no such blocking will occur. The return value is the previous value of signalsBlocked(). Note that the destroyed() signal will be emitted even if the signals for this object have been blocked. See also signalsBlocked().