Codelite, Qt and autocomplete
-
- CodeLite Curious
- Posts: 2
- Joined: Mon Sep 22, 2008 8:57 pm
- Contact:
Codelite, Qt and autocomplete
I have Qt 4.4.1 and latest version of Codelite. And I want codelite to autocomplete names of members of Qt classes. I have create external tag database for Qt includes, attached this tags and re-tagged the current cpp-file but autocomplete not works. How to force autocomplete to work?
-
- CodeLite Enthusiast
- Posts: 23
- Joined: Wed Aug 20, 2008 10:45 pm
- Contact:
Re: Codelite, Qt and autocomplete
Seconded, I use Qt (learning it) frequently the last couple of days, although it's rather minor, but still it would really help a lot.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Codelite, Qt and autocomplete
Are u on windows / Linux / Mac ? which CL revision?cppki wrote:I have Qt 4.4.1 and latest version of Codelite. And I want codelite to autocomplete names of members of Qt classes. I have create external tag database for Qt includes, attached this tags and re-tagged the current cpp-file but autocomplete not works. How to force autocomplete to work?
Make sure that create tag database from the entire QT directory and not only 'include'
when the wizard starts, select the root directory of QT - on Ubuntu, you should set it
Code: Select all
/usr/include/qt4/
QtXml, QtCore, QtGUi etc.
The tags file should be about 17MB more or less
Eran
Make sure you have read the HOW TO POST thread
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Codelite, Qt and autocomplete
Ok, incase you fail to create the tags database, here is one that can help you:
http://codelite.org/download/qt-tags.zip
Download this file, unzip it and attach it to CodeLite.
TO attach:
- first close the current external tags datagase Tags -> Close external database
- attach: Tags -> Attach external database
From this point you should have QT Code completion available, this database also include code completion for STL (std::string, std::map etc.)
Since the tags were created on my machine, the following will probably wont work:
- go to implementation / declaration to any of QT's symbols (e.g. QString) since the file paths stored in the database are taken from my machine
Eran
http://codelite.org/download/qt-tags.zip
Download this file, unzip it and attach it to CodeLite.
TO attach:
- first close the current external tags datagase Tags -> Close external database
- attach: Tags -> Attach external database
From this point you should have QT Code completion available, this database also include code completion for STL (std::string, std::map etc.)
Since the tags were created on my machine, the following will probably wont work:
- go to implementation / declaration to any of QT's symbols (e.g. QString) since the file paths stored in the database are taken from my machine
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 23
- Joined: Wed Aug 20, 2008 10:45 pm
- Contact:
Re: Codelite, Qt and autocomplete
Woah nice !!! I get code completition
I get aroung 80 MB of tag file, maybe since I choose all the directory to be parsed , anyway I have a question, if I specify common.tags, would it overwrite it or add to it ?
I get aroung 80 MB of tag file, maybe since I choose all the directory to be parsed , anyway I have a question, if I specify common.tags, would it overwrite it or add to it ?
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Codelite, Qt and autocomplete
It will get appended.aaulia wrote:Woah nice !!! I get code completition
I get aroung 80 MB of tag file, maybe since I choose all the directory to be parsed , anyway I have a question, if I specify common.tags, would it overwrite it or add to it ?
This is how I create a tags file for both STL & QT & wxWidgets.
I first created QT, then I ran the wizard again selecting the STL root directory and setting the same database name.
It is also mentioned on the wizard dialog (at the bottom).
EDIT: 80MB is a lot. Try to select what you need, otherwise, you may notice some delay code completion. For me STL + wxWidgets + QT is around 30MB
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 23
- Joined: Wed Aug 20, 2008 10:45 pm
- Contact:
Re: Codelite, Qt and autocomplete
Oh well I already did it, is there a way to remove spesific tags from external tag database ? All I know is how to fix the path, and add to it, but not remove from it. Anyway this make me love CL even more , man so many things to play with.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Codelite, Qt and autocomplete
Well, not officiallyaaulia wrote:is there a way to remove spesific tags from external tag database ?
Since tags database is actually an sqlite database, you can simply use sqlite3 command line tool for this.
(Again, I dont know your OS, so I will assume Linux):
- install sqlite3 exe:
Code: Select all
sudo apt-get install sqlite3
- attach to the codelite tags database:
Code: Select all
sqlite3 <tags-file-name>
-
Code: Select all
delete from tags where file like '/usr/local/include%%'
HTH,
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 23
- Joined: Wed Aug 20, 2008 10:45 pm
- Contact:
Re: Codelite, Qt and autocomplete
Hmm ok I'll try thanks. You've been very responsive .
EDIT:
Ok I got 70 MB for Qt and STL, here is what I do and my path
STL : C:\MinGW\include\c++\3.4.5
Qt : C:\Qt\4.4.2\include & C:\Qt\4.4.2\src
I check everything in there.
EDIT:
Ok I got 70 MB for Qt and STL, here is what I do and my path
STL : C:\MinGW\include\c++\3.4.5
Qt : C:\Qt\4.4.2\include & C:\Qt\4.4.2\src
I check everything in there.
-
- CodeLite Curious
- Posts: 2
- Joined: Mon Sep 22, 2008 8:57 pm
- Contact:
Re: Codelite, Qt and autocomplete
Thanks to all! I just let wizard to parse include and src directories and now it works.