On Thu, 8 Oct 2009 21:11:45 -0400, Doug Bell <[email protected]> wrote: > Hi, > > In previous PyQt versions, the QClipboard.text() method accepted a > Python string as an argument: > > QtGui.QApplication.clipboard().text('xml') > > With PyQt 4.6, this throws an exception: > > TypeError: argument 1 of QClipboard.text() has an invalid type > > But it seems to work OK with a QString as an argument: > > QtGui.QApplication.clipboard().text(QtCore.QString('xml')) > > Is this a bug in 4.6?
I'd call it a mis-guided bug fix. The method makes use of QString's mutability, so allowing an ordinary (immutable) string appeared to be a bug. However the string is only updated if passed an empty string, so your usage (with hindsight) is perfectly reasonable. Reverted in the next snapshot. Phil _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
