[PyQt] QtextBrowser.toPlainText bug (Python 3, Linux only)

Phil Thompson phil at riverbankcomputing.com
Thu Mar 5 17:28:10 GMT 2015


On 05/03/2015 3:42 pm, Edward K. Ream wrote:
> Hello all,
> 
> Not sure whether this it the right place to report this.  It may well 
> be a
> Qt bug.
> 
> On Python 3 only (3.4.0) and PyQt 5.2.1, QTextBrowser.toPlainText() 
> returns
> a unicode (Python 3 str) string with a value that does not match the 
> value
> shown in the QTextBrowser!  For example, the widget shows: Text: ÷ Σ 
> but
> toPlainText returns Text: ÷ £
> 
> All is well on Windows and on all platforms with Python 2.7.
> 
> ​Is this a known issue here?

There have been a few fixes to unicode conversions over recent releases. 
I wouldn't expect the Qt version to have any effect, but the PyQt 
version might.

Phil


More information about the PyQt mailing list