我正在用 C++ 编写 GUI 程序,并使用 OpenSuse 和 KDE Plasma。我想将字符串复制到剪贴板。我怎样才能做到这一点? 这是我的代码:
#include <wx_pch.h>
#include <wx.msgdlg.h>
#include <string>
#include <fstream>
#include <vector>
#include <sstream>
void SimpleGUIFrame::CopyToClipboard(string str)
{
// copy str to cliboard
}
这个库可能会有所帮助:Arian8j2/ClipboardXX