Last modified date of file in Qt resource system

  • Normally you can get last modified date easily with QFileInfo::lastModified().
    However this doesn't work when a file inside Qt's resource system is used

    @QFileInfo resourceInfo("://resource.txt");
    qDebug() << resourceInfo.lastModified().toString() // returns ""@

    Is there a possibility to find out the last modified date without temporarily copying the file from the resources to the file system?

  • Lifetime Qt Champion


    AFAIK no, the files in the resources are compiled in your application so these informations are out of your OS access. Out of curiosity, why would you need that ?

Log in to reply