When the user asks to copy some data, you should copy the data to the Clipboard. For instance,
Clipboard
void ExampleWindow::on_button_copy() { get_clipboard()->set_text("example_custom_target"); }