On terça-feira, 19 de fevereiro de 2013 21.47.08, K. Frank wrote:
> Thanks for noting that.
>
> It seems a little odd, though. I could of sworn I tried passing a
> reference:
>
>void my_signal (const POD &data)
>
> and it failed at run time when I tried to pass the reference through a
> queued
Hi Tony!
On Tue, Feb 19, 2013 at 6:13 PM, Tony Rietwyk wrote:
> Hi Frank,
>
>> Sent: Wednesday, 20 February 2013 12:19 AM
>>
>> Hello List!
>>
>> Sometimes I have a simple class, maybe a POD, that I want to pump through
>> a queued signal-slot connection. As I understand it, I need a QObject to
Hi Frank,
> Sent: Wednesday, 20 February 2013 12:19 AM
>
> Hello List!
>
> Sometimes I have a simple class, maybe a POD, that I want to pump through
> a queued signal-slot connection. As I understand it, I need a QObject to
do
> that. So I wrap my class in QObject.
You can pass pointers to t
Op 19-2-2013 14:19, K. Frank schreef:
> Hello List!
>
> Sometimes I have a simple class, maybe a POD, that I want to
> pump through a queued signal-slot connection. As I understand
> it, I need a QObject to do that. So I wrap my class in QObject.
No, you don't. In fact, it is a Bad Idea(TM).
In o
Hello,
IIRC you don't,
You have to Q_DECLARE_METATYPE your POD, qRegisterMetaType it and maybe
(depends on your use case) add the in/out stream operators (only if you need to
load and store in a QVariant).
Hope it helps
On 19 févr. 2013, at 14:19, K. Frank wrote:
> Hello List!
>
> Sometimes
Hello List!
Sometimes I have a simple class, maybe a POD, that I want to
pump through a queued signal-slot connection. As I understand
it, I need a QObject to do that. So I wrap my class in QObject.
What are some good idioms for this? What is the most parsimonious
approach?
Here's one method