can anyone tell me why this simple qt application does not quit
int main(int argc, char* argv[])
{
QApplication app(argc,argv);
QWidget* w = new QWidget(nullptr);
w->show();
w->close();
app.exec();
return 0;
}
I've tried to show all top level widgets with this loop
for (auto t : QApplication::topLevelWidgets())
{
t->show();
}
and the widget not destroyed after close,
even adding
w->setAttribute(Qt::WA_QuitOnClose);
does not help.
I'm using visual studio 2013 and qt with version 5.4