PDA

View Full Version : Signal and Slots with Large Parameters



metdos
29th March 2010, 10:51
Is it a good idea to pass big parameters with signal and slot mechanism such as XML files, structs and classes? Are there any restriction and what can be the alternatives?

spud
29th March 2010, 11:10
The argument is going to be copied, so you have to consider that cost. Consider using one of Qt's implicitely shared classes (http://doc.trolltech.com/latest/shared.html), then you will have no problem at all.

axeljaeger
3rd April 2010, 16:48
I think it is only copied when using a Queued connection. Spud: Do you have a reference for always copying?