of course it will not work. I don't see where you start event loop.
try this.
Qt Code:
  1. ...
  2.  
  3. int main(int argc, char **argv)
  4. {
  5. QCoreApplication app(argc, argv);
  6. MyObject mo;
  7. return app.exec();
  8. }
To copy to clipboard, switch view to plain text mode