Page 1 of 1

code auto-completion for Qt library classes

Posted: Tue Jun 22, 2010 10:17 am
by roy
Hi Eran,

I am trying to use CodeLite to develop a Qt based project, but I found CodeLite is not able to auto-complete the function name or parameters for Qt library classes.
I have set the Qt library header file path "/home/roy/qtsdk-2010.02/qt/include/Qt" to "main menu->Settings->Tags Settings->Include Files -> search paths for parser" already, but it doesn't help.

Could you please give me some advise?
Thanks.

Re: code auto-completion for Qt library classes

Posted: Tue Jun 22, 2010 11:35 am
by eranif
roy wrote:I am trying to use CodeLite to develop a Qt based project, but I found CodeLite is not able to auto-complete the function name or parameters for Qt library classes
codelite can auto-complete Qt's classes just fine, its just a matter of settings.
roy wrote:I have set the Qt library header file path "/home/roy/qtsdk-2010.02/qt/include/Qt" to "main menu->Settings->Tags Settings->Include Files -> search paths for parser" already, but it doesn't help.
My guess:

If you are like me, then you include Qt's files like this:

#include <QString>
#include <QByteArray>

etc.

However, codelite's code-completion tries to prepend the search paths to the include statement, so it will try to open the file:
/home/roy/qtsdk-2010.02/qt/include/Qt/QString -> and this file does not exist

You will need to specify the correct paths.

Try adding these paths (assuming they exist):

/home/roy/qtsdk-2010.02/qt/include/QtCore
/home/roy/qtsdk-2010.02/qt/include/QtXml
/home/roy/qtsdk-2010.02/qt/include/QtGui

etc.

re-tag and it will work

Re: code auto-completion for Qt library classes

Posted: Thu Jun 24, 2010 2:46 am
by roy
Yes! it works!
thank you very much for your patient advise and create the great CodeLite for us.