[Qt-interest] Block all signals of ui class

Irfan Omair irfan.omair.qt at gmail.com
Tue Jun 29 22:32:04 CEST 2010


There is no any one api which will block all connected signals, that I know
of.
But you need to block and unblock only those signals for which you have
Connect() method written.
Then signals which you have not connected is not required to be blocked or
unblocked.

Regards,
Irfan Omair

On Tue, Jun 29, 2010 at 11:25 AM, Matthias Pospiech <
matthias.pospiech at gmx.de> wrote:

> I have a widget with many comboboxes and spinboxes which all control
> settings of a device.
> This device class however is however a pointer to 0 during contruction.
> With the use of the 'connectSlotsByName' feature these widgets all send
> signals during startup which lead to a crash
> when the device class is accessed.
>
> Is there a way to disable all signals of all widgets in the ui class?
> Setting a blockSignals(true) around all widgets before and after the
> ui->setupUI(this) does not make much sense to me.
>
> Or can I copy the code for the connectSlotsByName feature somewhere ?
> Then I could get around setting up the connect code for all 20+ widgets.
>
> Matthias
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100629/09f1bc7c/attachment.html 


More information about the Qt-interest-old mailing list