Unauthorized inclusion of Qt in Eclipse

Eclipse cannot find Qt. Similarly, it cannot provide automatic full functionality for Qt classes.

I did Project -> Properties -> Paths and Symbols -> Includes -> Add to Qt /usr/include/qt4/ Directories in /usr/include/qt4/ . This made Eclipse recognize certain specific classes, such as QString ; however, autocompletion is not performed.

I scour the net to no avail. How to make an Eclipse index Qt in my project?

Edit: 12/20/12

I solved my problem. It seems that order includes matter. I put

 'usr/include/qt4' 'usr/include/qt4/Qt' 'usr/include/qt4/QtCore' 'usr/include/qt4/QtGui' 

in Project Properties -> C++ General -> Paths & Symbols . I restored and autocomplete worked.

+4
source share
1 answer

You need to add several inclusion directories listed, for example. command

  pkg-config --cflags QtGui QtXml QtSvg QtDBus 

(and other Qt packages).

+1
source

All Articles