HI all,

I had an application which can be launch in GUI mode and in Console Mode :

Qt Code:
  1. #include <QtGui/QApplication>
  2. #include "flashloader.h"
  3.  
  4.  
  5. #include "QMap"
  6. #include <iostream>
  7. #include "QMessageBox"
  8.  
  9. int main(int argc, char *argv[])
  10. {
  11. QApplication a(argc, argv);
  12.  
  13. QMessageBox msgBox;
  14. msgBox.setText("number of argument : " + QString::number(argc));
  15. msgBox.exec();
  16.  
  17. QStringList List_args = QApplication::arguments();
  18.  
  19. int iCount;
  20. iCount = argc;
  21. QMap<QString, QString> map_args;
  22.  
  23. FlashLoader w;
  24.  
  25. if (argc == 1)
  26. {
  27. w.show();
  28. return a.exec();
  29. }
  30. else
  31. {
  32. int i;
  33. for (i=1; i < argc ; i++)
  34. {
  35. std::cout << "MainAppCore argv[" << i << "] : " << List_args.at(i).toStdString() << "\n";
  36. }
  37. return 0;
  38. }
  39. }
To copy to clipboard, switch view to plain text mode 

In my pro files, I have
Qt Code:
  1. CONFIG += console
To copy to clipboard, switch view to plain text mode 
(necessary to have console working)

In debug mode all is working well. If I launch the application with no argument I have only the GUI present. If I launch the application with argument I have only the console present. The problem is when I launch the application in release mode ,the console always appears. How can I fix that?

Thanks