[Qt-interest] Block all signals of ui class

Tony Rietwyk tony.rietwyk at rightsoft.com.au
Wed Jun 30 02:45:28 CEST 2010


Hi Matthias, 

Why don't you just change the slots to check for the 0 pointer?  Or add a
boolean to say when the device is ready.  All of our forms use at least one
boolean to control the slot execution.  

Tony.


> 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




More information about the Qt-interest-old mailing list