Thanks for the reply
I am sorry for not checking the code i wrote before posting it
the code is
int main(argc, argv)
{
std::unique_ptr<QApplication> app(new QApplication(argc, argv));
.
.
.
.
std::unique_ptr<MyMainForm> form(new MyMainForm(NULL));
.
.
.

return app.exec();
}

I also tried to create on the stack but in vain;
int main(argc, argv)
{
QApplication app(argc, argv);
.
.
.
.
MyMainForm form(NULL);
.
.
.

return app.exec();
}
still doesnt work
I think you didnt notice that I told the project was runing well with Qt4.8 and the problem happened only after migration to 5.0.1, ireturned back to work with Qt4.8 and it worked.