Qt Plugin卸载后无法操作本插件的dll文件

希望在运行过程中对插件的原始文件进行操作,
但插件卸载成功后,文件覆盖删除操作都失败。

插件很简单,没有生成任何额外对象

#ifndef DATAVIEWER_H
#define DATAVIEWER_H
#include <QDebug>
#include "iplugin.h"
class DataViewer : public QObject, public IPlugin
{
    Q_OBJECT
    Q_INTERFACES(IPlugin)
    Q_PLUGIN_METADATA(IID iid_flower FILE "DataViewer.json")

public:
    DataViewer(QObject *parent = 0):QObject(parent){
//        qDebug() <<"create";
    }
    ~DataViewer(){
//        qDebug() << "delete";
    }

    bool initialize(){return true;}
    bool extensionsInitialized(){return true;}
    bool stop(){return true;}

    void recMsg(PluginMetaData){}

signals:
    void sendMsg(PluginMetaData);
};

#endif // DATAVIEWER_H

插件加载后即下载,然后删除文件失败

#include <QCoreApplication>
#include <QPluginLoader>
#include <QFile>
#include <QDebug>
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    QPluginLoader load("D:/Project/Qt/Flower/debug/plugins/DataViewer.dll");
    qDebug()<<load.load();
    qDebug()<<load.unload();
    qDebug()<<QFile::remove("D:/Project/Qt/Flower/debug/plugins/DataViewer.dll");
    return a.exec();
}

输出

true
true
false

你好,请问你解决了这个问题了吗,我也出现这个问题了

我用5.12.10、5.12.12两个版本试这个程序,都有问题。
true
true
false