I changed the code as follows:

Qt Code:
  1. MainDialog dialog( 0, Qt::WindowMaximizeButtonHint | Qt::WindowMinimizeButtonHint );
  2. dialog.show();
  3.  
  4. return app.exec();
To copy to clipboard, switch view to plain text mode 

But I still get the hang on Linux. Looking at the output from GDB, it's still the same as in my initial post.