how to get list of files stored in a .qrc Qt Resorce file?

前端 未结 1 1472
感动是毒
感动是毒 2020-12-05 13:02

I\'m very new to Qt..and in my program i have added some icon files in .qrc resource file.

How can we list in our program the files stored in qrc ?

相关标签:
1条回答
  • 2020-12-05 13:54

    Here's example code that should do it:

    QDirIterator it(":", QDirIterator::Subdirectories);
    while (it.hasNext()) {
        qDebug() << it.next();
    }
    

    Link to documentation: http://doc.qt.io/qt-5/qdiriterator.html

    0 讨论(0)
提交回复
热议问题