Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我可以使用Qt-Creator';我的应用程序中有什么新的平面主题?_Qt_Themes - Fatal编程技术网

我可以使用Qt-Creator';我的应用程序中有什么新的平面主题?

我可以使用Qt-Creator';我的应用程序中有什么新的平面主题?,qt,themes,Qt,Themes,新的看起来不错,我想申请我的申请 我知道如何使用QApplication::setStyle()设置主题,但我不知道这个新主题是否随Qt一起发布,如果发布,它的名称是什么。我在我的Qt安装中搜索了平面主题文件,在c:\Qt\Tools\QtCreator\share\QtCreator\themes\flat.creatorteme>找到了它 平面主题是由 承诺 以下是提交消息: Implement theming for QtCreator Adds a 'Theme' tab to the

新的看起来不错,我想申请我的申请


我知道如何使用
QApplication::setStyle()
设置主题,但我不知道这个新主题是否随Qt一起发布,如果发布,它的名称是什么。

我在我的Qt安装中搜索了平面主题文件,在
c:\Qt\Tools\QtCreator\share\QtCreator\themes\flat.creatorteme>找到了它

平面主题是由 承诺

以下是提交消息:

Implement theming for QtCreator Adds a 'Theme' tab to the environment settings and a '-theme' command line option. A theme is a combination of colors, gradients, flags and style information. There are two themes: - 'default': preserves the current default look - 'dark': uses a more flat for many widgets, dark color theme for everything This does not use a stylesheet (too limited), but rather sets the palette via C++ and modifies drawing behavior. Overall, the look is more flat (removed some gradients and bevels). Tested on Ubuntu 14.04 using Qt 5.4 and running on a KDE Desktop (Oxygen base style). For a screenshot, see https://gist.github.com/thorbenk/5ab06bea726de0aa7473 Changes: - Introduce class Theme, defining the interface how to access theme specific settings. The class reads a .creatortheme file (INI file, via QSettings) - Define named colors in the [Palette] section (see dark.creatortheme for example usage) - Use either named colors of AARRGGBB (hex) in the [Colors] section - A file ending with .creatortheme may be supplied to the '-theme' command line option - A global Theme instance can be accessed via creatorTheme() - Query colors, gradients, icons and flags from the theme were possible (TODO: use this in more places...) - There are very many color roles. It seems better to me to describe the role clearly, and then to consolidate later in the actual theme by assigning the same color. For example, one can set the text color of the output pane button individualy. - Many elements are also drawn differently. For the dark theme, I wanted to have a flatter look. - Introduce Theme::WidgetStyle enum, for now {Original, Flat}. - The theme specifies which kind of widget style it wants. - The drawing code queries the theme's style flag and switches between the original, gradient based look and the new, flat look. - Create some custom icons which look better on dark background (wip, currently folder/file icons) - Let ManhattanStyle draw some elements for non-panelwidgets, too (open/close arrows in QTreeView, custom folder/file icons) - For the welcomescreen, pass the WelcomeTheme class. WelcomeTheme exposes theme colors as Q_PROPERTY accessible from .qml - Themes can be modified via the 'Themes' tab in the environment settings. TODO: * Unify image handling * Avoid style name references * Fix gradients Change-Id: I92c2050ab0fb327649ea1eff4adec973d2073944 Reviewed-by: Thomas Hartmann Reviewed-by: hjk 为QtCreator实现主题化 将“主题”选项卡添加到环境设置和“-Theme”命令 行选项。 主题是颜色、渐变、旗帜和风格的组合 信息。 有两个主题: -“默认”:保留当前默认外观 -“深色”:对许多小部件使用更平坦的深色主题 无论如何 这不使用样式表(太有限),而是使用集合 调色板通过C++和修改绘图行为。 总体而言,外观更加平坦(删除了一些渐变和斜面)。 在Ubuntu14.04上测试,使用Qt5.4并在KDE上运行 桌面(氧基风格)。 有关屏幕截图,请参见 https://gist.github.com/thorbenk/5ab06bea726de0aa7473 变化: -介绍类主题,定义如何访问主题的接口 具体设置。该类读取.creatortheme文件(INI文件,通过 QSettings) -在[Palette]部分定义命名颜色 (有关用法示例,请参见dark.creatorItem) -在[颜色]中使用AARGGBB(十六进制)的任一命名颜色 部分 -可能会提供以.creatortheme结尾的文件 到“-theme”命令行选项 -可以通过creatorTheme()访问全局主题实例 -从主题中查询颜色、渐变、图标和标志 可能(TODO:在更多地方使用此选项…) -有很多颜色的角色。对我来说似乎更好 清楚地描述角色,然后在以后进行整合 在实际主题中指定相同的颜色。 例如,可以设置输出窗格按钮的文本颜色 个人的。 -许多元素的绘制方式也不同。 对于黑色主题,我希望有一个更平坦的外观。 -介绍Theme::WidgetStyle枚举,现在是{Original,Flat}。 -主题指定它想要哪种小部件样式。 -图形代码查询主题的样式标志和样式 在原始、基于渐变的外观和颜色之间切换 全新的扁平外观。 -创建一些自定义图标,使其在深色背景下看起来更好 (wip,当前为文件夹/文件图标) -让ManhattanStyle也为非PanelWidget绘制一些元素 (QTreeView中的打开/关闭箭头、自定义文件夹/文件图标) -对于welcomescreen,通过WelcomeTheme课程。 WelcomeTheme将主题颜色公开为可从中访问的Q_属性 .qml -可以通过环境中的“主题”选项卡修改主题 设置。 待办事项: *统一图像处理 *避免样式名称引用 *固定梯度 更改Id:I92c2050ab0fb327649ea1eff4adec973d2073944 审核人:托马斯·哈特曼 审核人:hjk
我没有使用QML的经验,但可能您只需要这个文件,我不知道。

请登录。要将其提取出来并推广到其他应用程序中可能需要一些工作。

谢谢您的图片!我懒得把它说出来:在commit中做得很好,但不是QML。它是通过
QSettings
读取的INI文件,请参阅。它似乎在QtCreator中具有所有可自定义颜色/渐变/图像的键。看起来它是最重要的函数,返回
qpalete
(基于INI文件)并在应用程序中使用,请参见。据我所知,
主题
类中的其他函数(
标志
颜色
图像文件
渐变
,…)似乎只在Qt creator的自定义小部件中使用。也许可以导入主题类。或者使用QDataStream从Qt creator内部序列化Qpalete并使用它。