Qt Creator仿Visual Studio黑色主题

转自本人博客:Qt Creator仿Visual Studio黑色主题

1.演示

配置文件和步骤在后面,先看成品,分别是QWidget和QML的代码编写界面:

2. 主题配置文件

下载链接:QtCreator _theme_VS_dark.xml

也可以自己新建一个xml文件,然后把内容复制进去,内容放在文件末尾附录了。

3. Qt Creator配置步骤

  1. 进入配置首选项

  2. 文本编辑器 的主题处导入 我们的xml文件 QtCreator _theme_VS_dark.xml,个人建议把字体 设置为Consolas,很好用的。

附录

QtCreator _theme_VS_dark.xml

xml 复制代码
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="vs2019(dark)">
  <style name="Text" foreground="#dcdcdc" background="#2a2a2a"/>
  <style name="Link" foreground="#4183c4"/>
  <style name="Selection" foreground="#ffffff" background="#297acc"/>
  <style name="LineNumber" foreground="#2b91af"/>
  <style name="SearchResult" background="#555500"/>
  <style name="SearchResultAlt1" foreground="#000033" background="#b6ccff"/>
  <style name="SearchResultAlt2" foreground="#330000" background="#ffb6cc"/>
  <style name="SearchResultContainingFunction"/>
  <style name="SearchScope" background="#1e1e1e"/>
  <style name="Parentheses" foreground="#dadada" background="#333333"/>
  <style name="ParenthesesMismatch" background="#ff00ff"/>
  <style name="AutoComplete" foreground="#000080" background="#c0c0ff"/>
  <style name="CurrentLine" background="#a3a3a3"/>
  <style name="CurrentLineNumber" foreground="#ffffff" bold="true"/>
  <style name="Occurrences" background="#ffffff"/>
  <style name="Occurrences.Unused" foreground="#3b84b1"/>
  <style name="Occurrences.Rename" foreground="#ffaaaa"/>
  <style name="Number" foreground="#b5cea8"/>
  <style name="String" foreground="#ffd68f"/>
  <style name="Type" foreground="#4ec9b0"/>
  <style name="Concept" foreground="#4ec9b0"/>
  <style name="Namespace" foreground="#4ec9b0"/>
  <style name="Local" foreground="#9cdcfe"/>
  <style name="Parameter" foreground="#b3adb2"/>
  <style name="Global" foreground="#559cd6"/>
  <style name="Field" foreground="#559cd6"/>
  <style name="Static" foreground="#dcdcaa" italic="true"/>
  <style name="VirtualMethod" foreground="#dcdcaa" italic="true"/>
  <style name="Function" foreground="#dcdcaa"/>
  <style name="Keyword" foreground="#d8a0df"/>
  <style name="PrimitiveType" foreground="#559cd6"/>
  <style name="Operator" foreground="#aaaaaa"/>
  <style name="Overloaded Operator"/>
  <style name="Punctuation"/>
  <style name="Preprocessor" foreground="#beb7ff"/>
  <style name="Macro" foreground="#dcdcaa"/>
  <style name="Label" foreground="#2daae3"/>
  <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="#9cdcfe"/>
  <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 name="LogChangeLine" foreground="#c00000"/>
  <style name="LogAuthorName" foreground="#007af4"/>
  <style name="LogCommitDate" foreground="#006600"/>
  <style name="LogCommitHash" foreground="#ff0000"/>
  <style name="LogCommitSubject"/>
  <style name="LogDecoration" foreground="#ff00ff"/>
  <style name="Warning" underlineColor="#ffbe00" underlineStyle="SingleUnderline"/>
  <style name="WarningContext" underlineColor="#ffbe00" underlineStyle="DotLine"/>
  <style name="Error" underlineColor="#ff0000" underlineStyle="SingleUnderline"/>
  <style name="ErrorContext" underlineColor="#ff0000" underlineStyle="DotLine"/>
  <style name="Declaration" bold="true"/>
  <style name="FunctionDefinition"/>
  <style name="OutputArgument" italic="true"/>
  <style name="StaticMember"/>
  <style name="CocoCodeAdded"/>
  <style name="CocoPartiallyCovered" foreground="#808000"/>
  <style name="CocoNotCovered" foreground="#ff0000"/>
  <style name="CocoFullyCovered" foreground="#00ff00"/>
  <style name="CocoManuallyValidated" foreground="#0000ff"/>
  <style name="CocoDeadCode" foreground="#ff00ff"/>
  <style name="CocoExecutionCountTooLow" foreground="#ff0000"/>
  <style name="CocoNotCoveredInfo" foreground="#ff0000"/>
  <style name="CocoCoveredInfo" foreground="#00ff00"/>
  <style name="CocoManuallyValidatedInfo" foreground="#0000ff"/>
</style-scheme>
相关推荐
眠りたいです33 分钟前
基于脚手架微服务的视频点播系统-播放控制部分
c++·qt·ui·微服务·云原生·架构·播放器
bikong75 小时前
一种高效绘制余晖波形的方法Qt/C++
数据库·c++·qt
追烽少年x7 小时前
QProxyStyle类中drawControl和drawComplexControl函数的区别是什么
qt
长沙红胖子Qt7 小时前
VTK开发笔记(五):示例Cone2,熟悉观察者模式,在Qt窗口中详解复现对应的Demo
qt·观察者模式·vtk·回调
郝学胜-神的一滴8 小时前
基于OpenGL封装摄像机类:视图矩阵与透视矩阵的实现
c++·qt·线性代数·矩阵·游戏引擎·图形渲染
晨非辰11 小时前
#C语言——刷题攻略:牛客编程入门训练(九):攻克 分支控制(三)、循环控制(一),轻松拿捏!
c语言·开发语言·经验分享·学习方法·visual studio
华溢澄13 小时前
macOS下基于Qt/C++的OpenGL开发环境的搭建
c++·qt·macos·opengl
刃神太酷啦13 小时前
C++ 异常处理机制:从基础到实践的全面解析----《Hello C++ Wrold!》(20)--(C/C++)
java·c语言·开发语言·c++·qt·算法·leetcode
枫叶丹413 小时前
【Qt开发】显示类控件(一)-> QLabel
开发语言·qt
yBmZlQzJ14 小时前
PyQt5 修改标签字体和颜色的程序
开发语言·python·qt