[Qt-creator] Automatically insert braces

Thorbjørn Lindeijer thorbjorn.lindeijer at nokia.com
Mon May 25 11:50:36 CEST 2009


ext Biao Huang wrote:
> In the preferences of Qt Creator 1.1.0 I have selected the "Auto Insert 
> Braces" option, but, for instance, when I type "for (" or the left brace 
> "{", then the correspond right brace ")" or "}" does not be 
> automatically inserted. The function of automatically inserting braces 
> is very convenient, I think. How could man this issue resolve? 
> Thanks a lot!

This option is not the feature you're looking for. The "Auto Insert 
Braces" option is in the Code Completion section, and that's where it 
applies. So for example, if you complete widget->resize, it will 
automatically insert the round opening bracket '(', since it's a 
function call.

I just realized we should call them brackets and not braces, since 
braces are only { and }, and we never automatically insert those.

In any case, the feature of automatically inserting matching brackets 
(and quotation marks) is one I'd really like to have as well, and would 
certainly be nice to add to a future version of Qt Creator.

Regards,
Bjørn

-- 
Thorbjørn Lindeijer
Software Engineer
Nokia, Qt Software




More information about the Qt-creator-old mailing list