The code is as follows:
QApplication::clipboard()->clear(QClipboard::Clipboard);
QClipboard* clipboard = QApplication::clipboard();
clipboard->setText("test");

The same code running in the plugin, results showed:
QClipboard::setMimeData: Failed to set data on clipboard (No such file or directory);
But in exe file data is copied successfully execute to the system in the clipboard

I don't know why?Please help me!Thanks...