Solved How does QFile read the QRC path?
-
error:QIODevice::read(QFile,"qrc:/qss/MetroUI.qss"):device not open
QFile qss("qrc:/qss/MetroUI.qss"); qss.open(QFile::ReadOnly);
-
-
@mirro said in How does QFile read the QRC path?:
QFile qss("qrc:/qss/MetroUI.qss");
If you use the
qrc:
protocol I guess you should use it asqrc:///
see documentation:Note: When referring to files stored with the Qt Resource System from within QML, you should use "qrc:///" instead of ":/" as QML requires URL paths.
Since you're not using it from QML, it looks like it's enough just to use
:/
instead. -
-
This post is deleted!