Copy a big image to clipboard, I can't get it in other application. The following code can reproduce this problem:
- First start the application "b.cpp"
- Second start the applicatioin "a.cpp"
I get the messages in "b.cpp":
Not only did not get the image data, and the application "b.cpp" was also blocked for 5 seconds.
I found that the QXcbClipboard code has the "clipboard_timeout":
I guess "b.cpp" didn't get the image data because it waited for the clipboard event to time out. And see: https://github.com/qt/qtbase/blob/dev/src/gui/kernel/qinternalmimedata.cpp#L222
Because the image size is large, it takes a lot of time for "a.cpp" to encode QImage data into PNG format. Can provide encoding speed by reducing the compression ratio of PNG.