From 25180730194bec25f915f32ab846ea583fb1493f Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 2 Nov 2020 16:11:52 +0100 Subject: Rename PySide2 to PySide6 Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I845f7b006e9ad274fed5444ec4c1f9dbe176ff88 Reviewed-by: Christian Tismer --- examples/widgets/animation/animatedtiles/animatedtiles.py | 2 +- examples/widgets/animation/animatedtiles/animatedtiles_rc.py | 2 +- examples/widgets/animation/appchooser/appchooser.py | 2 +- examples/widgets/animation/appchooser/appchooser_rc.py | 2 +- examples/widgets/animation/easing/easing.py | 4 ++-- examples/widgets/animation/easing/easing_rc.py | 2 +- examples/widgets/animation/easing/ui_form.py | 6 +++--- examples/widgets/animation/states/states.py | 2 +- examples/widgets/animation/states/states_rc.py | 2 +- examples/widgets/codeeditor/codeeditor.py | 6 +++--- examples/widgets/codeeditor/main.py | 4 ++-- examples/widgets/dialogs/classwizard/classwizard.py | 2 +- examples/widgets/dialogs/classwizard/classwizard_rc.py | 2 +- examples/widgets/dialogs/extension.py | 4 ++-- examples/widgets/dialogs/findfiles.py | 4 ++-- examples/widgets/dialogs/standarddialogs.py | 4 ++-- examples/widgets/dialogs/trivialwizard.py | 4 ++-- examples/widgets/draganddrop/draggabletext/draggabletext.py | 8 ++++---- examples/widgets/draganddrop/draggabletext/draggabletext_rc.py | 2 +- examples/widgets/effects/lighting.py | 2 +- examples/widgets/gallery/main.py | 6 +++--- examples/widgets/gallery/widgetgallery.py | 6 +++--- examples/widgets/graphicsview/anchorlayout.py | 2 +- examples/widgets/graphicsview/collidingmice/collidingmice.py | 4 ++-- examples/widgets/graphicsview/collidingmice/mice_rc.py | 2 +- examples/widgets/graphicsview/diagramscene/diagramscene.py | 2 +- examples/widgets/graphicsview/diagramscene/diagramscene_rc.py | 2 +- examples/widgets/graphicsview/dragdroprobot/dragdroprobot.py | 2 +- .../widgets/graphicsview/dragdroprobot/dragdroprobot_rc.py | 2 +- examples/widgets/graphicsview/elasticnodes.py | 2 +- examples/widgets/itemviews/addressbook/adddialogwidget.py | 6 +++--- examples/widgets/itemviews/addressbook/addressbook.py | 8 ++++---- examples/widgets/itemviews/addressbook/addresswidget.py | 6 +++--- examples/widgets/itemviews/addressbook/newaddresstab.py | 6 +++--- examples/widgets/itemviews/addressbook/tablemodel.py | 2 +- examples/widgets/itemviews/basicsortfiltermodel.py | 6 +++--- examples/widgets/itemviews/fetchmore.py | 2 +- examples/widgets/itemviews/stardelegate/stardelegate.py | 4 ++-- examples/widgets/itemviews/stardelegate/stareditor.py | 6 +++--- examples/widgets/itemviews/stardelegate/starrating.py | 4 ++-- examples/widgets/layouts/basiclayouts.py | 4 ++-- examples/widgets/layouts/dynamiclayouts.py | 6 +++--- examples/widgets/layouts/flowlayout.py | 6 +++--- examples/widgets/mainwindows/application/application.py | 2 +- examples/widgets/mainwindows/application/application_rc.py | 2 +- examples/widgets/mainwindows/dockwidgets/dockwidgets.py | 10 +++++----- examples/widgets/mainwindows/dockwidgets/dockwidgets_rc.py | 2 +- examples/widgets/mainwindows/mdi/mdi.py | 8 ++++---- examples/widgets/mainwindows/mdi/mdi_rc.py | 2 +- examples/widgets/painting/basicdrawing/basicdrawing.py | 8 ++++---- examples/widgets/painting/basicdrawing/basicdrawing_rc.py | 2 +- examples/widgets/painting/concentriccircles.py | 8 ++++---- examples/widgets/richtext/orderform.py | 4 ++-- examples/widgets/richtext/syntaxhighlighter.py | 4 ++-- .../widgets/richtext/syntaxhighlighter/syntaxhighlighter.py | 8 ++++---- .../widgets/richtext/syntaxhighlighter/syntaxhighlighter_rc.py | 2 +- examples/widgets/richtext/textobject/textobject.py | 4 ++-- examples/widgets/state-machine/eventtrans.py | 4 ++-- examples/widgets/state-machine/factstates.py | 4 ++-- examples/widgets/state-machine/pingpong.py | 4 ++-- examples/widgets/state-machine/rogue.py | 6 +++--- examples/widgets/state-machine/trafficlight.py | 6 +++--- examples/widgets/state-machine/twowaybutton.py | 4 ++-- examples/widgets/systray/main.py | 2 +- examples/widgets/systray/rc_systray.py | 2 +- examples/widgets/systray/window.py | 6 +++--- examples/widgets/threads/thread_signals.py | 4 ++-- examples/widgets/tutorials/addressbook/part1.py | 2 +- examples/widgets/tutorials/addressbook/part2.py | 2 +- examples/widgets/tutorials/addressbook/part3.py | 2 +- examples/widgets/tutorials/addressbook/part4.py | 2 +- examples/widgets/tutorials/addressbook/part5.py | 2 +- examples/widgets/tutorials/addressbook/part6.py | 2 +- examples/widgets/tutorials/addressbook/part7.py | 2 +- examples/widgets/widgets/tetrix.py | 4 ++-- 75 files changed, 144 insertions(+), 144 deletions(-) (limited to 'examples/widgets') diff --git a/examples/widgets/animation/animatedtiles/animatedtiles.py b/examples/widgets/animation/animatedtiles/animatedtiles.py index b15635185..3ec1b475b 100644 --- a/examples/widgets/animation/animatedtiles/animatedtiles.py +++ b/examples/widgets/animation/animatedtiles/animatedtiles.py @@ -40,7 +40,7 @@ ## ############################################################################# -from PySide2 import QtCore, QtGui, QtWidgets +from PySide6 import QtCore, QtGui, QtWidgets import animatedtiles_rc diff --git a/examples/widgets/animation/animatedtiles/animatedtiles_rc.py b/examples/widgets/animation/animatedtiles/animatedtiles_rc.py index d0819862d..3486fa55c 100644 --- a/examples/widgets/animation/animatedtiles/animatedtiles_rc.py +++ b/examples/widgets/animation/animatedtiles/animatedtiles_rc.py @@ -3,7 +3,7 @@ # Created by: The Resource Compiler for Qt version 5.14.0 # WARNING! All changes made in this file will be lost! -from PySide2 import QtCore +from PySide6 import QtCore qt_resource_data = b"\ \x00\x006\xe2\ diff --git a/examples/widgets/animation/appchooser/appchooser.py b/examples/widgets/animation/appchooser/appchooser.py index 74e9f1c02..55cd3c1d5 100644 --- a/examples/widgets/animation/appchooser/appchooser.py +++ b/examples/widgets/animation/appchooser/appchooser.py @@ -40,7 +40,7 @@ ## ############################################################################# -from PySide2 import QtCore, QtGui, QtWidgets +from PySide6 import QtCore, QtGui, QtWidgets import appchooser_rc diff --git a/examples/widgets/animation/appchooser/appchooser_rc.py b/examples/widgets/animation/appchooser/appchooser_rc.py index c96fe80c6..6f2a5ff36 100644 --- a/examples/widgets/animation/appchooser/appchooser_rc.py +++ b/examples/widgets/animation/appchooser/appchooser_rc.py @@ -3,7 +3,7 @@ # Created by: The Resource Compiler for Qt version 5.14.0 # WARNING! All changes made in this file will be lost! -from PySide2 import QtCore +from PySide6 import QtCore qt_resource_data = b"\ \x00\x00\x13\x09\ diff --git a/examples/widgets/animation/easing/easing.py b/examples/widgets/animation/easing/easing.py index d5c733863..647fbeb34 100644 --- a/examples/widgets/animation/easing/easing.py +++ b/examples/widgets/animation/easing/easing.py @@ -40,7 +40,7 @@ ## ############################################################################# -from PySide2 import QtCore, QtGui, QtWidgets +from PySide6 import QtCore, QtGui, QtWidgets import easing_rc from ui_form import Ui_Form @@ -83,7 +83,7 @@ class Animation(QtCore.QPropertyAnimation): else: super(Animation, self).updateCurrentTime(currentTime) -# PySide2 doesn't support deriving from more than one wrapped class so we use +# PySide6 doesn't support deriving from more than one wrapped class so we use # composition and delegate the property. class Pixmap(QtCore.QObject): def __init__(self, pix): diff --git a/examples/widgets/animation/easing/easing_rc.py b/examples/widgets/animation/easing/easing_rc.py index 26c31654b..c0f25d729 100644 --- a/examples/widgets/animation/easing/easing_rc.py +++ b/examples/widgets/animation/easing/easing_rc.py @@ -3,7 +3,7 @@ # Created by: The Resource Compiler for Qt version 5.14.0 # WARNING! All changes made in this file will be lost! -from PySide2 import QtCore +from PySide6 import QtCore qt_resource_data = b"\ \x00\x00\x14\x1d\ diff --git a/examples/widgets/animation/easing/ui_form.py b/examples/widgets/animation/easing/ui_form.py index c2279c5c5..49aaf2ff0 100644 --- a/examples/widgets/animation/easing/ui_form.py +++ b/examples/widgets/animation/easing/ui_form.py @@ -8,10 +8,10 @@ ## WARNING! All changes made in this file will be lost when recompiling UI file! ################################################################################ -from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint, +from PySide6.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint, QRect, QSize, QUrl, Qt) -from PySide2.QtGui import (QColor, QFont, QIcon, QPixmap) -from PySide2.QtWidgets import * +from PySide6.QtGui import (QColor, QFont, QIcon, QPixmap) +from PySide6.QtWidgets import * class Ui_Form(object): def setupUi(self, Form): diff --git a/examples/widgets/animation/states/states.py b/examples/widgets/animation/states/states.py index 1a859245a..363b5af6c 100644 --- a/examples/widgets/animation/states/states.py +++ b/examples/widgets/animation/states/states.py @@ -40,7 +40,7 @@ ## ############################################################################# -from PySide2 import QtCore, QtGui, QtWidgets +from PySide6 import QtCore, QtGui, QtWidgets import states_rc diff --git a/examples/widgets/animation/states/states_rc.py b/examples/widgets/animation/states/states_rc.py index fe8a05c45..9f8241f60 100644 --- a/examples/widgets/animation/states/states_rc.py +++ b/examples/widgets/animation/states/states_rc.py @@ -48,7 +48,7 @@ # # WARNING! All changes made in this file will be lost! -from PySide2 import QtCore +from PySide6 import QtCore qt_resource_data = b"\ \x00\x00\x1b\x48\ diff --git a/examples/widgets/codeeditor/codeeditor.py b/examples/widgets/codeeditor/codeeditor.py index d83d010d4..acfac42d0 100644 --- a/examples/widgets/codeeditor/codeeditor.py +++ b/examples/widgets/codeeditor/codeeditor.py @@ -38,9 +38,9 @@ ## ############################################################################# -from PySide2.QtCore import Slot, Qt, QRect, QSize -from PySide2.QtGui import QColor, QPainter, QTextFormat -from PySide2.QtWidgets import QPlainTextEdit, QWidget, QTextEdit +from PySide6.QtCore import Slot, Qt, QRect, QSize +from PySide6.QtGui import QColor, QPainter, QTextFormat +from PySide6.QtWidgets import QPlainTextEdit, QWidget, QTextEdit class LineNumberArea(QWidget): diff --git a/examples/widgets/codeeditor/main.py b/examples/widgets/codeeditor/main.py index 14c2e0826..e3d2a9ee9 100644 --- a/examples/widgets/codeeditor/main.py +++ b/examples/widgets/codeeditor/main.py @@ -39,10 +39,10 @@ ############################################################################# import sys -from PySide2.QtWidgets import QApplication +from PySide6.QtWidgets import QApplication from codeeditor import CodeEditor -"""PySide2 port of the widgets/codeeditor example from Qt5""" +"""PySide6 port of the widgets/codeeditor example from Qt5""" if __name__ == "__main__": app = QApplication([]) diff --git a/examples/widgets/dialogs/classwizard/classwizard.py b/examples/widgets/dialogs/classwizard/classwizard.py index ecc1806be..addc089c6 100644 --- a/examples/widgets/dialogs/classwizard/classwizard.py +++ b/examples/widgets/dialogs/classwizard/classwizard.py @@ -39,7 +39,7 @@ ## ############################################################################# -from PySide2 import QtCore, QtGui, QtWidgets +from PySide6 import QtCore, QtGui, QtWidgets import classwizard_rc diff --git a/examples/widgets/dialogs/classwizard/classwizard_rc.py b/examples/widgets/dialogs/classwizard/classwizard_rc.py index e79a959f1..71889b33a 100644 --- a/examples/widgets/dialogs/classwizard/classwizard_rc.py +++ b/examples/widgets/dialogs/classwizard/classwizard_rc.py @@ -3,7 +3,7 @@ # Created by: The Resource Compiler for Qt version 5.14.0 # WARNING! All changes made in this file will be lost! -from PySide2 import QtCore +from PySide6 import QtCore qt_resource_data = b"\ \x00\x00:@\ diff --git a/examples/widgets/dialogs/extension.py b/examples/widgets/dialogs/extension.py index 6d560c82a..891e55533 100644 --- a/examples/widgets/dialogs/extension.py +++ b/examples/widgets/dialogs/extension.py @@ -40,9 +40,9 @@ ## ############################################################################# -"""PySide2 port of the widgets/dialogs/extension example from Qt v5.x""" +"""PySide6 port of the widgets/dialogs/extension example from Qt v5.x""" -from PySide2 import QtCore, QtWidgets +from PySide6 import QtCore, QtWidgets class FindDialog(QtWidgets.QDialog): diff --git a/examples/widgets/dialogs/findfiles.py b/examples/widgets/dialogs/findfiles.py index cf2be86db..5e26f73ad 100644 --- a/examples/widgets/dialogs/findfiles.py +++ b/examples/widgets/dialogs/findfiles.py @@ -40,9 +40,9 @@ ## ############################################################################# -"""PySide2 port of the widgets/dialogs/findfiles example from Qt v5.x""" +"""PySide6 port of the widgets/dialogs/findfiles example from Qt v5.x""" -from PySide2 import QtCore, QtGui, QtWidgets +from PySide6 import QtCore, QtGui, QtWidgets class Window(QtWidgets.QDialog): diff --git a/examples/widgets/dialogs/standarddialogs.py b/examples/widgets/dialogs/standarddialogs.py index ea1afa4ce..5e0f80c4d 100644 --- a/examples/widgets/dialogs/standarddialogs.py +++ b/examples/widgets/dialogs/standarddialogs.py @@ -40,10 +40,10 @@ ## ############################################################################# -"""PySide2 port of the widgets/dialogs/standarddialogs example from Qt v5.x""" +"""PySide6 port of the widgets/dialogs/standarddialogs example from Qt v5.x""" import sys -from PySide2 import QtCore, QtGui, QtWidgets +from PySide6 import QtCore, QtGui, QtWidgets class Dialog(QtWidgets.QDialog): diff --git a/examples/widgets/dialogs/trivialwizard.py b/examples/widgets/dialogs/trivialwizard.py index 80a398185..88b8e97b8 100644 --- a/examples/widgets/dialogs/trivialwizard.py +++ b/examples/widgets/dialogs/trivialwizard.py @@ -40,9 +40,9 @@ ## ############################################################################# -"""PySide2 port of the widgets/dialogs/trivialwizard example from Qt v5.x""" +"""PySide6 port of the widgets/dialogs/trivialwizard example from Qt v5.x""" -from PySide2 import QtWidgets +from PySide6 import QtWidgets def createIntroPage(): diff --git a/examples/widgets/draganddrop/draggabletext/draggabletext.py b/examples/widgets/draganddrop/draggabletext/draggabletext.py index 77a40b1a5..480f3f4c6 100644 --- a/examples/widgets/draganddrop/draggabletext/draggabletext.py +++ b/examples/widgets/draganddrop/draggabletext/draggabletext.py @@ -40,11 +40,11 @@ ## ############################################################################# -"""PySide2 port of the widgets/draganddrop/draggabletext example from Qt v5.x, originating from PyQt""" +"""PySide6 port of the widgets/draganddrop/draggabletext example from Qt v5.x, originating from PyQt""" -from PySide2.QtCore import QFile, QIODevice, QMimeData, QPoint, Qt, QTextStream -from PySide2.QtGui import QDrag, QPalette, QPixmap -from PySide2.QtWidgets import QApplication, QFrame, QLabel, QWidget +from PySide6.QtCore import QFile, QIODevice, QMimeData, QPoint, Qt, QTextStream +from PySide6.QtGui import QDrag, QPalette, QPixmap +from PySide6.QtWidgets import QApplication, QFrame, QLabel, QWidget import draggabletext_rc diff --git a/examples/widgets/draganddrop/draggabletext/draggabletext_rc.py b/examples/widgets/draganddrop/draggabletext/draggabletext_rc.py index c05e317b3..e1d19bd91 100644 --- a/examples/widgets/draganddrop/draggabletext/draggabletext_rc.py +++ b/examples/widgets/draganddrop/draggabletext/draggabletext_rc.py @@ -3,7 +3,7 @@ # Created by: The Resource Compiler for Qt version 5.14.0 # WARNING! All changes made in this file will be lost! -from PySide2 import QtCore +from PySide6 import QtCore qt_resource_data = b"\ \x00\x00\x00\xf7\ diff --git a/examples/widgets/effects/lighting.py b/examples/widgets/effects/lighting.py index 596db4ed9..6e72754ca 100644 --- a/examples/widgets/effects/lighting.py +++ b/examples/widgets/effects/lighting.py @@ -42,7 +42,7 @@ import math -from PySide2 import QtCore, QtGui, QtWidgets +from PySide6 import QtCore, QtGui, QtWidgets class Lighting(QtWidgets.QGraphicsView): diff --git a/examples/widgets/gallery/main.py b/examples/widgets/gallery/main.py index 11f19201b..cbc499244 100644 --- a/examples/widgets/gallery/main.py +++ b/examples/widgets/gallery/main.py @@ -38,12 +38,12 @@ ## ############################################################################# -"""PySide2 port of the widgets/gallery example from Qt v5.15""" +"""PySide6 port of the widgets/gallery example from Qt v5.15""" import sys -from PySide2.QtCore import QCoreApplication, Qt -from PySide2.QtWidgets import QApplication +from PySide6.QtCore import QCoreApplication, Qt +from PySide6.QtWidgets import QApplication from widgetgallery import WidgetGallery diff --git a/examples/widgets/gallery/widgetgallery.py b/examples/widgets/gallery/widgetgallery.py index 9d3faeeff..fd7c3246e 100644 --- a/examples/widgets/gallery/widgetgallery.py +++ b/examples/widgets/gallery/widgetgallery.py @@ -40,11 +40,11 @@ import sys -from PySide2.QtWidgets import * -from PySide2.QtGui import (QCursor, QDesktopServices, QGuiApplication, QIcon, +from PySide6.QtWidgets import * +from PySide6.QtGui import (QCursor, QDesktopServices, QGuiApplication, QIcon, QKeySequence, QShortcut, QStandardItem, QStandardItemModel, QScreen, QWindow) -from PySide2.QtCore import (QDateTime, QDir, QLibraryInfo, QMetaObject, +from PySide6.QtCore import (QDateTime, QDir, QLibraryInfo, QMetaObject, QSysInfo, QTextStream, QTimer, Qt, qVersion) diff --git a/examples/widgets/graphicsview/anchorlayout.py b/examples/widgets/graphicsview/anchorlayout.py index f7f4edc65..0b1ec0a03 100644 --- a/examples/widgets/graphicsview/anchorlayout.py +++ b/examples/widgets/graphicsview/anchorlayout.py @@ -40,7 +40,7 @@ ## ############################################################################# -from PySide2 import QtCore, QtWidgets +from PySide6 import QtCore, QtWidgets def createItem(minimum, preferred, maximum, name): diff --git a/examples/widgets/graphicsview/collidingmice/collidingmice.py b/examples/widgets/graphicsview/collidingmice/collidingmice.py index 2203cb381..2d5490b6d 100644 --- a/examples/widgets/graphicsview/collidingmice/collidingmice.py +++ b/examples/widgets/graphicsview/collidingmice/collidingmice.py @@ -42,7 +42,7 @@ import math -from PySide2 import QtCore, QtGui, QtWidgets +from PySide6 import QtCore, QtGui, QtWidgets import mice_rc @@ -71,7 +71,7 @@ class Mouse(QtWidgets.QGraphicsItem): self.setTransform(QtGui.QTransform().rotate(random(360 * 16))) # In the C++ version of this example, this class is also derived from - # QObject in order to receive timer events. PySide2 does not support + # QObject in order to receive timer events. PySide6 does not support # deriving from more than one wrapped class so we just create an # explicit timer instead. self.timer = QtCore.QTimer() diff --git a/examples/widgets/graphicsview/collidingmice/mice_rc.py b/examples/widgets/graphicsview/collidingmice/mice_rc.py index e9042a0d9..d442a36b0 100644 --- a/examples/widgets/graphicsview/collidingmice/mice_rc.py +++ b/examples/widgets/graphicsview/collidingmice/mice_rc.py @@ -48,7 +48,7 @@ # # WARNING! All changes made in this file will be lost! -from PySide2 import QtCore +from PySide6 import QtCore qt_resource_data = b"\ \x00\x00\x0b\xd5\ diff --git a/examples/widgets/graphicsview/diagramscene/diagramscene.py b/examples/widgets/graphicsview/diagramscene/diagramscene.py index 079ae4021..af50cd6b2 100644 --- a/examples/widgets/graphicsview/diagramscene/diagramscene.py +++ b/examples/widgets/graphicsview/diagramscene/diagramscene.py @@ -42,7 +42,7 @@ import math -from PySide2 import QtCore, QtGui, QtWidgets +from PySide6 import QtCore, QtGui, QtWidgets import diagramscene_rc diff --git a/examples/widgets/graphicsview/diagramscene/diagramscene_rc.py b/examples/widgets/graphicsview/diagramscene/diagramscene_rc.py index 8fee5a0d6..da5f0217e 100644 --- a/examples/widgets/graphicsview/diagramscene/diagramscene_rc.py +++ b/examples/widgets/graphicsview/diagramscene/diagramscene_rc.py @@ -3,7 +3,7 @@ # Created by: The Resource Compiler for Qt version 5.14.0 # WARNING! All changes made in this file will be lost! -from PySide2 import QtCore +from PySide6 import QtCore qt_resource_data = b"\ \x00\x00\x00\xf7\ diff --git a/examples/widgets/graphicsview/dragdroprobot/dragdroprobot.py b/examples/widgets/graphicsview/dragdroprobot/dragdroprobot.py index 8defc6d07..a72c9351b 100644 --- a/examples/widgets/graphicsview/dragdroprobot/dragdroprobot.py +++ b/examples/widgets/graphicsview/dragdroprobot/dragdroprobot.py @@ -40,7 +40,7 @@ ## ############################################################################# -from PySide2 import QtCore, QtGui, QtWidgets +from PySide6 import QtCore, QtGui, QtWidgets import dragdroprobot_rc diff --git a/examples/widgets/graphicsview/dragdroprobot/dragdroprobot_rc.py b/examples/widgets/graphicsview/dragdroprobot/dragdroprobot_rc.py index 23d346301..5b992ffca 100644 --- a/examples/widgets/graphicsview/dragdroprobot/dragdroprobot_rc.py +++ b/examples/widgets/graphicsview/dragdroprobot/dragdroprobot_rc.py @@ -3,7 +3,7 @@ # Created by: The Resource Compiler for Qt version 5.14.0 # WARNING! All changes made in this file will be lost! -from PySide2 import QtCore +from PySide6 import QtCore qt_resource_data = b"\ \x00\x00:|\ diff --git a/examples/widgets/graphicsview/elasticnodes.py b/examples/widgets/graphicsview/elasticnodes.py index f5d229b13..1eefdc0bb 100644 --- a/examples/widgets/graphicsview/elasticnodes.py +++ b/examples/widgets/graphicsview/elasticnodes.py @@ -43,7 +43,7 @@ import sys import weakref import math -from PySide2 import QtCore, QtGui, QtWidgets +from PySide6 import QtCore, QtGui, QtWidgets def random(boundary): diff --git a/examples/widgets/itemviews/addressbook/adddialogwidget.py b/examples/widgets/itemviews/addressbook/adddialogwidget.py index 7991039ef..aed3d34a9 100644 --- a/examples/widgets/itemviews/addressbook/adddialogwidget.py +++ b/examples/widgets/itemviews/addressbook/adddialogwidget.py @@ -40,8 +40,8 @@ ## ############################################################################# -from PySide2.QtCore import Qt -from PySide2.QtWidgets import (QDialog, QLabel, QTextEdit, QLineEdit, +from PySide6.QtCore import Qt +from PySide6.QtWidgets import (QDialog, QLabel, QTextEdit, QLineEdit, QDialogButtonBox, QGridLayout, QVBoxLayout) class AddDialogWidget(QDialog): @@ -90,7 +90,7 @@ class AddDialogWidget(QDialog): if __name__ == "__main__": import sys - from PySide2.QtWidgets import QApplication + from PySide6.QtWidgets import QApplication app = QApplication(sys.argv) diff --git a/examples/widgets/itemviews/addressbook/addressbook.py b/examples/widgets/itemviews/addressbook/addressbook.py index 35d095287..35dbcc860 100644 --- a/examples/widgets/itemviews/addressbook/addressbook.py +++ b/examples/widgets/itemviews/addressbook/addressbook.py @@ -40,8 +40,8 @@ ## ############################################################################# -from PySide2.QtGui import QAction -from PySide2.QtWidgets import (QMainWindow, QFileDialog, QApplication) +from PySide6.QtGui import QAction +from PySide6.QtWidgets import (QMainWindow, QFileDialog, QApplication) from addresswidget import AddressWidget @@ -93,10 +93,10 @@ class MainWindow(QMainWindow): # Quick gotcha: # # QFiledialog.getOpenFilename and QFileDialog.get.SaveFileName don't - # behave in PySide2 as they do in Qt, where they return a QString + # behave in PySide6 as they do in Qt, where they return a QString # containing the filename. # - # In PySide2, these functions return a tuple: (filename, filter) + # In PySide6, these functions return a tuple: (filename, filter) def openFile(self): filename, _ = QFileDialog.getOpenFileName(self) diff --git a/examples/widgets/itemviews/addressbook/addresswidget.py b/examples/widgets/itemviews/addressbook/addresswidget.py index d0c1747fb..b3cc6591d 100644 --- a/examples/widgets/itemviews/addressbook/addresswidget.py +++ b/examples/widgets/itemviews/addressbook/addresswidget.py @@ -45,9 +45,9 @@ try: except ImportError: import pickle -from PySide2.QtCore import (Qt, Signal, QRegularExpression, QModelIndex, +from PySide6.QtCore import (Qt, Signal, QRegularExpression, QModelIndex, QItemSelection, QSortFilterProxyModel) -from PySide2.QtWidgets import QTabWidget, QMessageBox, QTableView, QAbstractItemView +from PySide6.QtWidgets import QTabWidget, QMessageBox, QTableView, QAbstractItemView from tablemodel import TableModel from newaddresstab import NewAddressTab @@ -240,7 +240,7 @@ class AddressWidget(QTabWidget): if __name__ == "__main__": import sys - from PySide2.QtWidgets import QApplication + from PySide6.QtWidgets import QApplication app = QApplication(sys.argv) addressWidget = AddressWidget() diff --git a/examples/widgets/itemviews/addressbook/newaddresstab.py b/examples/widgets/itemviews/addressbook/newaddresstab.py index ab54fb8a7..32ed515a0 100644 --- a/examples/widgets/itemviews/addressbook/newaddresstab.py +++ b/examples/widgets/itemviews/addressbook/newaddresstab.py @@ -40,8 +40,8 @@ ## ############################################################################# -from PySide2.QtCore import (Qt, Signal) -from PySide2.QtWidgets import (QWidget, QLabel, QPushButton, QVBoxLayout) +from PySide6.QtCore import (Qt, Signal) +from PySide6.QtWidgets import (QWidget, QLabel, QPushButton, QVBoxLayout) from adddialogwidget import AddDialogWidget @@ -84,7 +84,7 @@ if __name__ == "__main__": print("Address:" + address) import sys - from PySide2.QtWidgets import QApplication + from PySide6.QtWidgets import QApplication app = QApplication(sys.argv) newAddressTab = NewAddressTab() diff --git a/examples/widgets/itemviews/addressbook/tablemodel.py b/examples/widgets/itemviews/addressbook/tablemodel.py index 155f09131..9cf79f208 100644 --- a/examples/widgets/itemviews/addressbook/tablemodel.py +++ b/examples/widgets/itemviews/addressbook/tablemodel.py @@ -40,7 +40,7 @@ ## ############################################################################# -from PySide2.QtCore import (Qt, QAbstractTableModel, QModelIndex) +from PySide6.QtCore import (Qt, QAbstractTableModel, QModelIndex) class TableModel(QAbstractTableModel): diff --git a/examples/widgets/itemviews/basicsortfiltermodel.py b/examples/widgets/itemviews/basicsortfiltermodel.py index 00441ffe7..845755cb9 100644 --- a/examples/widgets/itemviews/basicsortfiltermodel.py +++ b/examples/widgets/itemviews/basicsortfiltermodel.py @@ -41,10 +41,10 @@ ############################################################################# import sys -from PySide2.QtCore import (QDate, QDateTime, QRegularExpression, +from PySide6.QtCore import (QDate, QDateTime, QRegularExpression, QSortFilterProxyModel, QTime, Qt) -from PySide2.QtGui import QStandardItemModel -from PySide2.QtWidgets import (QApplication, QCheckBox, QComboBox, QGridLayout, +from PySide6.QtGui import QStandardItemModel +from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QGridLayout, QGroupBox, QHBoxLayout, QLabel, QLineEdit, QTreeView, QVBoxLayout, QWidget) diff --git a/examples/widgets/itemviews/fetchmore.py b/examples/widgets/itemviews/fetchmore.py index 2b0d8c104..c91874004 100644 --- a/examples/widgets/itemviews/fetchmore.py +++ b/examples/widgets/itemviews/fetchmore.py @@ -41,7 +41,7 @@ ## ############################################################################# -from PySide2 import QtCore, QtWidgets +from PySide6 import QtCore, QtWidgets class FileListModel(QtCore.QAbstractListModel): diff --git a/examples/widgets/itemviews/stardelegate/stardelegate.py b/examples/widgets/itemviews/stardelegate/stardelegate.py index 86fd99ce6..425a06be5 100644 --- a/examples/widgets/itemviews/stardelegate/stardelegate.py +++ b/examples/widgets/itemviews/stardelegate/stardelegate.py @@ -41,7 +41,7 @@ ## ############################################################################# -from PySide2.QtWidgets import QStyledItemDelegate, QStyle +from PySide6.QtWidgets import QStyledItemDelegate, QStyle from starrating import StarRating from stareditor import StarEditor @@ -139,7 +139,7 @@ class StarDelegate(QStyledItemDelegate): if __name__ == "__main__": """ Run the application. """ - from PySide2.QtWidgets import (QApplication, QTableWidget, QTableWidgetItem, + from PySide6.QtWidgets import (QApplication, QTableWidget, QTableWidgetItem, QAbstractItemView) import sys diff --git a/examples/widgets/itemviews/stardelegate/stareditor.py b/examples/widgets/itemviews/stardelegate/stareditor.py index 820aba8bf..f99ab9ca6 100644 --- a/examples/widgets/itemviews/stardelegate/stareditor.py +++ b/examples/widgets/itemviews/stardelegate/stareditor.py @@ -41,9 +41,9 @@ ## ############################################################################# -from PySide2.QtWidgets import (QWidget) -from PySide2.QtGui import (QPainter) -from PySide2.QtCore import Signal +from PySide6.QtWidgets import (QWidget) +from PySide6.QtGui import (QPainter) +from PySide6.QtCore import Signal from starrating import StarRating diff --git a/examples/widgets/itemviews/stardelegate/starrating.py b/examples/widgets/itemviews/stardelegate/starrating.py index d40b382f4..7e87389c9 100644 --- a/examples/widgets/itemviews/stardelegate/starrating.py +++ b/examples/widgets/itemviews/stardelegate/starrating.py @@ -43,8 +43,8 @@ from math import (cos, sin, pi) -from PySide2.QtGui import (QPainter, QPolygonF) -from PySide2.QtCore import (QPointF, QSize, Qt) +from PySide6.QtGui import (QPainter, QPolygonF) +from PySide6.QtCore import (QPointF, QSize, Qt) PAINTING_SCALE_FACTOR = 20 diff --git a/examples/widgets/layouts/basiclayouts.py b/examples/widgets/layouts/basiclayouts.py index 565ce728d..25a9b7760 100644 --- a/examples/widgets/layouts/basiclayouts.py +++ b/examples/widgets/layouts/basiclayouts.py @@ -40,9 +40,9 @@ ## ############################################################################# -"""PySide2 port of the widgets/layouts/basiclayout example from Qt v5.x""" +"""PySide6 port of the widgets/layouts/basiclayout example from Qt v5.x""" -from PySide2 import QtWidgets +from PySide6 import QtWidgets class Dialog(QtWidgets.QDialog): diff --git a/examples/widgets/layouts/dynamiclayouts.py b/examples/widgets/layouts/dynamiclayouts.py index 5ae7113ee..5d2f2babe 100644 --- a/examples/widgets/layouts/dynamiclayouts.py +++ b/examples/widgets/layouts/dynamiclayouts.py @@ -40,10 +40,10 @@ ## ############################################################################# -"""PySide2 port of the widgets/layouts/dynamiclayouts example from Qt v5.x""" +"""PySide6 port of the widgets/layouts/dynamiclayouts example from Qt v5.x""" -from PySide2.QtCore import Qt, QSize -from PySide2.QtWidgets import (QApplication, QDialog, QLayout, QGridLayout, +from PySide6.QtCore import Qt, QSize +from PySide6.QtWidgets import (QApplication, QDialog, QLayout, QGridLayout, QMessageBox, QGroupBox, QSpinBox, QSlider, QProgressBar, QDial, QDialogButtonBox, QComboBox, QLabel) diff --git a/examples/widgets/layouts/flowlayout.py b/examples/widgets/layouts/flowlayout.py index 970d5ac07..8f4d41480 100644 --- a/examples/widgets/layouts/flowlayout.py +++ b/examples/widgets/layouts/flowlayout.py @@ -40,11 +40,11 @@ ## ############################################################################# -"""PySide2 port of the widgets/layouts/flowlayout example from Qt v5.x""" +"""PySide6 port of the widgets/layouts/flowlayout example from Qt v5.x""" import sys -from PySide2.QtCore import Qt, QMargins, QPoint, QRect, QSize -from PySide2.QtWidgets import (QApplication, QLayout, QPushButton, +from PySide6.QtCore import Qt, QMargins, QPoint, QRect, QSize +from PySide6.QtWidgets import (QApplication, QLayout, QPushButton, QSizePolicy, QWidget) diff --git a/examples/widgets/mainwindows/application/application.py b/examples/widgets/mainwindows/application/application.py index d68e77b41..4fddff5c1 100644 --- a/examples/widgets/mainwindows/application/application.py +++ b/examples/widgets/mainwindows/application/application.py @@ -40,7 +40,7 @@ ## ############################################################################# -from PySide2 import QtCore, QtGui, QtWidgets +from PySide6 import QtCore, QtGui, QtWidgets import application_rc diff --git a/examples/widgets/mainwindows/application/application_rc.py b/examples/widgets/mainwindows/application/application_rc.py index 2a392bea7..ad79e2ead 100644 --- a/examples/widgets/mainwindows/application/application_rc.py +++ b/examples/widgets/mainwindows/application/application_rc.py @@ -3,7 +3,7 @@ # Created by: The Resource Compiler for Qt version 5.14.0 # WARNING! All changes made in this file will be lost! -from PySide2 import QtCore +from PySide6 import QtCore qt_resource_data = b"\ \x00\x00\x04\xa3\ diff --git a/examples/widgets/mainwindows/dockwidgets/dockwidgets.py b/examples/widgets/mainwindows/dockwidgets/dockwidgets.py index 87a818c05..910f0aa73 100644 --- a/examples/widgets/mainwindows/dockwidgets/dockwidgets.py +++ b/examples/widgets/mainwindows/dockwidgets/dockwidgets.py @@ -40,13 +40,13 @@ ## ############################################################################# -"""PySide2 port of the widgets/mainwindows/dockwidgets example from Qt v5.x, originating from PyQt""" +"""PySide6 port of the widgets/mainwindows/dockwidgets example from Qt v5.x, originating from PyQt""" -from PySide2.QtCore import QDate, QFile, Qt, QTextStream -from PySide2.QtGui import (QAction, QFont, QIcon, QKeySequence, +from PySide6.QtCore import QDate, QFile, Qt, QTextStream +from PySide6.QtGui import (QAction, QFont, QIcon, QKeySequence, QTextCharFormat, QTextCursor, QTextTableFormat) -from PySide2.QtPrintSupport import QPrintDialog, QPrinter -from PySide2.QtWidgets import (QApplication, QDialog, QDockWidget, +from PySide6.QtPrintSupport import QPrintDialog, QPrinter +from PySide6.QtWidgets import (QApplication, QDialog, QDockWidget, QFileDialog, QListWidget, QMainWindow, QMessageBox, QTextEdit) import dockwidgets_rc diff --git a/examples/widgets/mainwindows/dockwidgets/dockwidgets_rc.py b/examples/widgets/mainwindows/dockwidgets/dockwidgets_rc.py index 35b13db2b..a6052b3b2 100644 --- a/examples/widgets/mainwindows/dockwidgets/dockwidgets_rc.py +++ b/examples/widgets/mainwindows/dockwidgets/dockwidgets_rc.py @@ -3,7 +3,7 @@ # Created by: The Resource Compiler for Qt version 5.14.0 # WARNING! All changes made in this file will be lost! -from PySide2 import QtCore +from PySide6 import QtCore qt_resource_data = b"\ \x00\x00\x06\xc4\ diff --git a/examples/widgets/mainwindows/mdi/mdi.py b/examples/widgets/mainwindows/mdi/mdi.py index 18bbfa5fb..0a71b5296 100644 --- a/examples/widgets/mainwindows/mdi/mdi.py +++ b/examples/widgets/mainwindows/mdi/mdi.py @@ -40,12 +40,12 @@ ## ############################################################################# -"""PySide2 port of the widgets/draganddrop/draggabletext example from Qt v5.x, originating from PyQt""" +"""PySide6 port of the widgets/draganddrop/draggabletext example from Qt v5.x, originating from PyQt""" -from PySide2.QtCore import (QFile, QFileInfo, QPoint, QSettings, QSignalMapper, +from PySide6.QtCore import (QFile, QFileInfo, QPoint, QSettings, QSignalMapper, QSaveFile, QSize, QTextStream, Qt) -from PySide2.QtGui import QAction, QIcon, QKeySequence -from PySide2.QtWidgets import (QApplication, QFileDialog, QMainWindow, +from PySide6.QtGui import QAction, QIcon, QKeySequence +from PySide6.QtWidgets import (QApplication, QFileDialog, QMainWindow, QMdiArea, QMessageBox, QTextEdit, QWidget) import mdi_rc diff --git a/examples/widgets/mainwindows/mdi/mdi_rc.py b/examples/widgets/mainwindows/mdi/mdi_rc.py index 2a392bea7..ad79e2ead 100644 --- a/examples/widgets/mainwindows/mdi/mdi_rc.py +++ b/examples/widgets/mainwindows/mdi/mdi_rc.py @@ -3,7 +3,7 @@ # Created by: The Resource Compiler for Qt version 5.14.0 # WARNING! All changes made in this file will be lost! -from PySide2 import QtCore +from PySide6 import QtCore qt_resource_data = b"\ \x00\x00\x04\xa3\ diff --git a/examples/widgets/painting/basicdrawing/basicdrawing.py b/examples/widgets/painting/basicdrawing/basicdrawing.py index f92da1bd7..9134ae49e 100644 --- a/examples/widgets/painting/basicdrawing/basicdrawing.py +++ b/examples/widgets/painting/basicdrawing/basicdrawing.py @@ -40,12 +40,12 @@ ## ############################################################################# -"""PySide2 port of the widgets/painting/basicdrawing example from Qt v5.x, originating from PyQt""" +"""PySide6 port of the widgets/painting/basicdrawing example from Qt v5.x, originating from PyQt""" -from PySide2.QtCore import QPoint, QRect, QSize, Qt, qVersion -from PySide2.QtGui import (QBrush, QConicalGradient, QLinearGradient, QPainter, +from PySide6.QtCore import QPoint, QRect, QSize, Qt, qVersion +from PySide6.QtGui import (QBrush, QConicalGradient, QLinearGradient, QPainter, QPainterPath, QPalette, QPen, QPixmap, QPolygon, QRadialGradient) -from PySide2.QtWidgets import (QApplication, QCheckBox, QComboBox, QGridLayout, +from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QGridLayout, QLabel, QSpinBox, QWidget) import basicdrawing_rc diff --git a/examples/widgets/painting/basicdrawing/basicdrawing_rc.py b/examples/widgets/painting/basicdrawing/basicdrawing_rc.py index 3a5480568..19e2b3b7a 100644 --- a/examples/widgets/painting/basicdrawing/basicdrawing_rc.py +++ b/examples/widgets/painting/basicdrawing/basicdrawing_rc.py @@ -3,7 +3,7 @@ # Created by: The Resource Compiler for Qt version 5.14.0 # WARNING! All changes made in this file will be lost! -from PySide2 import QtCore +from PySide6 import QtCore qt_resource_data = b"\ \x00\x00\x03X\ diff --git a/examples/widgets/painting/concentriccircles.py b/examples/widgets/painting/concentriccircles.py index ff13292d2..08520b063 100644 --- a/examples/widgets/painting/concentriccircles.py +++ b/examples/widgets/painting/concentriccircles.py @@ -40,11 +40,11 @@ ## ############################################################################# -"""PySide2 port of the widgets/painting/concentriccircles example from Qt v5.x, originating from PyQt""" +"""PySide6 port of the widgets/painting/concentriccircles example from Qt v5.x, originating from PyQt""" -from PySide2.QtCore import QRect, QRectF, QSize, Qt, QTimer -from PySide2.QtGui import QColor, QPainter, QPalette, QPen -from PySide2.QtWidgets import (QApplication, QFrame, QGridLayout, QLabel, +from PySide6.QtCore import QRect, QRectF, QSize, Qt, QTimer +from PySide6.QtGui import QColor, QPainter, QPalette, QPen +from PySide6.QtWidgets import (QApplication, QFrame, QGridLayout, QLabel, QSizePolicy, QWidget) diff --git a/examples/widgets/richtext/orderform.py b/examples/widgets/richtext/orderform.py index 7c0d273d2..ed7b29d61 100644 --- a/examples/widgets/richtext/orderform.py +++ b/examples/widgets/richtext/orderform.py @@ -40,9 +40,9 @@ ## ############################################################################# -"""PySide2 port of the widgets/richtext/orderform example from Qt v5.x""" +"""PySide6 port of the widgets/richtext/orderform example from Qt v5.x""" -from PySide2 import QtCore, QtGui, QtWidgets, QtPrintSupport +from PySide6 import QtCore, QtGui, QtWidgets, QtPrintSupport class MainWindow(QtWidgets.QMainWindow): diff --git a/examples/widgets/richtext/syntaxhighlighter.py b/examples/widgets/richtext/syntaxhighlighter.py index 576e8baef..52b3d53b8 100644 --- a/examples/widgets/richtext/syntaxhighlighter.py +++ b/examples/widgets/richtext/syntaxhighlighter.py @@ -40,9 +40,9 @@ ## ############################################################################# -"""PySide2 port of the widgets/richtext/syntaxhighlighter example from Qt v5.x""" +"""PySide6 port of the widgets/richtext/syntaxhighlighter example from Qt v5.x""" -from PySide2 import QtCore, QtGui, QtWidgets +from PySide6 import QtCore, QtGui, QtWidgets class MainWindow(QtWidgets.QMainWindow): diff --git a/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.py b/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.py index 089c434e5..6c21a2a06 100644 --- a/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.py +++ b/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.py @@ -40,14 +40,14 @@ ## ############################################################################# -"""PySide2 port of the widgets/richtext/syntaxhighlighter example from Qt v5.x""" +"""PySide6 port of the widgets/richtext/syntaxhighlighter example from Qt v5.x""" import sys import re -from PySide2.QtCore import (QFile, Qt, QTextStream) -from PySide2.QtGui import (QColor, QFont, QKeySequence, QSyntaxHighlighter, +from PySide6.QtCore import (QFile, Qt, QTextStream) +from PySide6.QtGui import (QColor, QFont, QKeySequence, QSyntaxHighlighter, QTextCharFormat) -from PySide2.QtWidgets import (QApplication, QFileDialog, QMainWindow, +from PySide6.QtWidgets import (QApplication, QFileDialog, QMainWindow, QPlainTextEdit) import syntaxhighlighter_rc diff --git a/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter_rc.py b/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter_rc.py index 34fa7d49e..1e53463a4 100644 --- a/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter_rc.py +++ b/examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter_rc.py @@ -3,7 +3,7 @@ # Created by: The Resource Compiler for Qt version 5.14.0 # WARNING! All changes made in this file will be lost! -from PySide2 import QtCore +from PySide6 import QtCore qt_resource_data = b"\ \x00\x00\x06{\ diff --git a/examples/widgets/richtext/textobject/textobject.py b/examples/widgets/richtext/textobject/textobject.py index b828ea3d0..60abfc19c 100644 --- a/examples/widgets/richtext/textobject/textobject.py +++ b/examples/widgets/richtext/textobject/textobject.py @@ -40,9 +40,9 @@ ## ############################################################################# -"""PySide2 port of the widgets/richtext/textobject example from Qt v5.x""" +"""PySide6 port of the widgets/richtext/textobject example from Qt v5.x""" -from PySide2 import QtCore, QtGui, QtWidgets, QtSvg +from PySide6 import QtCore, QtGui, QtWidgets, QtSvg class SvgTextObject(QtCore.QObject, QtGui.QTextObjectInterface): diff --git a/examples/widgets/state-machine/eventtrans.py b/examples/widgets/state-machine/eventtrans.py index 183f1178e..3445832a0 100644 --- a/examples/widgets/state-machine/eventtrans.py +++ b/examples/widgets/state-machine/eventtrans.py @@ -40,8 +40,8 @@ ## ############################################################################# -from PySide2.QtWidgets import * -from PySide2.QtCore import * +from PySide6.QtWidgets import * +from PySide6.QtCore import * class MainWindow(QMainWindow): def __init__(self): diff --git a/examples/widgets/state-machine/factstates.py b/examples/widgets/state-machine/factstates.py index bd71b204d..64b9613ec 100644 --- a/examples/widgets/state-machine/factstates.py +++ b/examples/widgets/state-machine/factstates.py @@ -40,8 +40,8 @@ ## ############################################################################# -from PySide2.QtWidgets import * -from PySide2.QtCore import * +from PySide6.QtWidgets import * +from PySide6.QtCore import * class Factorial(QObject): xChanged = Signal(int) diff --git a/examples/widgets/state-machine/pingpong.py b/examples/widgets/state-machine/pingpong.py index 84c5cab2a..6d64bebc6 100644 --- a/examples/widgets/state-machine/pingpong.py +++ b/examples/widgets/state-machine/pingpong.py @@ -40,8 +40,8 @@ ## ############################################################################# -from PySide2.QtWidgets import * -from PySide2.QtCore import * +from PySide6.QtWidgets import * +from PySide6.QtCore import * class PingEvent(QEvent): def __init__(self): diff --git a/examples/widgets/state-machine/rogue.py b/examples/widgets/state-machine/rogue.py index ce5b80596..af37b522b 100644 --- a/examples/widgets/state-machine/rogue.py +++ b/examples/widgets/state-machine/rogue.py @@ -40,9 +40,9 @@ ## ############################################################################# -from PySide2.QtWidgets import * -from PySide2.QtGui import * -from PySide2.QtCore import * +from PySide6.QtWidgets import * +from PySide6.QtGui import * +from PySide6.QtCore import * class MovementTransition(QEventTransition): def __init__(self, window): diff --git a/examples/widgets/state-machine/trafficlight.py b/examples/widgets/state-machine/trafficlight.py index 3be9b457f..4aa8d560e 100644 --- a/examples/widgets/state-machine/trafficlight.py +++ b/examples/widgets/state-machine/trafficlight.py @@ -40,9 +40,9 @@ ## ############################################################################# -from PySide2.QtWidgets import * -from PySide2.QtGui import * -from PySide2.QtCore import * +from PySide6.QtWidgets import * +from PySide6.QtGui import * +from PySide6.QtCore import * class LightWidget(QWidget): def __init__(self, color): diff --git a/examples/widgets/state-machine/twowaybutton.py b/examples/widgets/state-machine/twowaybutton.py index 27ed58e4d..44a011d69 100644 --- a/examples/widgets/state-machine/twowaybutton.py +++ b/examples/widgets/state-machine/twowaybutton.py @@ -40,8 +40,8 @@ ## ############################################################################# -from PySide2.QtWidgets import * -from PySide2.QtCore import * +from PySide6.QtWidgets import * +from PySide6.QtCore import * if __name__ == '__main__': import sys diff --git a/examples/widgets/systray/main.py b/examples/widgets/systray/main.py index 4fad002a6..58acbb93b 100644 --- a/examples/widgets/systray/main.py +++ b/examples/widgets/systray/main.py @@ -40,7 +40,7 @@ import sys -from PySide2.QtWidgets import QApplication, QMessageBox, QSystemTrayIcon +from PySide6.QtWidgets import QApplication, QMessageBox, QSystemTrayIcon from window import Window diff --git a/examples/widgets/systray/rc_systray.py b/examples/widgets/systray/rc_systray.py index 2d59adc74..bc4779646 100644 --- a/examples/widgets/systray/rc_systray.py +++ b/examples/widgets/systray/rc_systray.py @@ -3,7 +3,7 @@ # Created by: The Resource Compiler for Qt version 5.15.0 # WARNING! All changes made in this file will be lost! -from PySide2 import QtCore +from PySide6 import QtCore qt_resource_data = b"\ \x00\x00d\xb4\ diff --git a/examples/widgets/systray/window.py b/examples/widgets/systray/window.py index 634646327..f1b8eec11 100644 --- a/examples/widgets/systray/window.py +++ b/examples/widgets/systray/window.py @@ -38,9 +38,9 @@ ## ############################################################################# -from PySide2.QtCore import Slot -from PySide2.QtGui import QAction, QIcon -from PySide2.QtWidgets import (QCheckBox, QComboBox, QDialog, +from PySide6.QtCore import Slot +from PySide6.QtGui import QAction, QIcon +from PySide6.QtWidgets import (QCheckBox, QComboBox, QDialog, QGridLayout, QGroupBox, QHBoxLayout, QLabel, QLineEdit, QMenu, QMessageBox, QPushButton, QSpinBox, QStyle, QSystemTrayIcon, QTextEdit, diff --git a/examples/widgets/threads/thread_signals.py b/examples/widgets/threads/thread_signals.py index d63040491..6a3b0ee08 100644 --- a/examples/widgets/threads/thread_signals.py +++ b/examples/widgets/threads/thread_signals.py @@ -40,8 +40,8 @@ ############################################################################# import sys -from PySide2.QtCore import QObject, QThread, Signal, Slot -from PySide2.QtWidgets import QApplication, QPushButton, QVBoxLayout, QWidget +from PySide6.QtCore import QObject, QThread, Signal, Slot +from PySide6.QtWidgets import QApplication, QPushButton, QVBoxLayout, QWidget # Create a basic window with a layout and a button diff --git a/examples/widgets/tutorials/addressbook/part1.py b/examples/widgets/tutorials/addressbook/part1.py index 895873036..a8356a7b5 100644 --- a/examples/widgets/tutorials/addressbook/part1.py +++ b/examples/widgets/tutorials/addressbook/part1.py @@ -40,7 +40,7 @@ ## ############################################################################# -from PySide2 import QtCore, QtWidgets +from PySide6 import QtCore, QtWidgets class AddressBook(QtWidgets.QWidget): diff --git a/examples/widgets/tutorials/addressbook/part2.py b/examples/widgets/tutorials/addressbook/part2.py index 6eac33bfc..92254ce1c 100644 --- a/examples/widgets/tutorials/addressbook/part2.py +++ b/examples/widgets/tutorials/addressbook/part2.py @@ -40,7 +40,7 @@ ## ############################################################################# -from PySide2 import QtCore, QtWidgets +from PySide6 import QtCore, QtWidgets class SortedDict(dict): diff --git a/examples/widgets/tutorials/addressbook/part3.py b/examples/widgets/tutorials/addressbook/part3.py index d425c11d9..c04b8f2b9 100644 --- a/examples/widgets/tutorials/addressbook/part3.py +++ b/examples/widgets/tutorials/addressbook/part3.py @@ -40,7 +40,7 @@ ## ############################################################################# -from PySide2 import QtCore, QtWidgets +from PySide6 import QtCore, QtWidgets class SortedDict(dict): diff --git a/examples/widgets/tutorials/addressbook/part4.py b/examples/widgets/tutorials/addressbook/part4.py index e4b1d1630..eca0be852 100644 --- a/examples/widgets/tutorials/addressbook/part4.py +++ b/examples/widgets/tutorials/addressbook/part4.py @@ -40,7 +40,7 @@ ## ############################################################################# -from PySide2 import QtCore, QtWidgets +from PySide6 import QtCore, QtWidgets class SortedDict(dict): diff --git a/examples/widgets/tutorials/addressbook/part5.py b/examples/widgets/tutorials/addressbook/part5.py index cb666ff9f..27eb50a82 100644 --- a/examples/widgets/tutorials/addressbook/part5.py +++ b/examples/widgets/tutorials/addressbook/part5.py @@ -40,7 +40,7 @@ ## ############################################################################# -from PySide2 import QtCore, QtWidgets +from PySide6 import QtCore, QtWidgets class SortedDict(dict): diff --git a/examples/widgets/tutorials/addressbook/part6.py b/examples/widgets/tutorials/addressbook/part6.py index 559cc355f..70103380c 100644 --- a/examples/widgets/tutorials/addressbook/part6.py +++ b/examples/widgets/tutorials/addressbook/part6.py @@ -42,7 +42,7 @@ import pickle -from PySide2 import QtCore, QtWidgets +from PySide6 import QtCore, QtWidgets class SortedDict(dict): diff --git a/examples/widgets/tutorials/addressbook/part7.py b/examples/widgets/tutorials/addressbook/part7.py index f32a2a6a8..c6a272636 100644 --- a/examples/widgets/tutorials/addressbook/part7.py +++ b/examples/widgets/tutorials/addressbook/part7.py @@ -42,7 +42,7 @@ import pickle -from PySide2 import QtCore, QtWidgets +from PySide6 import QtCore, QtWidgets class SortedDict(dict): diff --git a/examples/widgets/widgets/tetrix.py b/examples/widgets/widgets/tetrix.py index 134eec4e4..69c6d4bff 100644 --- a/examples/widgets/widgets/tetrix.py +++ b/examples/widgets/widgets/tetrix.py @@ -40,11 +40,11 @@ ## ############################################################################# -"""PySide2 port of the widgets/widgets/tetrix example from Qt v5.x""" +"""PySide6 port of the widgets/widgets/tetrix example from Qt v5.x""" import random -from PySide2 import QtCore, QtGui, QtWidgets +from PySide6 import QtCore, QtGui, QtWidgets NoShape, ZShape, SShape, LineShape, TShape, SquareShape, LShape, MirroredLShape = range(8) -- cgit v1.2.3