简体   繁体   English

使用Qt时是否可以隐藏或打包* .qss文件?

[英]Is it possible to hide or pack the *.qss file when using Qt?

I have created a Qt project using VS2010, and used the qss file to modify the UI. 我使用VS2010创建了一个Qt项目,并使用qss文件修改了UI。 In order to set up each widget different styles, I put many of my class names into the qss file to distinguish the widgets, such as MyPicWidget. 为了设置每个小部件不同的样式,我将许多类名放入qss文件中以区分小部件,例如MyPicWidget。 The question is that I have to pack the qss file in to my installer, and with out it, the UI can't show the effect. 问题是我必须将qss文件打包到安装程序中,并且没有它,UI无法显示效果。 But I don't want the user to get my class names. 但是我不希望用户得到我的班级名称。 Is there any way to hide or pack in or "encrypt" the qss file, without losing its effect? 有什么方法可以隐藏或打包或“加密” qss文件,而不会失去其效果?

Just use the Qt resource file, and everything is working well. 只需使用Qt资源文件,一切就可以正常工作。 Thanks to Chernobyl . 感谢切尔诺贝利

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

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