[PyKDE] Clipboard Problem

Toby Dickenson tdickenson at devmail.geminidataloggers.co.uk
Fri Jan 14 16:07:03 GMT 2005


On Friday 14 January 2005 13:20, dougb at bellz.org wrote:
> Hi,
> 
> My application uses the clipboard's setText function (not in selection
> mode) for copied text.  It works fine while the app is running, but the
> clipboard is always empty after exiting the application.  This occurs on
> both Linux (Qt 3.3.3) and Windows (Qt 2.3).
> 
> Any ideas?  Is some sort of inappropriate garbage collection going on?

I diagnosed a bug early last year in Qt 3.1.xxxxx relating to a bad 
interaction between deferred clipboard rendering at application exit. I cant 
remember the details right now, but our application contains the workaround 
of calling this function before shutdown.

    def _flush_clipboard(self):
        event = QCustomEvent(QEvent.Clipboard)
        QApplication.sendEvent(QApplication.clipboard(),event)

I dont think Trolltech replied to that bug report (mostly their tech support 
is wonderful, but sometimes I seem to hit their bit bucket :-(

I hope this helps

-- 
Toby Dickenson




More information about the PyQt mailing list