View Single Post
Posts: 124 | Thanked: 10 times | Joined on Jan 2007 @ Italy
#15
Originally Posted by Venemo View Post
Yes, exactly.
BTW, Qt's collections give back const references to items stored within them.

You can pass around a QList<Service>* to achieve that.
Note that QList<Sevice*> is NOT QList<Service>* !!

(BTW, I edited my previous post to make it more clear how C++ works.)
yes thanks now is more clear

gri said to not use list in heap, so no QList<Service>* or not!?


if i use it like this(not real code):

main class:
QList<Service> * services;
EditService edit(services);

EditService class:
Service service = services.at(0);
service.changeSomething();


service in QList has not be really changed...am i right!? so the only solution is user a list of pointer