Hi all,

I am new to this forum and it looks like a great resource for Qt information. I am used to Delphi so it's Qt as well as C++ I'll have to learn but it sure looks good what Trolltech did!

Now to the question.

I am not sure on the memory stuff. What is automagically destroyed and what is not?

Here is a piece of code of my test project:

Qt Code:
  1. VerticalDialog::VerticalDialog(QWidget *parent)
  2. : QDialog(parent)
  3. {
  4. VerticalItemModel *vertical = new VerticalItemModel;
  5. lytMain = new QGridLayout(this);
  6.  
  7. lytSurface = new QHBoxLayout();
  8. lytOkCancel = new QHBoxLayout();
  9. lytOpenSave = new QHBoxLayout();
  10.  
  11. //table
  12. tblVertical = new QTableView();
  13. tblVertical->setAlternatingRowColors(true);
  14. tblVertical->setModel(vertical);
  15. ...
To copy to clipboard, switch view to plain text mode 

Do I need to free the memory myself (for example for the QHBoxLayout classes) or does Qt take care of this? I do not assign a parent to them so there is nobody `to take care of them'??

Thanks in advance,
Rob