I use PyQt5 and QTextEdit widget. I want to get a plain text from file and show it in QTextEdit. This is what I have in a text file
This is how I initialize QTextEdit
self.info_text_edit.setPalette(palette)
font = QtGui.QFont()
font.setFamily("Courier")
font.setPointSize(10)
font.setStyleStrategy(QtGui.QFont.NoAntialias)
self.info_text_edit.setFont(font)
self.info_text_edit.setLineWrapMode(QtWidgets.QTextEdit.WidgetWidth)
self.info_text_edit.setReadOnly(True)
Then for append a text I just do
self.info_text_edit.append(str(msg))
With this approach on Linux - everything works well. But this is what I see as a result on Windows
There was mistake in coding\decoding..
When I write
msg
to the file I should do following:Then when I read
msg
from file I should do this: