Quote Originally Posted by GreyGeek
That I knew, I was just supposing that if they were created by "new" would it matter if they were deleted using the delete operator because they were going out of scope anyway if, as you say, the OS will always get the memory back.
Ok, then no, it wouldn't matter. As a matter of good practice, I would delete them anyway though.

Because it inherited from QDialog?
class dlgLogin : public QDialog

An ancestor isn't a parent?
(I told you I was new to C++)
No, QDialog is its baseclass, not its parent. The parent is the object you pass as the QWidget* parameter (which can be NULL). 'Baseclass', 'superclass' or 'inherited class' are names for the same C++ OO constructs. 'Parent' (in this context) is a Qt construct and refers to ownership, not inheritance. Reading the comprehensive documentation of QObject will explain it more.

So, using "new" as shown below means that "ui.gridMultiProp" is a parent to *model ??
Qt Code:
  1. QSqlQueryModel *model = new QSqlQueryModel(ui.gridMultiProp);
To copy to clipboard, switch view to plain text mode 
That's correct.

Pardon the dumb questions but you'll dealing with someone who has read perhaps too much and it's all jumbled up inside?
It's amazing that I can, using QT, write the app I did and that it works.
It is amazing. Did you check your prog for memory leaks
Actually, it's a very bad idea to use Qt to learn C++ (not suggesting that you did it this way). It is much better to learn C++ and get confident with it (warts and all), then start using Qt to see how much easier it makes your life! The QObject parent-child model along with the references counted non-QObjects really help cut down on the amount of memory management that you have to worry about (but you still must be wary).