qt how to add new library

Projects  > right click , 1>>  ADD library ,

pro .file    adding libs,

 INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/lib/x86_64-linux-gnu -I/usr/lib/x86_64-linux-gnu -I/usr/lib/x86_64-linux-gnu -I/usr/share/qt4/mkspecs/linux-g++ -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I. -I../Kutuphane_icin_method_test_projesi -I.
#INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I. -I../Kutuphane_icin_method_test_projesi -I.

#LINK = g++
#LFLAGS = -Wl,-O1
#LIBS = $(SUBLIBS) -L/usr/lib/x86_64-linux-gnu -lQtCore -lpthread -lcurl

LINK = g++
LFLAGS = -Wl,-O1
LIBS = $(SUBLIBS) -L/home/sus/Documents/VS2010/C_Projects/Kutuphane_icin_method_test_projesi/../../../../../../usr/lib/x86_64-linux-gnu/ -lQtCore -lQtGui -lQtDesignerComponents -L/usr/lib/x86_64-linux-gnu -lQtCore -lpthread -lcurl

Code::Blocks Settings for Qt Development , Linker, Search Directories

Qt is a cross-platform object oriented C++ framework for application development. KDE is written using Qt. And not surprisingly, KDE comes with native support for building Qt based applications. In KDE, KDevelop is the default IDE under Linux for creating Qt based applications. For smaller projects however, it seems that the feature richness of KDevelop is almost an overkill.

I personally like simplicity of Code::Blocks when writing small programs. Even though Code::Blocks does come with Qt support, you will have to tell it where Qt is installed before you can compile your code correctly. Like any other C++ environment, the two things you must provide are the include path and the linker path.

Install Qt4, please follow the instructions here. Here are the build options you need to add with the default Qt4 install:



As a bare minimum, you will need to set the libQtGui and libQtCore libraries paths. Note thatUbuntu 8.04 comes with Qt3 installed, when you specify the libraries you need to make sure you specify the ones with the correct version. In my example, the required Qt4 libraries are /usr/lib/libQtGui.so.4 and /usr/lib/libQtCore.so.4. You also need to specify where the include files can be found. For typical applications, /ur/incude/qt4 and /usr/include/qt4/QtGui are the paths you will need. If you want contextual help to be available, you will have to provide the search paths for the include files under “C/C++ parser options” tab in Project/targets options settings.

qt paint class