Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Includes are under /usr/include/qt5. Getting a Qt application to compile and link depends on how Code::Blocks sets up a project and which build systems it supports (qmake, CMake, plain Makefile, others?). You should read Code::Blocks documentation. In Fedora there are some packages with Qt example code which use qmake: qt5-qtbase-examples is one of them. Install it and copy the code in a directory under $HOME. Try to build some of them from the command line first, you might find that you must install other packages as well.

$ mkdir src
$ cp -r /usr/lib64/qt5/gui ~/src
$ cd src/gui
$ qmake-qt5
$ make
$ cd analogclock
$ ./analogclock

Then you can try opening ~/src/gui/gui.pro in Code::Blocks or something similar.

Includes are under /usr/include/qt5. Getting a Qt application to compile and link depends on how Code::Blocks sets up a project and which build systems it supports (qmake, CMake, plain Makefile, others?). You should read Code::Blocks documentation. In Fedora there are some packages with Qt example code which use qmake: qt5-qtbase-examples is one of them. Install it and copy the code in a directory under $HOME. Try to build some of them from the command line first, you might find that you must install other packages as well.

$ mkdir src
$ cp -r /usr/lib64/qt5/gui /usr/lib64/qt5/examples/gui ~/src
$ cd src/gui
$ qmake-qt5
$ make
$ cd analogclock
$ ./analogclock

Then you can try opening ~/src/gui/gui.pro in Code::Blocks or something similar.

Includes are under /usr/include/qt5. Getting a Qt application to compile and link depends on how Code::Blocks sets up a project and which build systems it supports (qmake, CMake, plain Makefile, others?). You should read Code::Blocks documentation. In Fedora there are some packages with Qt example code which use qmake: qt5-qtbase-examples is one of them. Install it and copy the code in a directory under $HOME. Try to build some of them from the command line first, you might find that you must install other packages as well.

$ mkdir src
$ cp -r /usr/lib64/qt5/examples/gui ~/src
src
$ cd src/gui
$ qmake-qt5
$ make
$ cd analogclock
$ ./analogclock

Then you can try opening ~/src/gui/gui.pro in Code::Blocks or something similar.

Includes are under /usr/include/qt5. Getting a Qt application to compile and link depends on how Code::Blocks sets up a project and which build systems it supports (qmake, CMake, plain Makefile, others?). You should read Code::Blocks documentation. In Fedora there are some packages with Qt example code which use qmake: qt5-qtbase-examples is one of them. Install it and copy the code in a directory under $HOME. Try to build some of them the examples from the command line first, you might find that you must install other packages as well.

$ mkdir src
$ cp -r /usr/lib64/qt5/examples/gui src
$ cd src/gui
$ qmake-qt5
$ make
$ cd analogclock
$ ./analogclock

Then you can try opening ~/src/gui/gui.pro in Code::Blocks or something similar.