更改Qt Creator代码配色方案为Visual Studio配色方案

更改Qt Creator代码配色方案为Visual Studio配色方案


喜欢Visual Studio配色方案的朋友,可以按照此教程,设置Qt Creator的代码配色方案。

感谢配色文件提供原作者(原文链接)。


配置步骤

  1. 安装Qt,此处省略过程。

  2. 建立XML文件Visual Studio.xml,文件内容如下:

    <?xml version="1.0" encoding="UTF-8"?>
    <style-scheme version="1.0" name="Visual Studio">
      <style name="Text" foreground="#dcdcdc" background="#1e1e1e"/>
      <style name="Link" foreground="#4183c4"/>
      <style name="Selection" foreground="#ffffff" background="#3399ff"/>
      <style name="LineNumber" foreground="#2b91af" background="#1e1e1e"/>
      <style name="SearchResult" background="#555500"/>
      <style name="SearchScope" background="#1e1e1e"/>
      <style name="Parentheses" foreground="#ff5555" background="#333333"/>
      <style name="CurrentLine" background="#707070"/>
      <style name="CurrentLineNumber" foreground="#aaaaaa" bold="true"/>
      <style name="Occurrences" background="#363636"/>
      <style name="Occurrences.Unused" foreground="#3b84b1"/>
      <style name="Occurrences.Rename" foreground="#ffaaaa" background="#553636"/>
      <style name="Number" foreground="#b5ceba"/>
      <style name="String" foreground="#d69d85"/>
      <style name="PrimitiveType" foreground="#3b84b1"/>
      <style name="Type" foreground="#4ec9b0"/>
      <style name="Local"/>
      <style name="Field"/>
      <style name="Static" foreground="#f3f351" italic="true"/>
      <style name="VirtualMethod" italic="true"/>
      <style name="Function" foreground="#bebebe"/>
      <style name="Keyword" foreground="#569cd6"/>
      <style name="Operator" foreground="#aaaaaa"/>
      <style name="Preprocessor" foreground="#bd63c5"/>
      <style name="Label" foreground="#569cd6"/>
      <style name="Comment" foreground="#57a64a"/>
      <style name="Doxygen.Comment" foreground="#57a64a"/>
      <style name="Doxygen.Tag" foreground="#00a0a0"/>
      <style name="VisualWhitespace" foreground="#c0c0c0"/>
      <style name="QmlLocalId" italic="true"/>
      <style name="QmlExternalId" foreground="#aaaaff" italic="true"/>
      <style name="QmlTypeId" foreground="#f3f351"/>
      <style name="QmlRootObjectProperty" italic="true"/>
      <style name="QmlScopeObjectProperty" italic="true"/>
      <style name="QmlExternalObjectProperty" foreground="#aaaaff" italic="true"/>
      <style name="JsScopeVar" foreground="#8888ff" italic="true"/>
      <style name="JsImportVar" foreground="#8888ff" italic="true"/>
      <style name="JsGlobalVar" foreground="#8888ff" italic="true"/>
      <style name="QmlStateName" italic="true"/>
      <style name="Binding" foreground="#ff5555"/>
      <style name="DisabledCode" foreground="#777777" background="#222222"/>
      <style name="AddedLine" foreground="#55ffff"/>
      <style name="RemovedLine" foreground="#ff5555"/>
      <style name="DiffFile" foreground="#57a64a"/>
      <style name="DiffLocation" foreground="#ffff55"/>
      <style name="DiffFileLine" foreground="#000000" background="#d7d700"/>
      <style name="DiffContextLine" foreground="#000000" background="#8aaab6"/>
      <style name="DiffSourceLine" background="#8c2d2d"/>
      <style name="DiffSourceChar" foreground="#000000" background="#c34141"/>
      <style name="DiffDestLine" background="#2d8c2d"/>
      <style name="DiffDestChar" foreground="#000000" background="#41c341"/>
    </style-scheme>
  3. 将XML文件拷贝到如下路径:

    C:\Qt\Qt5.10.1\Tools\QtCreator\share\qtcreator\styles

    路径

  4. 打开Qt Creator,进入设置,并设置如下:

    set

最终效果

last

  • 6
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值