I am creating a Qt Widget based app and I want to be able to add objects to std::list<>(that store objects of some class) at runtime by using button(QPushButton). Is there any way to pass this list by reference so I can store created objects in it?
AFAIK there is no way to use connect(Object1, signal, Object2, slot), because slot can't have any parameters.
If I can't do this the way I explained how can I achieve it?