Code completion is not working in QtCreator?
-
Hi @Mucip
But what is the problem with ClangCodeModel?
That probably depends on your project. For me, often embedded projects fail while Desktop projects work nicely. A missing or unparseable header file is enought to kick Clang out.
So to give a definite answer, someone has to investigate your problem in detail.
Regards
Edit: a collection of similar issues is https://forum.qt.io/topic/100762/qt-creator-clang-code-model-problems-collection
-
Have you tried starting Creator with temporary clean settings? I.e. parameter
-tcs
since Creator 4.9. -
@aha_1980
it does not work when it is first installed.
Now I have started QtCreator with the -tcs parameter.
New Project -> Widget App -> next, next, next...
Auto complete and outline not working.QtCreator 4.10.0
Operating System: Arch Linux
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.62.0
Qt Version: 5.13.1
Kernel Version: 5.3.4-arch1-1-ARCH
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-2410M CPU @ 2.30GHz
Memory: 9,7 GiB -
- how did you install Creator?
- can you compile this program successfully with
-tcs
?
Regards
-
I meant if you can compile the "New Project -> Widget App" from the Creator started with
-tcs
.I don't compile QtCreator. I'm using system package managers. pacman, octopi, apt, muon, synaptic etc. Arch or debian.
Can you try the official installer from Qt? https://download.qt.io/official_releases/online_installers/
Creator needs a special and patches version of Clang, and the distros usually don't patch Clang. So would not be surprised if that indeed would not work.
Regards
-
@A-A-SEZEN Have you already rised that issue here in the forum or created a bugreport?
Otherwise it is unlikely to be resolved.
-
@aha_1980
In short, no.
I searched and maybe found the solution you specified in the forum.
I thought it wasn't on other linux users. Bug report is exhausting me.
The source of the error is not clear either. QtCreator or plugin.
It was easy to find and implement the solution.
Regards -
@aha_1980 said in Code completion is not working in QtCreator?:
Creator needs a special and patches version of Clang, and the distros usually don't patch Clang. So would not be surprised if that indeed would not work.
Thank you for this information. I have learned.
Regards -
@A-A-SEZEN said in Code completion is not working in QtCreator?:
It was easy to find and implement the solution.
@A-A-SEZEN you mentioned you have found a solution. Could you state it here? Because I'm having the same problem.
-
-
@aha_1980 said in Code completion is not working in QtCreator?:
Have you tried starting Creator with temporary clean settings? I.e. parameter -tcs since Creator 4.9.
I'm facing the same problem. Could you please explain how I could use
-tcs
? When and where should I pass it? -
@Mehrshad said in Code completion is not working in QtCreator?:
. Could you please explain how I could use
-tcs
? When and where should I pass it?@A-A-SEZEN said in Code completion is not working in QtCreator?:
Now I have started QtCreator with the -tcs parameter.
So presumably as a command line argument after the path to Qt Creator
.exe
. -
Thanks @JonB. But there's still a problem.
As I am on a Mac, I cded to
~/Qt/'Qt Creator'/Contents/MacOS'
and ran./'Qt Creator' -tcs
. Qt Creator opened up, with auto-completion and rest working, but when I closed the app an opened it again, no information was preserved, e.g. font size, Use FakeVim, etc.