[PyKDE] Qt4 QClipboard & QMimeData problem
phil at riverbankcomputing.co.uk
Mon Sep 4 19:13:38 BST 2006
On Monday 04 September 2006 5:57 pm, Doug Bell wrote:
> I'm having another problem with QClipboard, this time when using
> QMimeData. I don't know whether there is any connection between this
> and my previously reported (and still unsolved) problem with the
> QClipboard.dataChanged() signal.
> The current issue is that QClipboard does not seem to take proper
> ownership of the data in QMimeData. It causes segmentation faults in
> Linux when trying to paste the data.
> But the convenience function QClipboard.setText() works fine. Since it
> just uses QMimeData in the Qt source, this appears to be a PyQt bug.
> If I keep a Python reference to the QMimeData instance, then the paste
> works fine. But even this sometimes segfaults on program exit
> (strangely, my simple example segfaults on exit but my larger program
> does not).
> Also, I've had no problems with QDrag.setMimeData(), so this appears to
> be an isolated issue.
> A simple example that illustrates the problem is attached. Just click
> the "Copy" button, then the "Paste" button.
> I'm using Debian packages for Qt 4.1.4 and PyQt 4.0.1.
Looks like I failed to copy over some %MethodCode from PyQt3. Should be fixed
in tonight's snapshot. It won't help with your other problem.
More information about the PyQt