looks like you learn very fast
this is a tricky question.So does that mean it's better to make "new" objects because those can be deleted? Or only reserve smaller objects (like bool and int) for the stack?
in qt any class which is derived from qobject can have children(fox example a QDialog containg Ok,Cancel button as its children). Now when the qdialog is deleted, it also deletes all its children,,, if the children are on stack that will cause crash. So all the QObjects derived classes which will become child of any object in your program should be on heap.
but this is not general rule. many times a local child widget is created on stack(for example a temporary messagebox)
codeslicer (10th July 2009)
Bookmarks