diff options
Diffstat (limited to 'examples/widgets/dialogs/classwizard')
| -rw-r--r-- | examples/widgets/dialogs/classwizard/classwizard.py | 14 | ||||
| -rw-r--r-- | examples/widgets/dialogs/classwizard/listchooser.py | 7 |
2 files changed, 9 insertions, 12 deletions
diff --git a/examples/widgets/dialogs/classwizard/classwizard.py b/examples/widgets/dialogs/classwizard/classwizard.py index d76eaa754..b657308e0 100644 --- a/examples/widgets/dialogs/classwizard/classwizard.py +++ b/examples/widgets/dialogs/classwizard/classwizard.py @@ -6,14 +6,12 @@ import os from pathlib import Path import sys -from PySide6.QtCore import (QByteArray, QDir, QFile, QFileInfo, - QRegularExpression, Qt, QUrl, Slot) +from PySide6.QtCore import QDir, QFileInfo, QUrl, Slot from PySide6.QtGui import QDesktopServices, QPixmap from PySide6.QtWidgets import (QApplication, QComboBox, QCheckBox, QFormLayout, - QFileDialog, QGroupBox, QGridLayout, - QHBoxLayout, QLabel, QLineEdit, QMessageBox, - QPushButton, QRadioButton, QToolButton, - QVBoxLayout, QWizard, QWizardPage) + QFileDialog, QHBoxLayout, QLabel, QLineEdit, + QMessageBox, QToolButton, QVBoxLayout, QWizard, + QWizardPage) from listchooser import ListChooser, PropertyChooser, SignalChooser @@ -77,7 +75,7 @@ class ClassWizard(QWizard): """Overrides QWizard.nextId() to insert the property/signal page in case the class is a QObject.""" idx = self.currentId() - if self.currentId() == self._class_info_index: + if idx == self._class_info_index: qobject = self.field('qobject') return self._qobject_index if qobject else self._output_index return super(ClassWizard, self).nextId() @@ -177,7 +175,7 @@ class ClassWizard(QWizard): block += '):\n' if base_class: - block += f' super().__init__(' + block += ' super().__init__(' if qobject: block += 'parent' block += ')\n' diff --git a/examples/widgets/dialogs/classwizard/listchooser.py b/examples/widgets/dialogs/classwizard/listchooser.py index a51c963c4..bf15be88c 100644 --- a/examples/widgets/dialogs/classwizard/listchooser.py +++ b/examples/widgets/dialogs/classwizard/listchooser.py @@ -1,14 +1,13 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -from PySide6.QtCore import (QCoreApplication, QDir, QRegularExpression, Qt, - Property, Slot) +from PySide6.QtCore import QRegularExpression, Property, Slot from PySide6.QtGui import QRegularExpressionValidator from PySide6.QtWidgets import (QComboBox, QDialog, QDialogButtonBox, QFormLayout, QGroupBox, QHBoxLayout, - QInputDialog, QLineEdit, QListWidget, + QLineEdit, QListWidget, QListWidgetItem, QPushButton, QVBoxLayout, - QWidget) + ) DEFAULT_TYPES = ['int', 'str', 'PySide6.QtCore.QPoint', 'PySide6.QtCore.QRect', |
