更改QtCreator中的大括号编码样式

更改QtCreator中的大括号编码样式,qt,coding-style,qt-creator,braces,Qt,Coding Style,Qt Creator,Braces,我想更改Qt Creator 2.7.1中的大括号编码样式。目前是: void bar(int i) { static int counter = 0; counter += i; } 但我想把它改成: void bar(int i) { static int counter = 0; counter += i; } 如果我去代码>选项> > C++ >编辑->括号,我只能更改括号的缩进。在预览文本字段中手动更改大括号的位置不会产生任何效果。我已经在Qt Cr

我想更改Qt Creator 2.7.1中的大括号编码样式。目前是:

void bar(int i)
{
    static int counter = 0;
    counter += i;
}
但我想把它改成:

void bar(int i) {
    static int counter = 0;
    counter += i;
}

如果我去代码>选项> > C++ >编辑->括号<代码>,我只能更改括号的缩进。在预览文本字段中手动更改大括号的位置不会产生任何效果。

我已经在Qt Creator bug tracker上打开了公共建议--

我想,更多地关注bug跟踪器会更有帮助


希望,这项功能将被添加到Qt Creator 3.0中。

我刚刚找到了一个插件。称为Qt的艺术风格插件

安装

  • 下载为您的qtcreator版本指定的插件(对于2.7.1,下载2.7.0版本,但需要在后面的步骤中进行修改)
  • 打开包,编辑文件
    ArtisticStyle.pluginspec
  • 将依赖项版本描述(在第二步文件中)编辑到您机器上已安装的版本中。 在终端(Ctrl+Alt+T)上,发送
    qtcreator-version
    以获取Qt依赖项版本的信息
  • 例如:

    这是2.7.0的一个版本说明

    
    
    至本条(适用于2.7.1)

    
    
  • 按照网站的正常步骤安装插件

  • 如果已安装,请通过首选项->艺术…->样式更改样式

  • 添加您自己的样式并添加
    --style=java

  • 给你


  • 此功能不存在。非常欢迎您将其添加到Qt Creator。源代码是可用的,下载它,按照Qt Creator下的方式构建,然后修补:)不,不幸的是它不在Qt Creator 3中。0@barjak2014年合并,您需要在插件菜单中启用美化器。
    <dependency name="Core" version="2.7.0"/>
    <dependency name="TextEditor" version="2.7.0"/>
    <dependency name="ProjectExplorer" version="2.7.0"/>
    <dependency name="Qt4ProjectManager" version="2.7.0"/>
    
    <dependency name="Core" version="2.7.1"/>
    <dependency name="TextEditor" version="2.7.1"/>
    <dependency name="ProjectExplorer" version="2.7.1"/>
    <dependency name="Qt4ProjectManager" version="2.7.1"/>