aboutsummaryrefslogtreecommitdiffstats
path: root/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.py')
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.py b/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.py
index 841943292..32adb70c7 100644
--- a/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.py
+++ b/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.py
@@ -75,7 +75,7 @@ class MainWindow(QtWidgets.QMainWindow):
if fileName!="":
inFile = QtCore.QFile(fileName)
if inFile.open(QtCore.QFile.ReadOnly | QtCore.QFile.Text):
- self.editor.setPlainText(unicode(inFile.readAll()))
+ self.editor.setPlainText(str(inFile.readAll()))
def setupEditor(self):
variableFormat = QtGui.QTextCharFormat()