[Qt-interest] [MVC] Can signals connect / disconnect dynamically to reduce overhead on GUI thread?

Pritam pritam_ghanghas at infosys.com
Tue Nov 29 06:31:33 CET 2011


On Tuesday 29 November 2011 10:35 AM, Ed Sutton wrote:
> I am seeking design advice.
>
> My GUI is similar to the Windows File or Nautilus file explorer with a split windows interface; the left-pane selects the item to browse and the right-pane displays views of static and dynamic data.  There could be hundreds of network devices in the left-pane tree view.  My concern is the overhead of all these signal callbacks will overwhelm the GUI performance if connected to all of them.  Can signals be connected to and disconnected dynamically to reduce the callback overhead on the GUI thread?
yes, if you have a lots of slots connected to a signal that is emitted 
often, it will be better to keep minimum no of them connected. I dont 
think just keeping slot connected will be of much of a overhead unless 
the signal is emitted.
>
> Single Item Use Case:
>
> 1 - User selects item in left-pane
> 2 - User selects temperature graph tab in right pane
> 3 - GUI connects to appropriate signals
> 4 - Slots handle real-time chart updates
> 5 - User selects new item, GUI disconnects slots
>
> Group Items Use Case:
>
> 1 - User selects the parent of a group of items in left-pane similar to a file folder
> 2 - User selects temperature list view in right pane
> 3 - GUI connects to appropriate signals
> 4 - Slots handle real-time updates of temperature in list view
> 5 - User selects new item, GUI disconnects slots
>
> I am thinking I should use the Model View Controller (MVC) pattern.  I am just not sure if the Qt disconnect is meant to be used this way?
MVC looks like a good choice for your use case.
> Thanks in advance for any direction,
>
> -Ed
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>


-- 
Regards,
Pritam


**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are not 
to copy, disclose, or distribute this e-mail or its contents to any other person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any damage 
you may sustain as a result of any virus in this e-mail. You should carry out your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***



More information about the Qt-interest-old mailing list