Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以假设我做了这样的事情:
QIcon myIcon(":/resources/icon.ico");
我以后如何确定该图标的路径,例如
QString path = myIcon.getPath();
问题是,没有getPath()会员,我找不到类似的东西,但肯定有办法!
getPath()
我想我可以继承这个QIcon类并添加这个功能,但它可能是内置的,我忽略了它?
QIcon
文件名不存储在QIcon中,它仅用于构建图像。