[Qt-creator] Overzealous autocomplete

Eike Ziller Eike.Ziller at qt.io
Thu Jan 24 09:10:55 CET 2019



> On 23. Jan 2019, at 20:33, Jason H <jhihn at gmx.com> wrote:
> 
> Camera {
>    id: camera[enter]
> 
> becomes 
> Camera {
>    id: cameraStateChanged()
> 
> 
> 
> This is very clearly wrong. Since when did enter start being autocomplete key? So I did some digging... Autocomplete was set to "always" with a timeout of 400ms. It seems the max is 500ms, which is waaaay not enough time. 
> I also don't know how "when triggered" or "manually" works. But in my version of autocomplete, [tab] is what I'm used to. 
> 
> 1. How do I "trigger" autocomplete, what is "manual" and what is the difference?

I think “when triggered” includes automatic completion popup when certain characters are typed in the right context, like “.” after a variable name in case of C++,
while “Manually” only pops up completion when pressing the shortcut.

> 2. Why is the timeout limited to 500ms? I'd like at least a full second.

Looks like the configuration was added in 2014 after complains that the delay is too long. I don’t see a reason why to disallow longer timeouts too.
https://codereview.qt-project.org/250787

> 3. Is there anyway to use [tab] to complete?

Well, you can set the shortcut for “Trigger completion” in Options > Environment > Keyboard.
But since completion is offered everywhere, you’ll no longer be able to indent with tab, which is probably not what you want.

Br, Eike

-- 
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
eike.ziller at qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B



More information about the Qt-creator mailing list