int main( int argc, char *argv[] ){ QApplication AppInstance( argc, argv ); QList<QPushButton*> qPButtonList; ... AppInstance.exec(); foreach( QPushButton* pButton, qPButtonList ) // Безопасен ли и вообще правилен ли такой код? delete pButton; return 0;}
C++ (Qt)qDeleteAll (qPButtonList);qPButtonList.clear ();