This week we are assigned to create a simple drawing program using C++, there are different libraries that you can use to develop GUI using C++, any way my friend Abolnour (our open source godfather) advised me to use Qt which is an open source library that enables you to write GUI programs in C++.
The installation process is easy, you have to go to this download page, then choose the LGPL/Free and choose your platform (I chose Linux 32 bit because I am trying to avoid my Vista :D). it's safer and better to dowload the whole SDK whic includes and IDE called Qt-Creator that you can use to create your applications.
After you finish downloading the file (275.4 MB in our case), you will use two lines in the terminal to install every thing.
1 - Navigate to the directory where you downloaded the file using cd
cd /media/disk/Downloads
that's for me (the path will be different for you)
2 - use the command
chmod u+x qt-sdk-linux-x86-opensource-2009.04.1.bin
which makes the file executable.
3 - use the command
After really turning the Internet upside down, I found that you have to install an extra package using this command./qt-sdk-linux-x86-opensource-2009.04.1.bin
which will run you an installation wizard that asks you where you want to install the Qt-creator
and the libraries.
After that you can use will find the Qt-Creator in the Applications --> Programming, you can use
this tutorial to learn the Qt.
Any way, you may face the silly error I faced when I tried to build a project
the error iscollect2: ld returned 1 exit status
sudo apt-get install libqt4-dev
By the way, the best thing about Qt that it's platform independent although you write it with C++, there is something else
called GTK that you can use.
that's all enjoy Qt !!