diff options
Diffstat (limited to 'examples/widgets/richtext/textobject/textobject.py')
-rw-r--r-- | examples/widgets/richtext/textobject/textobject.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/richtext/textobject/textobject.py b/examples/widgets/richtext/textobject/textobject.py index d42b5643c..d542ad893 100644 --- a/examples/widgets/richtext/textobject/textobject.py +++ b/examples/widgets/richtext/textobject/textobject.py @@ -17,7 +17,7 @@ from PySide6.QtWidgets import (QApplication, QHBoxLayout, QLabel, QLineEdit, from PySide6.QtSvg import QSvgRenderer -SVG_TEXT_FORMAT = QTextFormat.UserObject + 1 +SVG_TEXT_FORMAT = QTextFormat.ObjectTypes.UserObject + 1 SVG_DATA = 1 @@ -56,7 +56,7 @@ class Window(QWidget): file_name = self._file_name_line_edit.text() file = QFile(file_name) - if not file.open(QIODevice.ReadOnly): + if not file.open(QIODevice.OpenModeFlag.ReadOnly): reason = file.errorString() message = f"Could not open '{file_name}': {reason}" QMessageBox.warning(self, "Error Opening File", message) |