qt资源加载出错

-1: error: No rule to make target '../InteractivePlayer/style.qss', needed by 'debug/qrc_res.cpp'.  Stop.

问题出现:

我把添加qss资源文件  重新删除 移动位置。

再次添加新的资源文件,编译的时候出错。

解决:

1. .pro目录下 

RESOURCES += \
    res.qrc
是表示资源文件, 其会被生成一个qrc_res.cpp 文件。

2.清除编译目录(debug/release)下的make文件。

资源文件的加载路径并不是真实路径,需要添加增加的前缀。

样式表添加: https://blog.csdn.net/qq_31073871/article/details/79943093

qss 文件高亮设置:  https://blog.csdn.net/liang19890820/article/details/51699473

qt 文件目录问题: https://blog.csdn.net/me_badman/article/details/54864100 

猜你喜欢

转载自www.cnblogs.com/swing07/p/10428712.html