<div dir="ltr"><div>Hi,</div><div><br></div><div>I have stumble upon a clipboard issue.</div><div><br></div><div>I am working on a project wher we use Qt and CEF (Chromium Embedded).</div><div>The CEF event loop is integrated in Qt by calling CefDoMessageLoopWork() periodically <br></div><div>from Qt main event loop.</div><div><br></div><div>The issue arises when we copy/paste content from CEF into Qt (widget or qt quick item): all the UI freezes for several seconds and at the end nothing is pasted.</div><div><br></div><div>I have been able to locate the issue in QXcbClipboard::waitForClipboardEvent() and QXcbEventQueue::waitForNewEvents() where Qt waits to receive the clipboard content without running the event loop.</div><div>Also it seems that CEF needs to have CefDoMessageLoopWork() called to process the clipboard event on its side.</div><div>In the end, we end up with a deadlock where Qt is waiting for CEF to send the clipboard content, but CEF is waiting for Qt to run CefDoMessageLoopWork().</div><div><br></div><div>I was able to make it work by using QClipboard from another thread and it works.</div><div>But I am not sure it is safe to interact with the clipboard from a non UI thread and anyway this solution is not applicable all the clipboard interactions already handled by Qt.</div><div><br></div><div>Has anyone ever encountered this kind of issue?</div><div><br></div><div>Is it intended that Qt stops processing event while waiting for the clipboard?</div><div><br></div><div>Regards,</div><div><br></div><div><br></div><div>Benjamin<br></div><div><br> </div><div><br></div></div>