hi,
since a year or so I am learning to use c++ and qt. I have writen a small app and since Qt is quite easy to use and well documented it works all fine. But i guess their are still alot of things i can improve. I have a question regarding memory leaks and the cration of objects. I did not take very much care of that so far (maybe a silly question):
As far as I understand childobjects are destroyed when the parent is destroyed. What does that mean when I use e.g. a QSqlTableModel or a QTableView etc.. Do I have to create them allways like ... = new QSqlTableModel(this) instead of ... = new QSqlTableModel ?
Is the model not destroyed after the mainwindow is closed when i create it without assigning it to a parent (the QMainWindow) ?