Running Qt Creator 2.7.0 Based on Qt 5.0.2 (32 bit).


1. Start Qt, File --> New File or Project --> Non-Qt Project --> Plain C++ Project --> Choose

Name: t1
Create in: E:\test\
Use as default project location: left unchecked

Hit Next.

2. Kit Selection

(checked) Desktop Qt 5.0.2 MinGw 32bit
(checked) E:\test\build-t1-Desktop_Qt_5_0_2_MinGW_32bit-Debug
(checked) E:\test\build-t1-Desktop_Qt_5_0_2_MinGW_32bit-Release

Hit Next.

3. Project Management

Add to version control: <None>

Hit Finish


4. Select "Projects" button --> Run tab --> Uncheck "Run in terminal"

5. Edit button. Update main.cpp to the following:

Qt Code:
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int i;
  8.  
  9. for (i=1; i<52; i++)
  10. {
  11. cout << i << endl;
  12. }
  13. cout << endl;
  14. return 0;
  15. }
To copy to clipboard, switch view to plain text mode 

t1.pro file is left to default values:

Qt Code:
  1. TEMPLATE = app
  2. CONFIG += console
  3. CONFIG -= app_bundle
  4. CONFIG -= qt
  5.  
  6. SOURCES += main.cpp
To copy to clipboard, switch view to plain text mode 

6. Hit RUN (Ctrl+R)

Results (Application Output Pane):

Qt Code:
  1. Starting E:\test\build-t1-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\t1...
  2. 1
  3. 2
  4. 3
  5. 4
  6. 5
  7. 6
  8. 7
  9. 8
  10. 9
  11. 10
  12. 11
  13. 12
  14. 13
  15. 14
  16. 15
  17. 16
  18. 17
  19. 18
  20. 19
  21. 20
  22. 21
  23. 22
  24. 23
  25. 24
  26. 25
  27. 26
  28. 27
  29. 28
  30. 29
  31. 30
  32. 31
  33. 32
  34. E:\test\build-t1-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\t1 exited with code 0
To copy to clipboard, switch view to plain text mode 

Hit RUN again (Ctrl+r)

Results (Application Output Pane):

Qt Code:
  1. Starting E:\test\build-t1-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\t1...
  2. 1
  3. E:\test\build-t1-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\t1 exited with code 0
To copy to clipboard, switch view to plain text mode 

Hit DEBUG (F5)

Results (Application Output Pane):

Qt Code:
  1. Debugging starts
  2. 1
  3. 2
  4. 3
  5. 4
  6. 5
  7. 6
  8. 7
  9. 8
  10. 9
  11. 10
  12. 11
  13. 12
  14. 13
  15. 14
  16. 15
  17. 16
  18. 17
  19. 18
  20. 19
  21. 20
  22. 21
  23. 22
  24. 23
  25. 24
  26. 25
  27. 26
  28. 27
  29. 28
  30. 29
  31. 30
  32. 31
  33. 32
  34. 33
  35. 34
  36. 35
  37. 36
  38. 37
  39. 38
  40. 39
  41. 40
  42. 41
  43. 42
  44. 43
  45. 44
  46. 45
  47. 46
  48. 47
  49. 48
  50. 49
  51. 50
  52. 51
  53.  
  54. Debugging has finished
To copy to clipboard, switch view to plain text mode 

What the heck is going on here? Every time I run this with "RUN Ctrl+R" I get different results, but I get the expected (and reliable) results in DEBUG (F5)?