If you are inheriting the class, the functions will be available to you, isnt it ?
Why do you need to call them separately ?
And signal/slot arent slow.... are you facing problems with it right now ?
If you are inheriting the class, the functions will be available to you, isnt it ?
Why do you need to call them separately ?
And signal/slot arent slow.... are you facing problems with it right now ?
Hi,
Thanks, but I never told that the classes are widgets and never told that the child classes are dervied from the first class.
The class A contains a QList<B*>. So class A contains a list of class B object pointers.
When a object B is created and inserted to the list I make some connections that when the object of the class B does something it emits a signal to class A. Is more clear now?
So, is a good idea to pass a parent pointer to the child classes to access direcly to the class A methods or is better to use SIGNAL SLOT mechanism?
Thanks,
Òscar Llarch i Galán
I would use "pass parent pointer to a child", because as was told above, you will use direct calls. but if you don't know anything about parent, i.e. you can't say what kind of objects can be parent then it would be better to implement connection interface between classes using SIGNALS and SLOTS.
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
Hi,
Thanks spirit, it was what I suspect.
Òscar Llarch i Galán
Bookmarks