Quote Originally Posted by deekayt View Post
what should I now have in main() function.
You main should look more or less like this:
Qt Code:
  1. #include <QApplication>
  2. #include "imagedialog.h"
  3.  
  4. int main(int argc, char **argv)
  5. {
  6. QApplication app(argc, argv);
  7. ImageDialog dlg;
  8. dlg.show();
  9. return app.exec();
  10. }
To copy to clipboard, switch view to plain text mode 

Quote Originally Posted by deekayt View Post
And for the code given below should I have some other header file.
In general you put class definitions in header files (*.h) and method implementation in implementation files (*.cpp).