04-12-2022, 10:11 AM
Here's how I get string data from the clipboard:
To put string data onto the clipboard:
Maybe these techniques are not technically correct, but have been working well for me.
Code:
hdi::core::ClipboardData cbData;
std::string str;
if (hdi::core::clipboardData(cbData)
&& cbData.dataType() == hdi::core::ClipboardData::DataTypeString){
str = cbData.stringData();
}
To put string data onto the clipboard:
Code:
hdi::core::setClipboardData(str);
Maybe these techniques are not technically correct, but have been working well for me.