Everything seems OK with your code.
Also take a look at: http://www.qtcentre.org/forum/f-qt-p...ion--5956.html
Generally you don't need to delete widgets, only in special cases when you allocate temporary widgets without a parent on the heap.
Also you might allocate QObject's on the heap, like a QList, QThread,ect. These are better to explicitly be deleted when finished using.
About setIcon: you can only pass a reference to this function, so if you have something like this:
You must delete the icon, since the for which you set it owns a copy of your icon.Qt Code:
setIcon(*icon); ... delete icon;To copy to clipboard, switch view to plain text mode
Regards
Regards
Bookmarks