Wiseguy: it doesn't crash. In my main:
Qt Code:
  1. CardManager cardManager;
  2.  
  3. if(cardManager.isLoaded())
  4. {
  5. cardManager.mainWindow.show();
  6. app.exec();
  7. }
To copy to clipboard, switch view to plain text mode 

when I have commented those 4 lines in header file, when debugger hits app.exec(), mainWindow of cardManager is shown. When I uncomment one of those commented lines, when it hits app.exec() nothing happens, no mainWindow is shown the application only get stuck in exec() loop and I must close it usind stop button.

amleto: Yes, what I'm posting is not fault, but as I said there are 4 commented lines in that code and when I uncoment one of them (define one new QMenu or QAction variable) my app stops working. I dont have used them anywhere else in my code except this definition.