Having some text that I want to send to clipboard, something like
string "random text", I want to call some function (C or 3rd party lib or can be Ubuntu tool)
so it would be possilbe to push Ctrl+V to paste random text
Thanks in Advance, I've googled and tried all possible options
Qt Clipboard lags, xdotool can do only paste.
There are might be X11 or libevdev, vendors I already use in my project, but I could not find relevant sample
It looks like the modern default Ubuntu does not come with a clipboard manager. That's partially the reason that clipboard data is deleted when a window is closed, X11 ties clipboard data to the window. While it's possible for a window to push the data to a new owner, I've never noticed any program that knows to do that.
You might want to try downloading a clipboard manager, the lack of one might be the reason that QT clipboard is having trouble. Looks like CopyQ is Qt based.