CodeBlocks and Qt5.0.2 Installation Problem

Im using windows vista and running a codeblocks compiler as my default c++ compiler. Everything works fine when i run a console based c++ programs, until recently i found out that i could build a GUI in c++, i knew that there are lots of of C++ Gui programs out there like, fltk, mfc, Winapi and so on but i'm interested in learning Qt because i've saw a lot of tutorials out there which would make me want to try and farther my skill but still i'm a beginner. And this is the problem starts. I want to associate CodeBlocks with Qt? So how to do this? Can someone help me what goes first or step by step instructions to compile this code below. Do i need to download any addons or plugins?I've tried downloading Qt5.0.2 which includes library and creator, or this is not the right one to download? When i open my codeblocksFIle->New Project->Qt4 Project i'm stuck in here $(#qt4) how to make it work...


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <QApplication>
#include <QVBoxLayout>
#include <QLabel>

int main(int argc, char *argv[]){
QApplication app(argc, argv);

QWidget window;

QVBoxLayout *layout = new QVBoxLayout(&window);
QLabel *label1 = new QLabel("Hello");
QLabel *label2 = new QLabel("World");

layout->addWidget(label1);
layout->addWidget(label2);

window.show();

return app.exec();
}

Please help... tnks
Topic archived. No new replies allowed.