简体   繁体   English

KDE主题用于设置Qt4应用程序的样式

[英]KDE themes used to style Qt4 application

可以用kde主题来设置多平台(linux / windows)Qt4应用程序的样式吗?

是的,如果您构建/复制所有依赖项。

This is not possible. 这是不可能的。 Qt uses every platform's native API to render the widgets, hence platform specific themes cannot be applied on other platforms. Qt使用每个平台的本机API来呈现小部件,因此平台特定的主题不能应用于其他平台。

Since themes maybe third-party, it becomes more difficult. 由于主题可能是第三方,因此变得更加困难。

If you're talking about Qt Styles( QStyle ) that are used in traditional C++ KDE themes(non Plasma or ini themes) then yes you can do that to some extent, though you may have to adjust/fix some(or more) things since their mostly written with the KDE theme purpose in mind. 如果你在谈论传统C ++ KDE主题(非等离子或ini主题)中使用的Qt样式( QStyle ),那么你可以在某种程度上做到这一点,尽管你可能需要调整/修复一些(或更多)事物因为他们大多是以KDE为主题而写的。 One good example would be to fix or ensure the cross-platform compatibility(the theme might use additional platform specific libraries). 一个很好的例子是修复或确保跨平台兼容性(主题可能使用其他特定于平台的库)。 Then there's also the licensing issue that you definitely have to take into consideration, since most of those themes are under GNU GPL. 然后还有你必须考虑的许可问题,因为大多数这些主题都在GNU GPL下。

If you're talking about Qt Stylesheets , you are out of luck, since currently KDE doesn't support any way of theming using Qt Stylesheets, thus you have no KDE Stylesheet themes to use . 如果你在谈论的Qt样式表 ,你的运气了,因为目前KDE不支持使用Qt样式主题化的任何方式,因而没有KDE风格主题来使用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM