Hello everyone!

Thanks for the help. I used almost all of the typs you gave me and now the code is running fine and, of course, it is much more organized.

Here it is:

Qt Code:
  1. int decisao;
  2. bool continuaounao = false;
  3.  
  4. namespace Decisao
  5. {
  6. enum inertiaEnum
  7. {
  8. Positions = 1,
  9. Body = 2,
  10. Context = 3,
  11. Creditos = 4
  12. };
  13. }
  14.  
  15. int main(int argc, char *argv[])
  16. {
  17. QApplication a(argc, argv);
  18.  
  19. NovoMain NM;
  20.  
  21. while (continuaounao == false)
  22. {
  23. decisao = NM.executa();
  24.  
  25. switch (decisao)
  26. {
  27. case Decisao::Positions:
  28. {
  29. SPositions sp;
  30. sp.setWindowTitle("Positions");
  31. sp.showMaximized();
  32. sp.show();
  33. a.exec();
  34. continuaounao = sp.getSaida();
  35. }
  36. break;
  37.  
  38. case Decisao::Body:
  39. {
  40. Body bd;
  41. bd.setWindowTitle("Body knowledge");
  42. bd.showMaximized();
  43. bd.show();
  44. a.exec();
  45. continuaounao = bd.getSaida();
  46. }
  47. break;
  48.  
  49. case Decisao::Context:
  50. {
  51. Context ct;
  52. ct.setWindowTitle("Context and details");
  53. ct.showMaximized();
  54. ct.show();
  55. a.exec();
  56. continuaounao = ct.getSaida();
  57. }
  58. break;
  59.  
  60. case Decisao::Creditos:
  61. {
  62. Credits cd;
  63. cd.setWindowTitle("Credits");
  64. cd.showMaximized();
  65. cd.show();
  66. a.exec();
  67. continuaounao = cd.getSaida();
  68. }
  69. break;
  70.  
  71. default:
  72. return 0;
  73. break;
  74. }
  75. }
  76. return 0;
  77. }
To copy to clipboard, switch view to plain text mode 

Thanks for everyone!


God bless,

Momergil