Hi,
i do not fully understand the concept of pointers. Maybe someone could help me to understand.
I have a printing function that is called several times. The data within the models that are shown in the centralWidgets tables are printed. Therefore I am doing a cast to get the proxymodels:
Qt Code:
void MyApp::printDialog() { SortFilterProxyModel *tmDetail = qobject_cast<SortFilterProxyModel *>(cw->detailTable()->model()); .... }To copy to clipboard, switch view to plain text mode
I am processing the data and insert them into the printingModel. My question is: What happens to the pointers *tmMain and *tmDetail after they run out of scope? Are they deleted because they are local variables? Or do I need to set them to =0? Do I get a copy of the object from the cast or a pointer to the object ...? Sorry, many questions. Thx in advance.
Bookmarks