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:
#include <iostream>
using namespace std;
int main()
{
int i;
for (i=1; i<52; i++)
{
cout << i << endl;
}
cout << endl;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int i;
for (i=1; i<52; i++)
{
cout << i << endl;
}
cout << endl;
return 0;
}
To copy to clipboard, switch view to plain text mode
t1.pro file is left to default values:
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += main.cpp
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += main.cpp
To copy to clipboard, switch view to plain text mode
6. Hit RUN (Ctrl+R)
Results (Application Output Pane):
Starting E:\test\build-t1-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\t1...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
E:\test\build-t1-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\t1 exited with code 0
Starting E:\test\build-t1-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\t1...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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):
Starting E:\test\build-t1-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\t1...
1
E:\test\build-t1-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\t1 exited with code 0
Starting E:\test\build-t1-Desktop_Qt_5_0_2_MinGW_32bit-Debug\debug\t1...
1
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):
Debugging starts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Debugging has finished
Debugging starts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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)?
Bookmarks