diff options
Diffstat (limited to 'examples/widgets/richtext')
| -rw-r--r-- | examples/widgets/richtext/orderform/orderform.py | 4 | ||||
| -rw-r--r-- | examples/widgets/richtext/textedit/main.py | 1 | ||||
| -rw-r--r-- | examples/widgets/richtext/textedit/textedit.py | 14 | ||||
| -rw-r--r-- | examples/widgets/richtext/textobject/textobject.py | 5 |
4 files changed, 11 insertions, 13 deletions
diff --git a/examples/widgets/richtext/orderform/orderform.py b/examples/widgets/richtext/orderform/orderform.py index 15bb26cc2..fd0be01fe 100644 --- a/examples/widgets/richtext/orderform/orderform.py +++ b/examples/widgets/richtext/orderform/orderform.py @@ -6,14 +6,14 @@ import sys -from PySide6.QtCore import QDate, Qt, Signal, Slot +from PySide6.QtCore import QDate, Qt, Slot from PySide6.QtGui import (QFont, QTextCharFormat, QTextCursor, QTextFrameFormat, QTextLength, QTextTableFormat) from PySide6.QtWidgets import (QApplication, QCheckBox, QDialog, QDialogButtonBox, QGridLayout, QLabel, QLineEdit, QMainWindow, QMenu, QMessageBox, QTableWidget, QTableWidgetItem, QTabWidget, - QTextEdit, QWidget) + QTextEdit) from PySide6.QtPrintSupport import QAbstractPrintDialog, QPrintDialog, QPrinter diff --git a/examples/widgets/richtext/textedit/main.py b/examples/widgets/richtext/textedit/main.py index a51a4d34f..88b679edc 100644 --- a/examples/widgets/richtext/textedit/main.py +++ b/examples/widgets/richtext/textedit/main.py @@ -7,7 +7,6 @@ import sys from argparse import ArgumentParser, RawTextHelpFormatter from PySide6.QtCore import QCoreApplication, qVersion -from PySide6.QtGui import QScreen from PySide6.QtWidgets import QApplication from textedit import TextEdit diff --git a/examples/widgets/richtext/textedit/textedit.py b/examples/widgets/richtext/textedit/textedit.py index 12eddc6c5..4f4146d34 100644 --- a/examples/widgets/richtext/textedit/textedit.py +++ b/examples/widgets/richtext/textedit/textedit.py @@ -2,16 +2,16 @@ # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import sys -from PySide6.QtCore import (QCoreApplication, QDir, QFile, QFileInfo, QMimeData, +from PySide6.QtCore import (QCoreApplication, QDir, QFile, QFileInfo, QMimeDatabase, QUrl, Qt, Slot) -from PySide6.QtGui import (QAction, QActionGroup, QColor, QGuiApplication, QClipboard, - QCloseEvent, QFont, QFontDatabase, QFontInfo, QIcon, +from PySide6.QtGui import (QAction, QActionGroup, QColor, QGuiApplication, + QFont, QFontDatabase, QFontInfo, QIcon, QKeySequence, QPalette, QPixmap, QTextBlockFormat, QTextCharFormat, QTextCursor, QTextDocumentWriter, - QTextFormat, QTextList, QTextListFormat) + QTextFormat, QTextListFormat) from PySide6.QtWidgets import (QApplication, QMainWindow, QColorDialog, QComboBox, - QDialog, QFileDialog, QFontComboBox, QStatusBar, - QTextEdit, QToolBar, QMenu, QMenuBar, QMessageBox) + QDialog, QFileDialog, QFontComboBox, + QTextEdit, QMessageBox) from PySide6.QtPrintSupport import (QAbstractPrintDialog, QPrinter, QPrintDialog, QPrintPreviewDialog) @@ -406,7 +406,7 @@ class TextEdit(QMainWindow): @Slot() def file_save(self): if not self._file_name or self._file_name.startswith(":/"): - return fileSaveAs() + return self.file_save_as() writer = QTextDocumentWriter(self._file_name) document = self._text_edit.document() diff --git a/examples/widgets/richtext/textobject/textobject.py b/examples/widgets/richtext/textobject/textobject.py index cfd065e22..9ab7bf8ae 100644 --- a/examples/widgets/richtext/textobject/textobject.py +++ b/examples/widgets/richtext/textobject/textobject.py @@ -8,9 +8,8 @@ import os from pathlib import Path import sys -from PySide6.QtCore import QFile, QIODevice, QObject, QSizeF, Qt, Slot -from PySide6.QtGui import (QTextCharFormat, QTextFormat, QTextObjectInterface, - QPyTextObject) +from PySide6.QtCore import QFile, QIODevice, QSizeF, Slot +from PySide6.QtGui import (QTextCharFormat, QTextFormat, QPyTextObject) from PySide6.QtWidgets import (QApplication, QHBoxLayout, QLabel, QLineEdit, QMessageBox, QPushButton, QTextEdit, QVBoxLayout, QWidget) |
