dimanche 12 avril 2020

passing data between sub class members

I have the following classes:

class WrapperClass
{
SubClass subA;
SubClass subB;
SubClass subC;
}

I would like to transfer data between the three subclasses subA,subB, and subC, and was wondering what is the best way to do it. I'm using Qt, and started using signals and slots, but reached a dead end since I cannot receive data with it. I thought of having the sub classes as Singletons, but I might need to instantiate WrapperClass more than once.

What other methods I can take?

Aucun commentaire:

Enregistrer un commentaire