Ok, then no, it wouldn't matter. As a matter of good practice, I would delete them anyway though.Originally Posted by GreyGeek
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.Because it inherited from QDialog?
class dlgLogin : public QDialog
An ancestor isn't a parent?
(I told you I was new to C++)
That's correct.So, using "new" as shown below means that "ui.gridMultiProp" is a parent to *model ??
Qt Code:
To copy to clipboard, switch view to plain text mode
It is amazing. Did you check your prog for memory leaksPardon 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.
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).
Bookmarks