install
apt install eclipse-cdt eclipse-cdt-qt libqt4-dev
create new C++ Project
(e.g. Hello World C++ Project)
File->New->C++ Project
edit Project settings and add the following includes and libraries
Project->Properties->C/C++ Build->Settings->GCC C++ Compiler->Includes
/usr/include/qt4 /usr/include/qt4/Qt /usr/include/qt4/QtCore /usr/include/qt4/QtGui
Project->Properties->C/C++ Build->Settings->GCC C++ Linker->Libraries
QtCore QtGui
now you can compile and run the following code:
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[]) {
QApplication QtApp(argc, argv);
QLabel QtLabel;
QtLabel.setText("!!!Hello World!!!");
QtLabel.show();
QtApp.exec();
}
compile:
Project->Build Project
Debug:
Run->Debug as->Local C/C++Application

