aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-11-02 16:11:52 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-11-02 16:12:04 +0000
commit25180730194bec25f915f32ab846ea583fb1493f (patch)
tree9a73e0336ecf21e085d99d6a651c5547b9eb99f8 /examples
parent6e3e7b9ca0548430aaa5e2555d6e02c64625fa3f (diff)
Rename PySide2 to PySide6
Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I845f7b006e9ad274fed5444ec4c1f9dbe176ff88 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/3d/simple3d.py10
-rw-r--r--examples/axcontainer/axviewer.py8
-rw-r--r--examples/charts/audio.py10
-rw-r--r--examples/charts/callout.py10
-rw-r--r--examples/charts/chartthemes/README.md2
-rw-r--r--examples/charts/chartthemes/main.py10
-rw-r--r--examples/charts/chartthemes/ui_themewidget.py6
-rw-r--r--examples/charts/donutbreakdown.py10
-rw-r--r--examples/charts/legend.py10
-rw-r--r--examples/charts/lineandbar.py10
-rw-r--r--examples/charts/linechart.py10
-rw-r--r--examples/charts/logvalueaxis.py10
-rw-r--r--examples/charts/memoryusage.py8
-rw-r--r--examples/charts/modeldata.py10
-rw-r--r--examples/charts/nesteddonuts.py10
-rw-r--r--examples/charts/percentbarchart.py10
-rw-r--r--examples/charts/piechart.py10
-rw-r--r--examples/charts/qmlpolarchart/qmlpolarchart.py8
-rw-r--r--examples/charts/temperaturerecords.py10
-rw-r--r--examples/corelib/threads/mandelbrot.py8
-rw-r--r--examples/corelib/tools/regexp.py4
-rw-r--r--examples/corelib/tools/settingseditor/settingseditor.py8
-rw-r--r--examples/datavisualization/bars3d.py10
-rw-r--r--examples/declarative/extending/chapter1-basics/basics.py10
-rw-r--r--examples/declarative/extending/chapter2-methods/methods.py10
-rw-r--r--examples/declarative/extending/chapter3-bindings/bindings.py10
-rw-r--r--examples/declarative/extending/chapter4-customPropertyTypes/customPropertyTypes.py10
-rw-r--r--examples/declarative/extending/chapter5-listproperties/listproperties.py10
-rw-r--r--examples/declarative/scrolling.py6
-rw-r--r--examples/declarative/signals/pytoqml1/main.py6
-rw-r--r--examples/declarative/signals/qmltopy1/main.py6
-rw-r--r--examples/declarative/signals/qmltopy2/main.py6
-rw-r--r--examples/declarative/signals/qmltopy3/main.py6
-rw-r--r--examples/declarative/signals/qmltopy4/main.py6
-rw-r--r--examples/declarative/textproperties/main.py8
-rw-r--r--examples/declarative/usingmodel.py6
-rw-r--r--examples/external/matplotlib/widget_3dplot.py6
-rw-r--r--examples/external/opencv/webcam_pattern_detection.py6
-rw-r--r--examples/external/scikit/staining_colors_separation.py6
-rw-r--r--examples/installer_test/hello.py4
-rw-r--r--examples/macextras/macpasteboardmime.py4
-rw-r--r--examples/multimedia/audiooutput.py8
-rw-r--r--examples/multimedia/camera.py20
-rw-r--r--examples/multimedia/player.py12
-rw-r--r--examples/network/blockingfortuneclient.py10
-rw-r--r--examples/network/fortuneclient.py4
-rw-r--r--examples/network/fortuneserver.py4
-rw-r--r--examples/network/threadedfortuneserver.py8
-rw-r--r--examples/opengl/contextinfo.py12
-rw-r--r--examples/opengl/hellogl2.py12
-rw-r--r--examples/opengl/textures/textures.py4
-rw-r--r--examples/opengl/textures/textures_rc.py2
-rw-r--r--examples/quick/customitems/painteditem/painteditem.py10
-rw-r--r--examples/remoteobjects/modelview/modelviewclient.py8
-rw-r--r--examples/remoteobjects/modelview/modelviewserver.py10
-rw-r--r--examples/samplebinding/CMakeLists.txt2
-rw-r--r--examples/samplebinding/README.md4
-rw-r--r--examples/scriptableapplication/CMakeLists.txt8
-rw-r--r--examples/scriptableapplication/README.md4
-rw-r--r--examples/sql/books/bookdelegate.py8
-rw-r--r--examples/sql/books/bookwindow.py8
-rw-r--r--examples/sql/books/createdb.py2
-rw-r--r--examples/sql/books/main.py2
-rw-r--r--examples/sql/books/rc_books.py2
-rw-r--r--examples/sql/books/ui_bookwindow.py6
-rw-r--r--examples/texttospeech/texttospeech.py10
-rw-r--r--examples/tutorial/t1.py4
-rw-r--r--examples/tutorial/t10.py4
-rw-r--r--examples/tutorial/t11.py4
-rw-r--r--examples/tutorial/t12.py4
-rw-r--r--examples/tutorial/t13.py4
-rw-r--r--examples/tutorial/t14.py4
-rw-r--r--examples/tutorial/t2.py4
-rw-r--r--examples/tutorial/t3.py4
-rw-r--r--examples/tutorial/t4.py4
-rw-r--r--examples/tutorial/t5.py4
-rw-r--r--examples/tutorial/t6.py4
-rw-r--r--examples/tutorial/t7.py4
-rw-r--r--examples/tutorial/t8.py4
-rw-r--r--examples/tutorial/t9.py4
-rw-r--r--examples/uiloader/uiloader.py6
-rw-r--r--examples/utils/pyside_config.py12
-rw-r--r--examples/webchannel/standalone/core.py2
-rw-r--r--examples/webchannel/standalone/dialog.py4
-rw-r--r--examples/webchannel/standalone/main.py12
-rw-r--r--examples/webchannel/standalone/ui_dialog.py6
-rw-r--r--examples/webchannel/standalone/websocketclientwrapper.py2
-rw-r--r--examples/webchannel/standalone/websockettransport.py4
-rw-r--r--examples/webenginequick/quicknanobrowser.py10
-rw-r--r--examples/webenginewidgets/simplebrowser.py12
-rw-r--r--examples/webenginewidgets/tabbedbrowser/bookmarkwidget.py10
-rw-r--r--examples/webenginewidgets/tabbedbrowser/browsertabwidget.py8
-rw-r--r--examples/webenginewidgets/tabbedbrowser/downloadwidget.py12
-rw-r--r--examples/webenginewidgets/tabbedbrowser/findtoolbar.py10
-rw-r--r--examples/webenginewidgets/tabbedbrowser/historywindow.py4
-rw-r--r--examples/webenginewidgets/tabbedbrowser/main.py14
-rw-r--r--examples/webenginewidgets/tabbedbrowser/webengineview.py4
-rw-r--r--examples/widgetbinding/dialog.py2
-rw-r--r--examples/widgetbinding/main.py2
-rw-r--r--examples/widgetbinding/wigglywidget.py6
-rw-r--r--examples/widgets/animation/animatedtiles/animatedtiles.py2
-rw-r--r--examples/widgets/animation/animatedtiles/animatedtiles_rc.py2
-rw-r--r--examples/widgets/animation/appchooser/appchooser.py2
-rw-r--r--examples/widgets/animation/appchooser/appchooser_rc.py2
-rw-r--r--examples/widgets/animation/easing/easing.py4
-rw-r--r--examples/widgets/animation/easing/easing_rc.py2
-rw-r--r--examples/widgets/animation/easing/ui_form.py6
-rw-r--r--examples/widgets/animation/states/states.py2
-rw-r--r--examples/widgets/animation/states/states_rc.py2
-rw-r--r--examples/widgets/codeeditor/codeeditor.py6
-rw-r--r--examples/widgets/codeeditor/main.py4
-rw-r--r--examples/widgets/dialogs/classwizard/classwizard.py2
-rw-r--r--examples/widgets/dialogs/classwizard/classwizard_rc.py2
-rw-r--r--examples/widgets/dialogs/extension.py4
-rw-r--r--examples/widgets/dialogs/findfiles.py4
-rw-r--r--examples/widgets/dialogs/standarddialogs.py4
-rw-r--r--examples/widgets/dialogs/trivialwizard.py4
-rw-r--r--examples/widgets/draganddrop/draggabletext/draggabletext.py8
-rw-r--r--examples/widgets/draganddrop/draggabletext/draggabletext_rc.py2
-rw-r--r--examples/widgets/effects/lighting.py2
-rw-r--r--examples/widgets/gallery/main.py6
-rw-r--r--examples/widgets/gallery/widgetgallery.py6
-rw-r--r--examples/widgets/graphicsview/anchorlayout.py2
-rw-r--r--examples/widgets/graphicsview/collidingmice/collidingmice.py4
-rw-r--r--examples/widgets/graphicsview/collidingmice/mice_rc.py2
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramscene.py2
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramscene_rc.py2
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/dragdroprobot.py2
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/dragdroprobot_rc.py2
-rw-r--r--examples/widgets/graphicsview/elasticnodes.py2
-rw-r--r--examples/widgets/itemviews/addressbook/adddialogwidget.py6
-rw-r--r--examples/widgets/itemviews/addressbook/addressbook.py8
-rw-r--r--examples/widgets/itemviews/addressbook/addresswidget.py6
-rw-r--r--examples/widgets/itemviews/addressbook/newaddresstab.py6
-rw-r--r--examples/widgets/itemviews/addressbook/tablemodel.py2
-rw-r--r--examples/widgets/itemviews/basicsortfiltermodel.py6
-rw-r--r--examples/widgets/itemviews/fetchmore.py2
-rw-r--r--examples/widgets/itemviews/stardelegate/stardelegate.py4
-rw-r--r--examples/widgets/itemviews/stardelegate/stareditor.py6
-rw-r--r--examples/widgets/itemviews/stardelegate/starrating.py4
-rw-r--r--examples/widgets/layouts/basiclayouts.py4
-rw-r--r--examples/widgets/layouts/dynamiclayouts.py6
-rw-r--r--examples/widgets/layouts/flowlayout.py6
-rw-r--r--examples/widgets/mainwindows/application/application.py2
-rw-r--r--examples/widgets/mainwindows/application/application_rc.py2
-rw-r--r--examples/widgets/mainwindows/dockwidgets/dockwidgets.py10
-rw-r--r--examples/widgets/mainwindows/dockwidgets/dockwidgets_rc.py2
-rw-r--r--examples/widgets/mainwindows/mdi/mdi.py8
-rw-r--r--examples/widgets/mainwindows/mdi/mdi_rc.py2
-rw-r--r--examples/widgets/painting/basicdrawing/basicdrawing.py8
-rw-r--r--examples/widgets/painting/basicdrawing/basicdrawing_rc.py2
-rw-r--r--examples/widgets/painting/concentriccircles.py8
-rw-r--r--examples/widgets/richtext/orderform.py4
-rw-r--r--examples/widgets/richtext/syntaxhighlighter.py4
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.py8
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter_rc.py2
-rw-r--r--examples/widgets/richtext/textobject/textobject.py4
-rw-r--r--examples/widgets/state-machine/eventtrans.py4
-rw-r--r--examples/widgets/state-machine/factstates.py4
-rw-r--r--examples/widgets/state-machine/pingpong.py4
-rw-r--r--examples/widgets/state-machine/rogue.py6
-rw-r--r--examples/widgets/state-machine/trafficlight.py6
-rw-r--r--examples/widgets/state-machine/twowaybutton.py4
-rw-r--r--examples/widgets/systray/main.py2
-rw-r--r--examples/widgets/systray/rc_systray.py2
-rw-r--r--examples/widgets/systray/window.py6
-rw-r--r--examples/widgets/threads/thread_signals.py4
-rw-r--r--examples/widgets/tutorials/addressbook/part1.py2
-rw-r--r--examples/widgets/tutorials/addressbook/part2.py2
-rw-r--r--examples/widgets/tutorials/addressbook/part3.py2
-rw-r--r--examples/widgets/tutorials/addressbook/part4.py2
-rw-r--r--examples/widgets/tutorials/addressbook/part5.py2
-rw-r--r--examples/widgets/tutorials/addressbook/part6.py2
-rw-r--r--examples/widgets/tutorials/addressbook/part7.py2
-rw-r--r--examples/widgets/widgets/tetrix.py4
-rw-r--r--examples/xml/dombookmarks/dombookmarks.py4
176 files changed, 499 insertions, 499 deletions
diff --git a/examples/3d/simple3d.py b/examples/3d/simple3d.py
index cea662a95..3c6ff3bf6 100644
--- a/examples/3d/simple3d.py
+++ b/examples/3d/simple3d.py
@@ -39,13 +39,13 @@
##
#############################################################################
-"""PySide2 port of the qt3d/simple-cpp example from Qt v5.x"""
+"""PySide6 port of the qt3d/simple-cpp example from Qt v5.x"""
import sys
-from PySide2.QtCore import(Property, QObject, QPropertyAnimation, Signal)
-from PySide2.QtGui import (QGuiApplication, QMatrix4x4, QQuaternion, QVector3D)
-from PySide2.Qt3DCore import (Qt3DCore)
-from PySide2.Qt3DExtras import (Qt3DExtras)
+from PySide6.QtCore import(Property, QObject, QPropertyAnimation, Signal)
+from PySide6.QtGui import (QGuiApplication, QMatrix4x4, QQuaternion, QVector3D)
+from PySide6.Qt3DCore import (Qt3DCore)
+from PySide6.Qt3DExtras import (Qt3DExtras)
class OrbitTransformController(QObject):
def __init__(self, parent):
diff --git a/examples/axcontainer/axviewer.py b/examples/axcontainer/axviewer.py
index 50e50ee1c..2bd32ef0b 100644
--- a/examples/axcontainer/axviewer.py
+++ b/examples/axcontainer/axviewer.py
@@ -39,12 +39,12 @@
##
#############################################################################
-"""PySide2 Active Qt Viewer example"""
+"""PySide6 Active Qt Viewer example"""
import sys
-from PySide2.QtAxContainer import QAxSelect, QAxWidget
-from PySide2.QtGui import QAction
-from PySide2.QtWidgets import (QApplication, QDialog,
+from PySide6.QtAxContainer import QAxSelect, QAxWidget
+from PySide6.QtGui import QAction
+from PySide6.QtWidgets import (QApplication, QDialog,
QMainWindow, QMessageBox, QToolBar)
class MainWindow(QMainWindow):
diff --git a/examples/charts/audio.py b/examples/charts/audio.py
index f899ac4c8..6d7b4895a 100644
--- a/examples/charts/audio.py
+++ b/examples/charts/audio.py
@@ -39,14 +39,14 @@
##
#############################################################################
-"""PySide2 port of the charts/audio example from Qt v5.x"""
+"""PySide6 port of the charts/audio example from Qt v5.x"""
import sys
-from PySide2.QtCharts import QtCharts
-from PySide2.QtCore import QPointF
-from PySide2.QtMultimedia import (QAudioDeviceInfo, QAudioFormat,
+from PySide6.QtCharts import QtCharts
+from PySide6.QtCore import QPointF
+from PySide6.QtMultimedia import (QAudioDeviceInfo, QAudioFormat,
QAudioInput)
-from PySide2.QtWidgets import QApplication, QMainWindow, QMessageBox
+from PySide6.QtWidgets import QApplication, QMainWindow, QMessageBox
sampleCount = 2000
resolution = 4
diff --git a/examples/charts/callout.py b/examples/charts/callout.py
index 54e8eaf24..666b2aae5 100644
--- a/examples/charts/callout.py
+++ b/examples/charts/callout.py
@@ -39,14 +39,14 @@
##
#############################################################################
-"""PySide2 port of the Callout example from Qt v5.x"""
+"""PySide6 port of the Callout example from Qt v5.x"""
import sys
-from PySide2.QtWidgets import (QApplication, QGraphicsScene,
+from PySide6.QtWidgets import (QApplication, QGraphicsScene,
QGraphicsView, QGraphicsSimpleTextItem, QGraphicsItem)
-from PySide2.QtCore import Qt, QPointF, QRectF, QRect
-from PySide2.QtCharts import QtCharts
-from PySide2.QtGui import QPainter, QFont, QFontMetrics, QPainterPath, QColor
+from PySide6.QtCore import Qt, QPointF, QRectF, QRect
+from PySide6.QtCharts import QtCharts
+from PySide6.QtGui import QPainter, QFont, QFontMetrics, QPainterPath, QColor
class Callout(QGraphicsItem):
diff --git a/examples/charts/chartthemes/README.md b/examples/charts/chartthemes/README.md
index e11fa93c5..806e391d2 100644
--- a/examples/charts/chartthemes/README.md
+++ b/examples/charts/chartthemes/README.md
@@ -3,7 +3,7 @@
To generated the file `ui_themewidget.py`, the following
command need to be executed:
-`pyside2-uic themewidget.ui > ui_themewidget.py`
+`pyside6-uic themewidget.ui > ui_themewidget.py`
Also, if you modify the UI file, then you would need
to run the previous command again.
diff --git a/examples/charts/chartthemes/main.py b/examples/charts/chartthemes/main.py
index e18e92cf2..423806490 100644
--- a/examples/charts/chartthemes/main.py
+++ b/examples/charts/chartthemes/main.py
@@ -38,14 +38,14 @@
##
#############################################################################
-"""PySide2 port of the Chart Themes example from Qt v5.x"""
+"""PySide6 port of the Chart Themes example from Qt v5.x"""
import sys
-from PySide2.QtCore import QPointF, Qt
-from PySide2.QtGui import QColor, QPainter, QPalette
-from PySide2.QtWidgets import (QApplication, QMainWindow, QSizePolicy,
+from PySide6.QtCore import QPointF, Qt
+from PySide6.QtGui import QColor, QPainter, QPalette
+from PySide6.QtWidgets import (QApplication, QMainWindow, QSizePolicy,
QWidget)
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCharts import QtCharts
from ui_themewidget import Ui_ThemeWidgetForm as ui
diff --git a/examples/charts/chartthemes/ui_themewidget.py b/examples/charts/chartthemes/ui_themewidget.py
index bf6703963..d2fdf55bc 100644
--- a/examples/charts/chartthemes/ui_themewidget.py
+++ b/examples/charts/chartthemes/ui_themewidget.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_ThemeWidgetForm(object):
def setupUi(self, ThemeWidgetForm):
diff --git a/examples/charts/donutbreakdown.py b/examples/charts/donutbreakdown.py
index 712bea577..cde318087 100644
--- a/examples/charts/donutbreakdown.py
+++ b/examples/charts/donutbreakdown.py
@@ -38,14 +38,14 @@
##
#############################################################################
-"""PySide2 port of the Donut Chart Breakdown example from Qt v5.x"""
+"""PySide6 port of the Donut Chart Breakdown example from Qt v5.x"""
import sys
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QColor, QFont, QPainter
-from PySide2.QtWidgets import QApplication, QMainWindow
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QColor, QFont, QPainter
+from PySide6.QtWidgets import QApplication, QMainWindow
+from PySide6.QtCharts import QtCharts
class MainSlice(QtCharts.QPieSlice):
def __init__(self, breakdown_series, parent=None):
diff --git a/examples/charts/legend.py b/examples/charts/legend.py
index 47099e729..b833ccedd 100644
--- a/examples/charts/legend.py
+++ b/examples/charts/legend.py
@@ -38,14 +38,14 @@
##
#############################################################################
-"""PySide2 port of the Legend example from Qt v5.x"""
+"""PySide6 port of the Legend example from Qt v5.x"""
import sys
-from PySide2.QtCore import Qt, QRectF
-from PySide2.QtGui import QBrush, QColor, QPainter, QPen
-from PySide2.QtWidgets import (QApplication, QDoubleSpinBox,
+from PySide6.QtCore import Qt, QRectF
+from PySide6.QtGui import QBrush, QColor, QPainter, QPen
+from PySide6.QtWidgets import (QApplication, QDoubleSpinBox,
QFormLayout, QGridLayout, QGroupBox, QPushButton, QWidget)
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCharts import QtCharts
class MainWidget(QWidget):
def __init__(self, parent=None):
diff --git a/examples/charts/lineandbar.py b/examples/charts/lineandbar.py
index 0a29aa786..e06298e63 100644
--- a/examples/charts/lineandbar.py
+++ b/examples/charts/lineandbar.py
@@ -39,13 +39,13 @@
##
#############################################################################
-"""PySide2 port of the line/bar example from Qt v5.x"""
+"""PySide6 port of the line/bar example from Qt v5.x"""
import sys
-from PySide2.QtCore import QPoint, Qt
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import QMainWindow, QApplication
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCore import QPoint, Qt
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import QMainWindow, QApplication
+from PySide6.QtCharts import QtCharts
class TestChart(QMainWindow):
diff --git a/examples/charts/linechart.py b/examples/charts/linechart.py
index 98d17b35c..7a3e15f60 100644
--- a/examples/charts/linechart.py
+++ b/examples/charts/linechart.py
@@ -38,13 +38,13 @@
##
#############################################################################
-"""PySide2 port of the linechart example from Qt v5.x"""
+"""PySide6 port of the linechart example from Qt v5.x"""
import sys
-from PySide2.QtCore import QPointF
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import QMainWindow, QApplication
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCore import QPointF
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import QMainWindow, QApplication
+from PySide6.QtCharts import QtCharts
class TestChart(QMainWindow):
diff --git a/examples/charts/logvalueaxis.py b/examples/charts/logvalueaxis.py
index 7fb5604cd..37558ecb7 100644
--- a/examples/charts/logvalueaxis.py
+++ b/examples/charts/logvalueaxis.py
@@ -38,15 +38,15 @@
##
#############################################################################
-"""PySide2 port of the Logarithmic Axis Example from Qt v5.x"""
+"""PySide6 port of the Logarithmic Axis Example from Qt v5.x"""
import sys
-from PySide2.QtCore import Qt, QPointF
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import QMainWindow, QApplication
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCore import Qt, QPointF
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import QMainWindow, QApplication
+from PySide6.QtCharts import QtCharts
class TestChart(QMainWindow):
diff --git a/examples/charts/memoryusage.py b/examples/charts/memoryusage.py
index 4954b9cd7..9d7a99311 100644
--- a/examples/charts/memoryusage.py
+++ b/examples/charts/memoryusage.py
@@ -39,13 +39,13 @@
##
#############################################################################
-"""PySide2 Charts example: Simple memory usage viewer"""
+"""PySide6 Charts example: Simple memory usage viewer"""
import os
import sys
-from PySide2.QtCore import QProcess
-from PySide2.QtWidgets import QApplication, QMainWindow
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCore import QProcess
+from PySide6.QtWidgets import QApplication, QMainWindow
+from PySide6.QtCharts import QtCharts
def runProcess(command, arguments):
process = QProcess()
diff --git a/examples/charts/modeldata.py b/examples/charts/modeldata.py
index aa53e74ba..739b73d63 100644
--- a/examples/charts/modeldata.py
+++ b/examples/charts/modeldata.py
@@ -39,16 +39,16 @@
##
#############################################################################
-"""PySide2 port of the Model Data example from Qt v5.x"""
+"""PySide6 port of the Model Data example from Qt v5.x"""
import sys
from random import randrange
-from PySide2.QtCore import QAbstractTableModel, QModelIndex, QRect, Qt
-from PySide2.QtGui import QColor, QPainter
-from PySide2.QtWidgets import (QApplication, QGridLayout, QHeaderView,
+from PySide6.QtCore import QAbstractTableModel, QModelIndex, QRect, Qt
+from PySide6.QtGui import QColor, QPainter
+from PySide6.QtWidgets import (QApplication, QGridLayout, QHeaderView,
QTableView, QWidget)
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCharts import QtCharts
class CustomTableModel(QAbstractTableModel):
def __init__(self):
diff --git a/examples/charts/nesteddonuts.py b/examples/charts/nesteddonuts.py
index 77bbabfc7..09c77d022 100644
--- a/examples/charts/nesteddonuts.py
+++ b/examples/charts/nesteddonuts.py
@@ -39,14 +39,14 @@
##
#############################################################################
-"""PySide2 port of the Nested Donuts example from Qt v5.x"""
+"""PySide6 port of the Nested Donuts example from Qt v5.x"""
import sys
-from PySide2.QtCore import Qt, QTimer
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import QApplication, QGridLayout, QWidget
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCore import Qt, QTimer
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import QApplication, QGridLayout, QWidget
+from PySide6.QtCharts import QtCharts
from random import randrange
from functools import partial
diff --git a/examples/charts/percentbarchart.py b/examples/charts/percentbarchart.py
index 256070e7f..a70cae7cf 100644
--- a/examples/charts/percentbarchart.py
+++ b/examples/charts/percentbarchart.py
@@ -39,13 +39,13 @@
##
#############################################################################
-"""PySide2 port of the Percent Bar Chart example from Qt v5.x"""
+"""PySide6 port of the Percent Bar Chart example from Qt v5.x"""
import sys
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import (QMainWindow, QApplication)
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import (QMainWindow, QApplication)
+from PySide6.QtCharts import QtCharts
class MainWindow(QMainWindow):
def __init__(self):
diff --git a/examples/charts/piechart.py b/examples/charts/piechart.py
index 820da8b91..e1131d96e 100644
--- a/examples/charts/piechart.py
+++ b/examples/charts/piechart.py
@@ -38,13 +38,13 @@
##
#############################################################################
-"""PySide2 port of the Pie Chart Example from Qt v5.x"""
+"""PySide6 port of the Pie Chart Example from Qt v5.x"""
import sys
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QPainter, QPen
-from PySide2.QtWidgets import QMainWindow, QApplication
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QPainter, QPen
+from PySide6.QtWidgets import QMainWindow, QApplication
+from PySide6.QtCharts import QtCharts
class TestChart(QMainWindow):
diff --git a/examples/charts/qmlpolarchart/qmlpolarchart.py b/examples/charts/qmlpolarchart/qmlpolarchart.py
index 4398169b0..006a801f1 100644
--- a/examples/charts/qmlpolarchart/qmlpolarchart.py
+++ b/examples/charts/qmlpolarchart/qmlpolarchart.py
@@ -38,13 +38,13 @@
##
#############################################################################
-"""PySide2 port of the QML Polar Chart Example from Qt v5.x"""
+"""PySide6 port of the QML Polar Chart Example from Qt v5.x"""
import sys
import os
-from PySide2.QtQuick import QQuickView
-from PySide2.QtCore import Qt, QUrl
-from PySide2.QtWidgets import QApplication, QMainWindow
+from PySide6.QtQuick import QQuickView
+from PySide6.QtCore import Qt, QUrl
+from PySide6.QtWidgets import QApplication, QMainWindow
if __name__ == '__main__':
diff --git a/examples/charts/temperaturerecords.py b/examples/charts/temperaturerecords.py
index dfd4dd67c..9c2cad1df 100644
--- a/examples/charts/temperaturerecords.py
+++ b/examples/charts/temperaturerecords.py
@@ -38,13 +38,13 @@
##
#############################################################################
-"""PySide2 port of the Temperature Records example from Qt v5.x"""
+"""PySide6 port of the Temperature Records example from Qt v5.x"""
import sys
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QPainter
-from PySide2.QtWidgets import QMainWindow, QApplication
-from PySide2.QtCharts import QtCharts
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import QMainWindow, QApplication
+from PySide6.QtCharts import QtCharts
class MainWindow(QMainWindow):
diff --git a/examples/corelib/threads/mandelbrot.py b/examples/corelib/threads/mandelbrot.py
index c0ca70d68..2d82cd65a 100644
--- a/examples/corelib/threads/mandelbrot.py
+++ b/examples/corelib/threads/mandelbrot.py
@@ -40,12 +40,12 @@
##
#############################################################################
-"""PySide2 port of the corelib/threads/mandelbrot example from Qt v5.x, originating from PyQt"""
+"""PySide6 port of the corelib/threads/mandelbrot example from Qt v5.x, originating from PyQt"""
-from PySide2.QtCore import (Signal, QMutex, QMutexLocker, QPoint, QSize, Qt,
+from PySide6.QtCore import (Signal, QMutex, QMutexLocker, QPoint, QSize, Qt,
QThread, QWaitCondition)
-from PySide2.QtGui import QColor, QImage, QPainter, QPixmap, qRgb
-from PySide2.QtWidgets import QApplication, QWidget
+from PySide6.QtGui import QColor, QImage, QPainter, QPixmap, qRgb
+from PySide6.QtWidgets import QApplication, QWidget
DefaultCenterX = -0.647011
diff --git a/examples/corelib/tools/regexp.py b/examples/corelib/tools/regexp.py
index 3a953329a..48c03309e 100644
--- a/examples/corelib/tools/regexp.py
+++ b/examples/corelib/tools/regexp.py
@@ -40,9 +40,9 @@
##
#############################################################################
-"""PySide2 port of the widgets/tools/regexp example from Qt v5.x"""
+"""PySide6 port of the widgets/tools/regexp example from Qt v5.x"""
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class RegExpDialog(QtWidgets.QDialog):
diff --git a/examples/corelib/tools/settingseditor/settingseditor.py b/examples/corelib/tools/settingseditor/settingseditor.py
index 121d7cb0e..9e2a2a2d8 100644
--- a/examples/corelib/tools/settingseditor/settingseditor.py
+++ b/examples/corelib/tools/settingseditor/settingseditor.py
@@ -41,15 +41,15 @@
##
#############################################################################
-"""PySide2 port of the widgets/tools/settingseditor example from Qt v5.x"""
+"""PySide6 port of the widgets/tools/settingseditor example from Qt v5.x"""
import sys
-from PySide2.QtCore import (QByteArray, QDate, QDateTime, QDir, QEvent, QPoint,
+from PySide6.QtCore import (QByteArray, QDate, QDateTime, QDir, QEvent, QPoint,
QRect, QRegularExpression, QSettings, QSize, QTime, QTimer, Qt)
-from PySide2.QtGui import (QAction, QColor, QIcon, QIntValidator,
+from PySide6.QtGui import (QAction, QColor, QIcon, QIntValidator,
QDoubleValidator, QRegularExpressionValidator, QValidator)
-from PySide2.QtWidgets import (QAbstractItemView, QApplication,
+from PySide6.QtWidgets import (QAbstractItemView, QApplication,
QCheckBox, QComboBox, QFileDialog, QDialog, QDialogButtonBox, QGridLayout,
QGroupBox, QHeaderView, QInputDialog, QItemDelegate, QLabel, QLineEdit,
QMainWindow, QMessageBox, QStyle, QSpinBox, QStyleOptionViewItem,
diff --git a/examples/datavisualization/bars3d.py b/examples/datavisualization/bars3d.py
index d0a69a802..759983341 100644
--- a/examples/datavisualization/bars3d.py
+++ b/examples/datavisualization/bars3d.py
@@ -39,13 +39,13 @@
##
#############################################################################
-"""PySide2 QtDataVisualization example"""
+"""PySide6 QtDataVisualization example"""
import sys
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtWidgets import QApplication, QSizePolicy, QMainWindow, QWidget
-from PySide2.QtDataVisualization import QtDataVisualization
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtWidgets import QApplication, QSizePolicy, QMainWindow, QWidget
+from PySide6.QtDataVisualization import QtDataVisualization
def dataToBarDataRow(data):
return list(QtDataVisualization.QBarDataItem(d) for d in data)
diff --git a/examples/declarative/extending/chapter1-basics/basics.py b/examples/declarative/extending/chapter1-basics/basics.py
index a604a05bc..c14669908 100644
--- a/examples/declarative/extending/chapter1-basics/basics.py
+++ b/examples/declarative/extending/chapter1-basics/basics.py
@@ -39,15 +39,15 @@
##
#############################################################################
-"""PySide2 port of the qml/tutorials/extending-qml/chapter1-basics example from Qt v5.x"""
+"""PySide6 port of the qml/tutorials/extending-qml/chapter1-basics example from Qt v5.x"""
import os
import sys
-from PySide2.QtCore import Property, Signal, QUrl
-from PySide2.QtGui import QGuiApplication, QPen, QPainter, QColor
-from PySide2.QtQml import qmlRegisterType
-from PySide2.QtQuick import QQuickPaintedItem, QQuickView
+from PySide6.QtCore import Property, Signal, QUrl
+from PySide6.QtGui import QGuiApplication, QPen, QPainter, QColor
+from PySide6.QtQml import qmlRegisterType
+from PySide6.QtQuick import QQuickPaintedItem, QQuickView
class PieChart (QQuickPaintedItem):
def __init__(self, parent = None):
diff --git a/examples/declarative/extending/chapter2-methods/methods.py b/examples/declarative/extending/chapter2-methods/methods.py
index 819d4514a..b10cab324 100644
--- a/examples/declarative/extending/chapter2-methods/methods.py
+++ b/examples/declarative/extending/chapter2-methods/methods.py
@@ -39,15 +39,15 @@
##
#############################################################################
-"""PySide2 port of the qml/tutorials/extending-qml/chapter2-methods example from Qt v5.x"""
+"""PySide6 port of the qml/tutorials/extending-qml/chapter2-methods example from Qt v5.x"""
import os
import sys
-from PySide2.QtCore import Property, Signal, Slot, QUrl, Qt
-from PySide2.QtGui import QGuiApplication, QPen, QPainter, QColor
-from PySide2.QtQml import qmlRegisterType
-from PySide2.QtQuick import QQuickPaintedItem, QQuickView
+from PySide6.QtCore import Property, Signal, Slot, QUrl, Qt
+from PySide6.QtGui import QGuiApplication, QPen, QPainter, QColor
+from PySide6.QtQml import qmlRegisterType
+from PySide6.QtQuick import QQuickPaintedItem, QQuickView
class PieChart (QQuickPaintedItem):
def __init__(self, parent = None):
diff --git a/examples/declarative/extending/chapter3-bindings/bindings.py b/examples/declarative/extending/chapter3-bindings/bindings.py
index 62e19c955..2c1546927 100644
--- a/examples/declarative/extending/chapter3-bindings/bindings.py
+++ b/examples/declarative/extending/chapter3-bindings/bindings.py
@@ -39,15 +39,15 @@
##
#############################################################################
-"""PySide2 port of the qml/tutorials/extending-qml/chapter3-bindings example from Qt v5.x"""
+"""PySide6 port of the qml/tutorials/extending-qml/chapter3-bindings example from Qt v5.x"""
import os
import sys
-from PySide2.QtCore import Property, Signal, Slot, QUrl, Qt
-from PySide2.QtGui import QGuiApplication, QPen, QPainter, QColor
-from PySide2.QtQml import qmlRegisterType
-from PySide2.QtQuick import QQuickPaintedItem, QQuickView
+from PySide6.QtCore import Property, Signal, Slot, QUrl, Qt
+from PySide6.QtGui import QGuiApplication, QPen, QPainter, QColor
+from PySide6.QtQml import qmlRegisterType
+from PySide6.QtQuick import QQuickPaintedItem, QQuickView
class PieChart (QQuickPaintedItem):
def __init__(self, parent = None):
diff --git a/examples/declarative/extending/chapter4-customPropertyTypes/customPropertyTypes.py b/examples/declarative/extending/chapter4-customPropertyTypes/customPropertyTypes.py
index b07aad59b..63c4e4959 100644
--- a/examples/declarative/extending/chapter4-customPropertyTypes/customPropertyTypes.py
+++ b/examples/declarative/extending/chapter4-customPropertyTypes/customPropertyTypes.py
@@ -39,15 +39,15 @@
##
#############################################################################
-"""PySide2 port of the qml/tutorials/extending-qml/chapter4-customPropertyTypes example from Qt v5.x"""
+"""PySide6 port of the qml/tutorials/extending-qml/chapter4-customPropertyTypes example from Qt v5.x"""
import os
import sys
-from PySide2.QtCore import Property, QUrl
-from PySide2.QtGui import QGuiApplication, QPen, QPainter, QColor
-from PySide2.QtQml import qmlRegisterType
-from PySide2.QtQuick import QQuickPaintedItem, QQuickView, QQuickItem
+from PySide6.QtCore import Property, QUrl
+from PySide6.QtGui import QGuiApplication, QPen, QPainter, QColor
+from PySide6.QtQml import qmlRegisterType
+from PySide6.QtQuick import QQuickPaintedItem, QQuickView, QQuickItem
class PieSlice (QQuickPaintedItem):
diff --git a/examples/declarative/extending/chapter5-listproperties/listproperties.py b/examples/declarative/extending/chapter5-listproperties/listproperties.py
index dd3e5c65c..466b3aca1 100644
--- a/examples/declarative/extending/chapter5-listproperties/listproperties.py
+++ b/examples/declarative/extending/chapter5-listproperties/listproperties.py
@@ -39,15 +39,15 @@
##
#############################################################################
-"""PySide2 port of the qml/tutorials/extending-qml/chapter5-listproperties example from Qt v5.x"""
+"""PySide6 port of the qml/tutorials/extending-qml/chapter5-listproperties example from Qt v5.x"""
import os
import sys
-from PySide2.QtCore import Property, QUrl
-from PySide2.QtGui import QGuiApplication, QPen, QPainter, QColor
-from PySide2.QtQml import qmlRegisterType, ListProperty
-from PySide2.QtQuick import QQuickPaintedItem, QQuickView, QQuickItem
+from PySide6.QtCore import Property, QUrl
+from PySide6.QtGui import QGuiApplication, QPen, QPainter, QColor
+from PySide6.QtQml import qmlRegisterType, ListProperty
+from PySide6.QtQuick import QQuickPaintedItem, QQuickView, QQuickItem
class PieSlice (QQuickPaintedItem):
def __init__(self, parent = None):
diff --git a/examples/declarative/scrolling.py b/examples/declarative/scrolling.py
index f4b740e02..63f79a45b 100644
--- a/examples/declarative/scrolling.py
+++ b/examples/declarative/scrolling.py
@@ -41,9 +41,9 @@
import os
import sys
-from PySide2.QtCore import QUrl
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQuick import QQuickView
+from PySide6.QtCore import QUrl
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQuick import QQuickView
# This example uses a QML file to show a scrolling list containing
# all the items listed in dataList.
diff --git a/examples/declarative/signals/pytoqml1/main.py b/examples/declarative/signals/pytoqml1/main.py
index b57809392..c210d7182 100644
--- a/examples/declarative/signals/pytoqml1/main.py
+++ b/examples/declarative/signals/pytoqml1/main.py
@@ -41,9 +41,9 @@
import os
import sys
-from PySide2.QtCore import QTimer, QUrl
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQuick import QQuickView
+from PySide6.QtCore import QTimer, QUrl
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQuick import QQuickView
if __name__ == '__main__':
app = QGuiApplication(sys.argv)
diff --git a/examples/declarative/signals/qmltopy1/main.py b/examples/declarative/signals/qmltopy1/main.py
index a2adfef29..2875cc6cc 100644
--- a/examples/declarative/signals/qmltopy1/main.py
+++ b/examples/declarative/signals/qmltopy1/main.py
@@ -41,9 +41,9 @@
import os
import sys
-from PySide2.QtCore import QObject, QUrl, Slot
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQuick import QQuickView
+from PySide6.QtCore import QObject, QUrl, Slot
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQuick import QQuickView
class Console(QObject):
"""Output stuff on the console."""
diff --git a/examples/declarative/signals/qmltopy2/main.py b/examples/declarative/signals/qmltopy2/main.py
index 0fc6a2225..c0c6a25ef 100644
--- a/examples/declarative/signals/qmltopy2/main.py
+++ b/examples/declarative/signals/qmltopy2/main.py
@@ -41,9 +41,9 @@
import os
import sys
-from PySide2.QtCore import QObject, QUrl, Slot
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQuick import QQuickView
+from PySide6.QtCore import QObject, QUrl, Slot
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQuick import QQuickView
class RotateValue(QObject):
def __init__(self):
diff --git a/examples/declarative/signals/qmltopy3/main.py b/examples/declarative/signals/qmltopy3/main.py
index 0ba50fae8..ada78cc30 100644
--- a/examples/declarative/signals/qmltopy3/main.py
+++ b/examples/declarative/signals/qmltopy3/main.py
@@ -41,9 +41,9 @@
import os
import sys
-from PySide2.QtCore import QUrl
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQuick import QQuickView
+from PySide6.QtCore import QUrl
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQuick import QQuickView
def sayThis(s):
print(s)
diff --git a/examples/declarative/signals/qmltopy4/main.py b/examples/declarative/signals/qmltopy4/main.py
index 278f3526f..865d157f7 100644
--- a/examples/declarative/signals/qmltopy4/main.py
+++ b/examples/declarative/signals/qmltopy4/main.py
@@ -41,9 +41,9 @@
import os
import sys
-from PySide2.QtCore import QObject, QUrl
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQuick import QQuickView
+from PySide6.QtCore import QObject, QUrl
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQuick import QQuickView
def sayThis(s):
print(s)
diff --git a/examples/declarative/textproperties/main.py b/examples/declarative/textproperties/main.py
index 2f9b987d0..3d9944bc8 100644
--- a/examples/declarative/textproperties/main.py
+++ b/examples/declarative/textproperties/main.py
@@ -41,10 +41,10 @@
import sys
from os.path import abspath, dirname, join
-from PySide2.QtCore import QObject, Slot
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQml import QQmlApplicationEngine
-from PySide2.QtQuickControls2 import QQuickStyle
+from PySide6.QtCore import QObject, Slot
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQml import QQmlApplicationEngine
+from PySide6.QtQuickControls2 import QQuickStyle
class Bridge(QObject):
diff --git a/examples/declarative/usingmodel.py b/examples/declarative/usingmodel.py
index 3d5e8be32..a32945a25 100644
--- a/examples/declarative/usingmodel.py
+++ b/examples/declarative/usingmodel.py
@@ -41,9 +41,9 @@
import os
import sys
-from PySide2.QtCore import QAbstractListModel, Qt, QUrl, QByteArray
-from PySide2.QtGui import QGuiApplication
-from PySide2.QtQuick import QQuickView
+from PySide6.QtCore import QAbstractListModel, Qt, QUrl, QByteArray
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQuick import QQuickView
class PersonModel (QAbstractListModel):
MyRole = Qt.UserRole + 1
diff --git a/examples/external/matplotlib/widget_3dplot.py b/examples/external/matplotlib/widget_3dplot.py
index 6f47da31b..874e7e439 100644
--- a/examples/external/matplotlib/widget_3dplot.py
+++ b/examples/external/matplotlib/widget_3dplot.py
@@ -44,9 +44,9 @@ import numpy as np
from matplotlib.backends.backend_qt5agg import FigureCanvas
from matplotlib.figure import Figure
from mpl_toolkits.mplot3d import axes3d
-from PySide2.QtCore import Qt, Slot
-from PySide2.QtGui import QAction, QKeySequence
-from PySide2.QtWidgets import (QApplication, QComboBox, QHBoxLayout,
+from PySide6.QtCore import Qt, Slot
+from PySide6.QtGui import QAction, QKeySequence
+from PySide6.QtWidgets import (QApplication, QComboBox, QHBoxLayout,
QHeaderView, QLabel, QMainWindow, QSlider,
QTableWidget, QTableWidgetItem, QVBoxLayout,
QWidget)
diff --git a/examples/external/opencv/webcam_pattern_detection.py b/examples/external/opencv/webcam_pattern_detection.py
index 664ba2111..4325fc810 100644
--- a/examples/external/opencv/webcam_pattern_detection.py
+++ b/examples/external/opencv/webcam_pattern_detection.py
@@ -43,9 +43,9 @@ import sys
import time
import cv2
-from PySide2.QtCore import Qt, QThread, Signal, Slot
-from PySide2.QtGui import QAction, QImage, QKeySequence, QPixmap
-from PySide2.QtWidgets import (QApplication, QComboBox, QGroupBox,
+from PySide6.QtCore import Qt, QThread, Signal, Slot
+from PySide6.QtGui import QAction, QImage, QKeySequence, QPixmap
+from PySide6.QtWidgets import (QApplication, QComboBox, QGroupBox,
QHBoxLayout, QLabel, QMainWindow, QPushButton,
QSizePolicy, QVBoxLayout, QWidget)
diff --git a/examples/external/scikit/staining_colors_separation.py b/examples/external/scikit/staining_colors_separation.py
index d21453927..4395aba13 100644
--- a/examples/external/scikit/staining_colors_separation.py
+++ b/examples/external/scikit/staining_colors_separation.py
@@ -44,9 +44,9 @@ import numpy as np
from matplotlib.backends.backend_qt5agg import FigureCanvas
from matplotlib.colors import LinearSegmentedColormap
from matplotlib.figure import Figure
-from PySide2.QtCore import Qt, Slot
-from PySide2.QtGui import QAction, QKeySequence
-from PySide2.QtWidgets import (QApplication, QHBoxLayout, QLabel,
+from PySide6.QtCore import Qt, Slot
+from PySide6.QtGui import QAction, QKeySequence
+from PySide6.QtWidgets import (QApplication, QHBoxLayout, QLabel,
QMainWindow, QPushButton, QSizePolicy,
QVBoxLayout, QWidget)
from skimage import data
diff --git a/examples/installer_test/hello.py b/examples/installer_test/hello.py
index c03fe1311..7a8811158 100644
--- a/examples/installer_test/hello.py
+++ b/examples/installer_test/hello.py
@@ -57,9 +57,9 @@ import random
import platform
import time
-from PySide2.QtWidgets import (QApplication, QLabel, QPushButton,
+from PySide6.QtWidgets import (QApplication, QLabel, QPushButton,
QVBoxLayout, QWidget)
-from PySide2.QtCore import Slot, Qt, QTimer
+from PySide6.QtCore import Slot, Qt, QTimer
class MyWidget(QWidget):
def __init__(self):
diff --git a/examples/macextras/macpasteboardmime.py b/examples/macextras/macpasteboardmime.py
index c8513395b..3da05a313 100644
--- a/examples/macextras/macpasteboardmime.py
+++ b/examples/macextras/macpasteboardmime.py
@@ -40,10 +40,10 @@
############################################################################
import sys
-from PySide2 import QtCore, QtWidgets
+from PySide6 import QtCore, QtWidgets
try:
- from PySide2 import QtMacExtras
+ from PySide6 import QtMacExtras
except ImportError:
app = QtWidgets.QApplication(sys.argv)
messageBox = QtWidgets.QMessageBox(QtWidgets.QMessageBox.Critical, "QtMacExtras macpasteboardmime",
diff --git a/examples/multimedia/audiooutput.py b/examples/multimedia/audiooutput.py
index c6c7b9f93..44c0f6910 100644
--- a/examples/multimedia/audiooutput.py
+++ b/examples/multimedia/audiooutput.py
@@ -40,15 +40,15 @@
##
#############################################################################
-"""PySide2 port of the multimedia/audiooutput example from Qt v5.x, originating from PyQt"""
+"""PySide6 port of the multimedia/audiooutput example from Qt v5.x, originating from PyQt"""
from math import pi, sin
from struct import pack
-from PySide2.QtCore import QByteArray, QIODevice, Qt, QTimer, qWarning
-from PySide2.QtMultimedia import (QAudio, QAudioDeviceInfo, QAudioFormat,
+from PySide6.QtCore import QByteArray, QIODevice, Qt, QTimer, qWarning
+from PySide6.QtMultimedia import (QAudio, QAudioDeviceInfo, QAudioFormat,
QAudioOutput)
-from PySide2.QtWidgets import (QApplication, QComboBox, QHBoxLayout, QLabel,
+from PySide6.QtWidgets import (QApplication, QComboBox, QHBoxLayout, QLabel,
QMainWindow, QPushButton, QSlider, QVBoxLayout, QWidget)
diff --git a/examples/multimedia/camera.py b/examples/multimedia/camera.py
index 644b5340c..e8e95b7ee 100644
--- a/examples/multimedia/camera.py
+++ b/examples/multimedia/camera.py
@@ -39,16 +39,16 @@
##
#############################################################################
-"""PySide2 Multimedia Camera Example"""
+"""PySide6 Multimedia Camera Example"""
import os, sys
-from PySide2.QtCore import QDate, QDir, QStandardPaths, Qt, QUrl
-from PySide2.QtGui import QAction, QGuiApplication, QDesktopServices, QIcon
-from PySide2.QtGui import QImage, QPixmap
-from PySide2.QtWidgets import (QApplication, QHBoxLayout, QLabel,
+from PySide6.QtCore import QDate, QDir, QStandardPaths, Qt, QUrl
+from PySide6.QtGui import QAction, QGuiApplication, QDesktopServices, QIcon
+from PySide6.QtGui import QImage, QPixmap
+from PySide6.QtWidgets import (QApplication, QHBoxLayout, QLabel,
QMainWindow, QPushButton, QTabWidget, QToolBar, QVBoxLayout, QWidget)
-from PySide2.QtMultimedia import QCamera, QCameraImageCapture, QCameraInfo
-from PySide2.QtMultimediaWidgets import QCameraViewfinder
+from PySide6.QtMultimedia import QCamera, QCameraImageCapture, QCameraInfo
+from PySide6.QtMultimediaWidgets import QCameraViewfinder
class ImageView(QWidget):
def __init__(self, previewImage, fileName):
@@ -125,18 +125,18 @@ class MainWindow(QMainWindow):
if self.camera.status() != QCamera.UnavailableStatus:
name = self.cameraInfo.description()
- self.setWindowTitle("PySide2 Camera Example (" + name + ")")
+ self.setWindowTitle("PySide6 Camera Example (" + name + ")")
self.statusBar().showMessage("Starting: '" + name + "'", 5000)
self.camera.start()
else:
- self.setWindowTitle("PySide2 Camera Example")
+ self.setWindowTitle("PySide6 Camera Example")
self.takePictureAction.setEnabled(False)
self.statusBar().showMessage("Camera unavailable", 5000)
def nextImageFileName(self):
picturesLocation = QStandardPaths.writableLocation(QStandardPaths.PicturesLocation)
dateString = QDate.currentDate().toString("yyyyMMdd")
- pattern = picturesLocation + "/pyside2_camera_" + dateString + "_{:03d}.jpg"
+ pattern = picturesLocation + "/pyside6_camera_" + dateString + "_{:03d}.jpg"
n = 1
while True:
result = pattern.format(n)
diff --git a/examples/multimedia/player.py b/examples/multimedia/player.py
index 762d26b7e..bffcb3906 100644
--- a/examples/multimedia/player.py
+++ b/examples/multimedia/player.py
@@ -39,15 +39,15 @@
##
#############################################################################
-"""PySide2 Multimedia player example"""
+"""PySide6 Multimedia player example"""
import sys
-from PySide2.QtCore import QStandardPaths, Qt
-from PySide2.QtGui import QAction, QIcon, QKeySequence
-from PySide2.QtWidgets import (QApplication, QDialog, QFileDialog,
+from PySide6.QtCore import QStandardPaths, Qt
+from PySide6.QtGui import QAction, QIcon, QKeySequence
+from PySide6.QtWidgets import (QApplication, QDialog, QFileDialog,
QMainWindow, QSlider, QStyle, QToolBar)
-from PySide2.QtMultimedia import QMediaPlayer, QMediaPlaylist
-from PySide2.QtMultimediaWidgets import QVideoWidget
+from PySide6.QtMultimedia import QMediaPlayer, QMediaPlaylist
+from PySide6.QtMultimediaWidgets import QVideoWidget
class MainWindow(QMainWindow):
diff --git a/examples/network/blockingfortuneclient.py b/examples/network/blockingfortuneclient.py
index 028c05c8f..4ee0ce622 100644
--- a/examples/network/blockingfortuneclient.py
+++ b/examples/network/blockingfortuneclient.py
@@ -40,14 +40,14 @@
##
#############################################################################
-"""PySide2 port of the network/blockingfortunclient example from Qt v5.x, originating from PyQt"""
+"""PySide6 port of the network/blockingfortunclient example from Qt v5.x, originating from PyQt"""
-from PySide2.QtCore import (Signal, QDataStream, QMutex, QMutexLocker,
+from PySide6.QtCore import (Signal, QDataStream, QMutex, QMutexLocker,
QThread, QWaitCondition)
-from PySide2.QtGui import QIntValidator
-from PySide2.QtWidgets import (QApplication, QDialogButtonBox, QGridLayout,
+from PySide6.QtGui import QIntValidator
+from PySide6.QtWidgets import (QApplication, QDialogButtonBox, QGridLayout,
QLabel, QLineEdit, QMessageBox, QPushButton, QWidget)
-from PySide2.QtNetwork import (QAbstractSocket, QHostAddress, QNetworkInterface,
+from PySide6.QtNetwork import (QAbstractSocket, QHostAddress, QNetworkInterface,
QTcpSocket)
diff --git a/examples/network/fortuneclient.py b/examples/network/fortuneclient.py
index ee4bc5670..99ca41b0e 100644
--- a/examples/network/fortuneclient.py
+++ b/examples/network/fortuneclient.py
@@ -40,9 +40,9 @@
##
#############################################################################
-"""PySide2 port of the network/fortuneclient example from Qt v5.x"""
+"""PySide6 port of the network/fortuneclient example from Qt v5.x"""
-from PySide2 import QtCore, QtGui, QtWidgets, QtNetwork
+from PySide6 import QtCore, QtGui, QtWidgets, QtNetwork
class Client(QtWidgets.QDialog):
diff --git a/examples/network/fortuneserver.py b/examples/network/fortuneserver.py
index 790e9df68..7b8f05a32 100644
--- a/examples/network/fortuneserver.py
+++ b/examples/network/fortuneserver.py
@@ -40,11 +40,11 @@
##
#############################################################################
-"""PySide2 port of the network/fortuneserver example from Qt v5.x"""
+"""PySide6 port of the network/fortuneserver example from Qt v5.x"""
import random
-from PySide2 import QtCore, QtWidgets, QtNetwork
+from PySide6 import QtCore, QtWidgets, QtNetwork
class Server(QtWidgets.QDialog):
diff --git a/examples/network/threadedfortuneserver.py b/examples/network/threadedfortuneserver.py
index c16c77a27..839a2a57e 100644
--- a/examples/network/threadedfortuneserver.py
+++ b/examples/network/threadedfortuneserver.py
@@ -40,15 +40,15 @@
##
#############################################################################
-"""PySide2 port of the network/threadedfortuneserver example from Qt v5.x, originating from PyQt"""
+"""PySide6 port of the network/threadedfortuneserver example from Qt v5.x, originating from PyQt"""
import random
-from PySide2.QtCore import (Signal, QByteArray, QDataStream, QIODevice,
+from PySide6.QtCore import (Signal, QByteArray, QDataStream, QIODevice,
QThread, Qt)
-from PySide2.QtWidgets import (QApplication, QDialog, QHBoxLayout, QLabel,
+from PySide6.QtWidgets import (QApplication, QDialog, QHBoxLayout, QLabel,
QMessageBox, QPushButton, QVBoxLayout)
-from PySide2.QtNetwork import (QHostAddress, QNetworkInterface, QTcpServer,
+from PySide6.QtNetwork import (QHostAddress, QNetworkInterface, QTcpServer,
QTcpSocket)
diff --git a/examples/opengl/contextinfo.py b/examples/opengl/contextinfo.py
index fce400e70..0a686d388 100644
--- a/examples/opengl/contextinfo.py
+++ b/examples/opengl/contextinfo.py
@@ -39,7 +39,7 @@
##
#############################################################################
-"""PySide2 port of the opengl/contextinfo example from Qt v5.x"""
+"""PySide6 port of the opengl/contextinfo example from Qt v5.x"""
from argparse import ArgumentParser, RawTextHelpFormatter
import numpy
@@ -47,13 +47,13 @@ import sys
from textwrap import dedent
-from PySide2.QtCore import QCoreApplication, QLibraryInfo, QSize, QTimer, Qt
-from PySide2.QtGui import (QMatrix4x4, QOpenGLContext, QSurfaceFormat, QWindow)
-from PySide2.QtOpenGL import (QOpenGLBuffer, QOpenGLShader,
+from PySide6.QtCore import QCoreApplication, QLibraryInfo, QSize, QTimer, Qt
+from PySide6.QtGui import (QMatrix4x4, QOpenGLContext, QSurfaceFormat, QWindow)
+from PySide6.QtOpenGL import (QOpenGLBuffer, QOpenGLShader,
QOpenGLShaderProgram, QOpenGLVertexArrayObject)
-from PySide2.QtWidgets import (QApplication, QHBoxLayout, QMessageBox, QPlainTextEdit,
+from PySide6.QtWidgets import (QApplication, QHBoxLayout, QMessageBox, QPlainTextEdit,
QWidget)
-from PySide2.support import VoidPtr
+from PySide6.support import VoidPtr
try:
from OpenGL import GL
except ImportError:
diff --git a/examples/opengl/hellogl2.py b/examples/opengl/hellogl2.py
index fd5d79be3..bcffdf3c9 100644
--- a/examples/opengl/hellogl2.py
+++ b/examples/opengl/hellogl2.py
@@ -40,20 +40,20 @@
##
############################################################################
-"""PySide2 port of the opengl/hellogl2 example from Qt v5.x"""
+"""PySide6 port of the opengl/hellogl2 example from Qt v5.x"""
import sys
import math
import numpy
import ctypes
-from PySide2.QtCore import QCoreApplication, Signal, SIGNAL, SLOT, Qt, QSize, QPoint
-from PySide2.QtGui import (QVector3D, QOpenGLFunctions,
+from PySide6.QtCore import QCoreApplication, Signal, SIGNAL, SLOT, Qt, QSize, QPoint
+from PySide6.QtGui import (QVector3D, QOpenGLFunctions,
QMatrix4x4, QOpenGLContext, QSurfaceFormat)
-from PySide2.QtOpenGL import (QOpenGLVertexArrayObject, QOpenGLBuffer,
+from PySide6.QtOpenGL import (QOpenGLVertexArrayObject, QOpenGLBuffer,
QOpenGLShaderProgram, QOpenGLShader)
-from PySide2.QtWidgets import (QApplication, QWidget, QMessageBox, QHBoxLayout,
+from PySide6.QtWidgets import (QApplication, QWidget, QMessageBox, QHBoxLayout,
QSlider)
-from PySide2.QtOpenGLWidgets import QOpenGLWidget
+from PySide6.QtOpenGLWidgets import QOpenGLWidget
from shiboken6 import VoidPtr
diff --git a/examples/opengl/textures/textures.py b/examples/opengl/textures/textures.py
index 9730cf078..e7362da1e 100644
--- a/examples/opengl/textures/textures.py
+++ b/examples/opengl/textures/textures.py
@@ -40,10 +40,10 @@
##
############################################################################
-"""PySide2 port of the opengl/textures example from Qt v5.x"""
+"""PySide6 port of the opengl/textures example from Qt v5.x"""
import sys
-from PySide2 import QtCore, QtGui, QtWidgets, QtOpenGL
+from PySide6 import QtCore, QtGui, QtWidgets, QtOpenGL
try:
from OpenGL.GL import *
diff --git a/examples/opengl/textures/textures_rc.py b/examples/opengl/textures/textures_rc.py
index 1e3923f80..e68b63d69 100644
--- a/examples/opengl/textures/textures_rc.py
+++ b/examples/opengl/textures/textures_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\x14\
diff --git a/examples/quick/customitems/painteditem/painteditem.py b/examples/quick/customitems/painteditem/painteditem.py
index e89bf0bac..5476bdbaf 100644
--- a/examples/quick/customitems/painteditem/painteditem.py
+++ b/examples/quick/customitems/painteditem/painteditem.py
@@ -40,11 +40,11 @@
import sys
-from PySide2.QtGui import QPainter, QBrush, QColor
-from PySide2.QtWidgets import QApplication
-from PySide2.QtQml import qmlRegisterType
-from PySide2.QtCore import QUrl, Property, Signal, Qt, QPointF
-from PySide2.QtQuick import QQuickPaintedItem, QQuickView
+from PySide6.QtGui import QPainter, QBrush, QColor
+from PySide6.QtWidgets import QApplication
+from PySide6.QtQml import qmlRegisterType
+from PySide6.QtCore import QUrl, Property, Signal, Qt, QPointF
+from PySide6.QtQuick import QQuickPaintedItem, QQuickView
class TextBalloon(QQuickPaintedItem):
diff --git a/examples/remoteobjects/modelview/modelviewclient.py b/examples/remoteobjects/modelview/modelviewclient.py
index 378a0516e..264ba3ea4 100644
--- a/examples/remoteobjects/modelview/modelviewclient.py
+++ b/examples/remoteobjects/modelview/modelviewclient.py
@@ -39,13 +39,13 @@
##
#############################################################################
-"""PySide2 port of the remoteobjects/modelviewclient example from Qt v5.x"""
+"""PySide6 port of the remoteobjects/modelviewclient example from Qt v5.x"""
import sys
-from PySide2.QtCore import QUrl
-from PySide2.QtWidgets import (QApplication, QTreeView)
-from PySide2.QtRemoteObjects import QRemoteObjectNode
+from PySide6.QtCore import QUrl
+from PySide6.QtWidgets import (QApplication, QTreeView)
+from PySide6.QtRemoteObjects import QRemoteObjectNode
if __name__ == '__main__':
app = QApplication(sys.argv)
diff --git a/examples/remoteobjects/modelview/modelviewserver.py b/examples/remoteobjects/modelview/modelviewserver.py
index 5c0bba518..4098f61e9 100644
--- a/examples/remoteobjects/modelview/modelviewserver.py
+++ b/examples/remoteobjects/modelview/modelviewserver.py
@@ -39,14 +39,14 @@
##
#############################################################################
-"""PySide2 port of the remoteobjects/modelviewserver example from Qt v5.x"""
+"""PySide6 port of the remoteobjects/modelviewserver example from Qt v5.x"""
import sys
-from PySide2.QtCore import (Qt, QByteArray, QModelIndex, QObject, QTimer, QUrl)
-from PySide2.QtGui import (QColor, QStandardItemModel, QStandardItem)
-from PySide2.QtWidgets import (QApplication, QTreeView)
-from PySide2.QtRemoteObjects import QRemoteObjectHost, QRemoteObjectRegistryHost
+from PySide6.QtCore import (Qt, QByteArray, QModelIndex, QObject, QTimer, QUrl)
+from PySide6.QtGui import (QColor, QStandardItemModel, QStandardItem)
+from PySide6.QtWidgets import (QApplication, QTreeView)
+from PySide6.QtRemoteObjects import QRemoteObjectHost, QRemoteObjectRegistryHost
class TimerHandler(QObject):
def __init__(self, model):
diff --git a/examples/samplebinding/CMakeLists.txt b/examples/samplebinding/CMakeLists.txt
index fcad47b28..ac29700c4 100644
--- a/examples/samplebinding/CMakeLists.txt
+++ b/examples/samplebinding/CMakeLists.txt
@@ -204,7 +204,7 @@ if(WIN32)
PROPERTIES LINK_FLAGS "${python_additional_link_flags}")
# Compile a list of shiboken shared libraries to be installed, so that
- # the user doesn't have to set the PATH manually to point to the PySide2 package.
+ # the user doesn't have to set the PATH manually to point to the PySide6 package.
foreach(library_path ${shiboken_shared_libraries})
string(REGEX REPLACE ".lib$" ".dll" library_path ${library_path})
file(TO_CMAKE_PATH ${library_path} library_path)
diff --git a/examples/samplebinding/README.md b/examples/samplebinding/README.md
index 93d56f5bd..1334600ab 100644
--- a/examples/samplebinding/README.md
+++ b/examples/samplebinding/README.md
@@ -202,7 +202,7 @@ python virtual environment, that environment's packages will be used for
the python module import process.
In this case, make sure that the bindings were built while the
`virtualenv` was active, so that the build system picks up the correct
-python shared library and PySide2 / shiboken package.
+python shared library and PySide6 / shiboken package.
## Linux Shared Libraries Notes
@@ -232,5 +232,5 @@ In practice this means the only supported configurations are:
This is necessary because all the shared libraries in question have to
link to the same C++ runtime library (`msvcrt.dll` or `msvcrtd.dll`).
To make the example as self-contained as possible, the shared libraries
-in use (`pyside2.dll`, `shiboken6.dll`) are hard-linked into the build
+in use (`pyside6.dll`, `shiboken6.dll`) are hard-linked into the build
folder of the application.
diff --git a/examples/scriptableapplication/CMakeLists.txt b/examples/scriptableapplication/CMakeLists.txt
index 63a4afd35..a67025c62 100644
--- a/examples/scriptableapplication/CMakeLists.txt
+++ b/examples/scriptableapplication/CMakeLists.txt
@@ -44,7 +44,7 @@ macro(pyside_config option output_var)
endif()
endmacro()
-# Query for the shiboken6-generator path, PySide2 path, Python path, include paths and linker flags.
+# Query for the shiboken6-generator path, PySide6 path, Python path, include paths and linker flags.
pyside_config(--shiboken-module-path SHIBOKEN_MODULE_PATH)
pyside_config(--shiboken-generator-path SHIBOKEN_GENERATOR_PATH)
pyside_config(--pyside-path PYSIDE_PATH)
@@ -191,8 +191,8 @@ if(WIN32)
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "${PYTHON_ADDITIONAL_LINK_FLAGS}")
- # Add custom target to hard link PySide2 shared libraries (just like in qmake example), so you
- # don't have to set PATH manually to point to the PySide2 package.
+ # Add custom target to hard link PySide6 shared libraries (just like in qmake example), so you
+ # don't have to set PATH manually to point to the PySide6 package.
set(shared_libraries ${SHIBOKEN_MODULE_SHARED_LIBRARIES} ${PYSIDE_SHARED_LIBRARIES})
foreach(LIBRARY_PATH ${shared_libraries})
string(REGEX REPLACE ".lib$" ".dll" LIBRARY_PATH ${LIBRARY_PATH})
@@ -203,7 +203,7 @@ if(WIN32)
COMMAND mklink /H "${DEST_PATH}" "${SOURCE_PATH}"
DEPENDS ${LIBRARY_PATH}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- COMMENT "Creating hardlink to PySide2 shared library ${BASE_NAME}")
+ COMMENT "Creating hardlink to PySide6 shared library ${BASE_NAME}")
# Fake target that depends on the previous one, but has special ALL keyword, which means
# it will always be executed.
diff --git a/examples/scriptableapplication/README.md b/examples/scriptableapplication/README.md
index 908cac36b..3d31fba3d 100644
--- a/examples/scriptableapplication/README.md
+++ b/examples/scriptableapplication/README.md
@@ -148,7 +148,7 @@ no clean solution to include symbolic links in the package
## Windows Notes
The build config of the application (Debug or Release) should match
-the PySide2 build config, otherwise the application will not properly
+the PySide6 build config, otherwise the application will not properly
work.
In practice this means the only supported configurations are:
@@ -165,5 +165,5 @@ In practice this means the only supported configurations are:
This is necessary because all the shared libraries in question have to
link to the same C++ runtime library (`msvcrt.dll` or `msvcrtd.dll`).
To make the example as self-contained as possible, the shared libraries
-in use (`pyside2.dll`, `shiboken6.dll`) are hard-linked into the build
+in use (`pyside6.dll`, `shiboken6.dll`) are hard-linked into the build
folder of the application.
diff --git a/examples/sql/books/bookdelegate.py b/examples/sql/books/bookdelegate.py
index f7e219ad6..d44abb5b1 100644
--- a/examples/sql/books/bookdelegate.py
+++ b/examples/sql/books/bookdelegate.py
@@ -39,10 +39,10 @@
#############################################################################
import copy
-from PySide2.QtSql import QSqlRelationalDelegate
-from PySide2.QtWidgets import QSpinBox, QStyle
-from PySide2.QtGui import QPixmap, QPalette
-from PySide2.QtCore import QEvent, QSize, Qt
+from PySide6.QtSql import QSqlRelationalDelegate
+from PySide6.QtWidgets import QSpinBox, QStyle
+from PySide6.QtGui import QPixmap, QPalette
+from PySide6.QtCore import QEvent, QSize, Qt
class BookDelegate(QSqlRelationalDelegate):
diff --git a/examples/sql/books/bookwindow.py b/examples/sql/books/bookwindow.py
index 59cd65840..831a3cd63 100644
--- a/examples/sql/books/bookwindow.py
+++ b/examples/sql/books/bookwindow.py
@@ -38,11 +38,11 @@
##
#############################################################################
-from PySide2.QtWidgets import (QAbstractItemView, QDataWidgetMapper,
+from PySide6.QtWidgets import (QAbstractItemView, QDataWidgetMapper,
QHeaderView, QMainWindow, QMessageBox)
-from PySide2.QtGui import QKeySequence
-from PySide2.QtSql import QSqlRelation, QSqlRelationalTableModel, QSqlTableModel
-from PySide2.QtCore import Qt, Slot
+from PySide6.QtGui import QKeySequence
+from PySide6.QtSql import QSqlRelation, QSqlRelationalTableModel, QSqlTableModel
+from PySide6.QtCore import Qt, Slot
import createdb
from ui_bookwindow import Ui_BookWindow
from bookdelegate import BookDelegate
diff --git a/examples/sql/books/createdb.py b/examples/sql/books/createdb.py
index f8739b4d0..524ee0daf 100644
--- a/examples/sql/books/createdb.py
+++ b/examples/sql/books/createdb.py
@@ -38,7 +38,7 @@
##
#############################################################################
-from PySide2.QtSql import QSqlDatabase, QSqlQuery
+from PySide6.QtSql import QSqlDatabase, QSqlQuery
from datetime import date
def add_book(q, title, year, authorId, genreId, rating):
diff --git a/examples/sql/books/main.py b/examples/sql/books/main.py
index 50d2c0d6b..e957869ac 100644
--- a/examples/sql/books/main.py
+++ b/examples/sql/books/main.py
@@ -39,7 +39,7 @@
#############################################################################
import sys
-from PySide2.QtWidgets import QApplication
+from PySide6.QtWidgets import QApplication
from bookwindow import BookWindow
import rc_books
diff --git a/examples/sql/books/rc_books.py b/examples/sql/books/rc_books.py
index 6f2cbbeb6..b5d1d53bb 100644
--- a/examples/sql/books/rc_books.py
+++ b/examples/sql/books/rc_books.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\x03\x0e\
diff --git a/examples/sql/books/ui_bookwindow.py b/examples/sql/books/ui_bookwindow.py
index dc532744b..597b339cd 100644
--- a/examples/sql/books/ui_bookwindow.py
+++ b/examples/sql/books/ui_bookwindow.py
@@ -8,12 +8,12 @@
## 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 (QBrush, QColor, QConicalGradient, QFont,
+from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QFont,
QFontDatabase, QIcon, QLinearGradient, QPalette, QPainter, QPixmap,
QRadialGradient)
-from PySide2.QtWidgets import *
+from PySide6.QtWidgets import *
class Ui_BookWindow(object):
def setupUi(self, BookWindow):
diff --git a/examples/texttospeech/texttospeech.py b/examples/texttospeech/texttospeech.py
index f9c32ed1d..b5f2cc84b 100644
--- a/examples/texttospeech/texttospeech.py
+++ b/examples/texttospeech/texttospeech.py
@@ -39,14 +39,14 @@
##
#############################################################################
-"""PySide2 QTextToSpeech example"""
+"""PySide6 QTextToSpeech example"""
import sys
-from PySide2.QtCore import Qt
-from PySide2.QtWidgets import (QApplication, QComboBox, QFormLayout,
+from PySide6.QtCore import Qt
+from PySide6.QtWidgets import (QApplication, QComboBox, QFormLayout,
QHBoxLayout, QLineEdit, QMainWindow, QPushButton, QSlider, QWidget)
-from PySide2.QtTextToSpeech import QTextToSpeech
+from PySide6.QtTextToSpeech import QTextToSpeech
class MainWindow(QMainWindow):
def __init__(self):
@@ -57,7 +57,7 @@ class MainWindow(QMainWindow):
layout = QFormLayout(centralWidget)
textLayout = QHBoxLayout()
- self.text = QLineEdit('Hello, PySide2')
+ self.text = QLineEdit('Hello, PySide6')
self.text.setClearButtonEnabled(True)
textLayout.addWidget(self.text)
self.sayButton = QPushButton('Say')
diff --git a/examples/tutorial/t1.py b/examples/tutorial/t1.py
index 635fbbdb1..43fea90c4 100644
--- a/examples/tutorial/t1.py
+++ b/examples/tutorial/t1.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 1
+# PySide6 tutorial 1
import sys
-from PySide2 import QtWidgets
+from PySide6 import QtWidgets
app = QtWidgets.QApplication(sys.argv)
diff --git a/examples/tutorial/t10.py b/examples/tutorial/t10.py
index 12847a002..ca7e9d9b7 100644
--- a/examples/tutorial/t10.py
+++ b/examples/tutorial/t10.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 10
+# PySide6 tutorial 10
import sys
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class LCDRange(QtWidgets.QWidget):
diff --git a/examples/tutorial/t11.py b/examples/tutorial/t11.py
index cc391201b..c3d2e1271 100644
--- a/examples/tutorial/t11.py
+++ b/examples/tutorial/t11.py
@@ -39,12 +39,12 @@
##
#############################################################################
-# PySide2 tutorial 11
+# PySide6 tutorial 11
import sys
import math
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class LCDRange(QtWidgets.QWidget):
diff --git a/examples/tutorial/t12.py b/examples/tutorial/t12.py
index 40945290a..290ecc82e 100644
--- a/examples/tutorial/t12.py
+++ b/examples/tutorial/t12.py
@@ -39,13 +39,13 @@
##
#############################################################################
-# PySide2 tutorial 12
+# PySide6 tutorial 12
import sys
import math
import random
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class LCDRange(QtWidgets.QWidget):
diff --git a/examples/tutorial/t13.py b/examples/tutorial/t13.py
index 5198bb459..b54945e25 100644
--- a/examples/tutorial/t13.py
+++ b/examples/tutorial/t13.py
@@ -39,13 +39,13 @@
##
#############################################################################
-# PySide2 tutorial 13
+# PySide6 tutorial 13
import sys
import math
import random
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class LCDRange(QtWidgets.QWidget):
diff --git a/examples/tutorial/t14.py b/examples/tutorial/t14.py
index d86f59166..d558d2e61 100644
--- a/examples/tutorial/t14.py
+++ b/examples/tutorial/t14.py
@@ -39,13 +39,13 @@
##
#############################################################################
-# PySide2 tutorial 14
+# PySide6 tutorial 14
import sys
import math
import random
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class LCDRange(QtWidgets.QWidget):
diff --git a/examples/tutorial/t2.py b/examples/tutorial/t2.py
index 946a27366..d51986f47 100644
--- a/examples/tutorial/t2.py
+++ b/examples/tutorial/t2.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 2
+# PySide6 tutorial 2
import sys
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
app = QtWidgets.QApplication(sys.argv)
diff --git a/examples/tutorial/t3.py b/examples/tutorial/t3.py
index 65796ac74..fa96d6ff1 100644
--- a/examples/tutorial/t3.py
+++ b/examples/tutorial/t3.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 3
+# PySide6 tutorial 3
import sys
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
app = QtWidgets.QApplication(sys.argv)
diff --git a/examples/tutorial/t4.py b/examples/tutorial/t4.py
index c88943c98..4c30dfcbb 100644
--- a/examples/tutorial/t4.py
+++ b/examples/tutorial/t4.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 4
+# PySide6 tutorial 4
import sys
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class MyWidget(QtWidgets.QWidget):
diff --git a/examples/tutorial/t5.py b/examples/tutorial/t5.py
index 4077c0eb2..af36578cd 100644
--- a/examples/tutorial/t5.py
+++ b/examples/tutorial/t5.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 5
+# PySide6 tutorial 5
import sys
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class MyWidget(QtWidgets.QWidget):
diff --git a/examples/tutorial/t6.py b/examples/tutorial/t6.py
index 21c4ff311..9094c0ce9 100644
--- a/examples/tutorial/t6.py
+++ b/examples/tutorial/t6.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 6
+# PySide6 tutorial 6
import sys
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class LCDRange(QtWidgets.QWidget):
diff --git a/examples/tutorial/t7.py b/examples/tutorial/t7.py
index 0e01a75cd..590bd516c 100644
--- a/examples/tutorial/t7.py
+++ b/examples/tutorial/t7.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 7
+# PySide6 tutorial 7
import sys
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class LCDRange(QtWidgets.QWidget):
diff --git a/examples/tutorial/t8.py b/examples/tutorial/t8.py
index e67268989..3761b4353 100644
--- a/examples/tutorial/t8.py
+++ b/examples/tutorial/t8.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 8
+# PySide6 tutorial 8
import sys
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class LCDRange(QtWidgets.QWidget):
diff --git a/examples/tutorial/t9.py b/examples/tutorial/t9.py
index ab37f8eb7..ca949c1ac 100644
--- a/examples/tutorial/t9.py
+++ b/examples/tutorial/t9.py
@@ -39,11 +39,11 @@
##
#############################################################################
-# PySide2 tutorial 9
+# PySide6 tutorial 9
import sys
-from PySide2 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtWidgets
class LCDRange(QtWidgets.QWidget):
diff --git a/examples/uiloader/uiloader.py b/examples/uiloader/uiloader.py
index 1e6e72d78..21b126bb2 100644
--- a/examples/uiloader/uiloader.py
+++ b/examples/uiloader/uiloader.py
@@ -44,9 +44,9 @@
from argparse import ArgumentParser, RawTextHelpFormatter
import sys
-from PySide2.QtCore import Qt, QFile, QIODevice
-from PySide2.QtWidgets import QApplication, QWidget
-from PySide2.QtUiTools import QUiLoader
+from PySide6.QtCore import Qt, QFile, QIODevice
+from PySide6.QtWidgets import QApplication, QWidget
+from PySide6.QtUiTools import QUiLoader
if __name__ == '__main__':
diff --git a/examples/utils/pyside_config.py b/examples/utils/pyside_config.py
index da71073a0..6382185c5 100644
--- a/examples/utils/pyside_config.py
+++ b/examples/utils/pyside_config.py
@@ -46,8 +46,8 @@ import re
import sys
-PYSIDE = 'pyside2'
-PYSIDE_MODULE = 'PySide2'
+PYSIDE = 'pyside6'
+PYSIDE_MODULE = 'PySide6'
SHIBOKEN = 'shiboken6'
@@ -92,7 +92,7 @@ options.append(("--shiboken-generator-include-path",
options.append(("--pyside-include-path",
lambda: get_package_include_path(Package.PYSIDE_MODULE),
pyside_error,
- "Print PySide2 include paths"))
+ "Print PySide6 include paths"))
options.append(("--python-link-flags-qmake", lambda: python_link_flags_qmake(), python_link_error,
"Print python link flags for qmake"))
@@ -104,7 +104,7 @@ options.append(("--shiboken-module-qmake-lflags",
"Print shiboken6 shared library link flags for qmake"))
options.append(("--pyside-qmake-lflags",
lambda: get_package_qmake_lflags(Package.PYSIDE_MODULE), pyside_error,
- "Print PySide2 shared library link flags for qmake"))
+ "Print PySide6 shared library link flags for qmake"))
options.append(("--shiboken-module-shared-libraries-qmake",
lambda: get_shared_libraries_qmake(Package.SHIBOKEN_MODULE), pyside_libs_error,
@@ -175,7 +175,7 @@ def shared_library_glob_pattern():
def filter_shared_libraries(libs_list):
def predicate(lib_name):
basename = os.path.basename(lib_name)
- if 'shiboken' in basename or 'pyside2' in basename:
+ if 'shiboken' in basename or 'pyside6' in basename:
return True
return False
result = [lib for lib in libs_list if predicate(lib)]
@@ -199,7 +199,7 @@ def link_option(lib):
return link
-# Locate PySide2 via sys.path package path.
+# Locate PySide6 via sys.path package path.
def find_pyside():
return find_package_path(PYSIDE_MODULE)
diff --git a/examples/webchannel/standalone/core.py b/examples/webchannel/standalone/core.py
index 9fb056496..f6c3e8043 100644
--- a/examples/webchannel/standalone/core.py
+++ b/examples/webchannel/standalone/core.py
@@ -40,7 +40,7 @@
#############################################################################
-from PySide2.QtCore import QObject, Signal, Slot
+from PySide6.QtCore import QObject, Signal, Slot
class Core(QObject):
diff --git a/examples/webchannel/standalone/dialog.py b/examples/webchannel/standalone/dialog.py
index 45951deb9..5e8acb908 100644
--- a/examples/webchannel/standalone/dialog.py
+++ b/examples/webchannel/standalone/dialog.py
@@ -40,8 +40,8 @@
#############################################################################
-from PySide2.QtCore import Signal, Slot
-from PySide2.QtWidgets import QDialog
+from PySide6.QtCore import Signal, Slot
+from PySide6.QtWidgets import QDialog
from ui_dialog import Ui_Dialog
diff --git a/examples/webchannel/standalone/main.py b/examples/webchannel/standalone/main.py
index d3119141f..b937b6025 100644
--- a/examples/webchannel/standalone/main.py
+++ b/examples/webchannel/standalone/main.py
@@ -43,12 +43,12 @@
import os
import sys
-from PySide2.QtWidgets import QApplication
-from PySide2.QtGui import QDesktopServices
-from PySide2.QtNetwork import QHostAddress, QSslSocket
-from PySide2.QtCore import (QFile, QFileInfo, QUrl)
-from PySide2.QtWebChannel import QWebChannel
-from PySide2.QtWebSockets import QWebSocketServer
+from PySide6.QtWidgets import QApplication
+from PySide6.QtGui import QDesktopServices
+from PySide6.QtNetwork import QHostAddress, QSslSocket
+from PySide6.QtCore import (QFile, QFileInfo, QUrl)
+from PySide6.QtWebChannel import QWebChannel
+from PySide6.QtWebSockets import QWebSocketServer
from dialog import Dialog
from core import Core
diff --git a/examples/webchannel/standalone/ui_dialog.py b/examples/webchannel/standalone/ui_dialog.py
index 873edba10..7fd2fde97 100644
--- a/examples/webchannel/standalone/ui_dialog.py
+++ b/examples/webchannel/standalone/ui_dialog.py
@@ -8,12 +8,12 @@
## 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 (QBrush, QColor, QConicalGradient, QCursor, QFont,
+from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
QFontDatabase, QIcon, QLinearGradient, QPalette, QPainter, QPixmap,
QRadialGradient)
-from PySide2.QtWidgets import *
+from PySide6.QtWidgets import *
class Ui_Dialog(object):
diff --git a/examples/webchannel/standalone/websocketclientwrapper.py b/examples/webchannel/standalone/websocketclientwrapper.py
index 24505b03b..5d4ec4cfe 100644
--- a/examples/webchannel/standalone/websocketclientwrapper.py
+++ b/examples/webchannel/standalone/websocketclientwrapper.py
@@ -39,7 +39,7 @@
##
#############################################################################
-from PySide2.QtCore import QObject, Signal, Slot
+from PySide6.QtCore import QObject, Signal, Slot
from websockettransport import WebSocketTransport
diff --git a/examples/webchannel/standalone/websockettransport.py b/examples/webchannel/standalone/websockettransport.py
index 4e42e7674..401701699 100644
--- a/examples/webchannel/standalone/websockettransport.py
+++ b/examples/webchannel/standalone/websockettransport.py
@@ -39,8 +39,8 @@
##
#############################################################################
-from PySide2.QtWebChannel import QWebChannelAbstractTransport
-from PySide2.QtCore import QByteArray, QJsonDocument, Slot
+from PySide6.QtWebChannel import QWebChannelAbstractTransport
+from PySide6.QtCore import QByteArray, QJsonDocument, Slot
class WebSocketTransport(QWebChannelAbstractTransport):
diff --git a/examples/webenginequick/quicknanobrowser.py b/examples/webenginequick/quicknanobrowser.py
index 24e58eada..1bcb045c1 100644
--- a/examples/webenginequick/quicknanobrowser.py
+++ b/examples/webenginequick/quicknanobrowser.py
@@ -38,13 +38,13 @@
##
#############################################################################
-"""PySide2 WebEngine QtQuick 2 Example"""
+"""PySide6 WebEngine QtQuick 2 Example"""
import os
-from PySide2.QtCore import QUrl
-from PySide2.QtQml import QQmlApplicationEngine
-from PySide2.QtWidgets import QApplication
-from PySide2.QtWebEngine import QtWebEngine
+from PySide6.QtCore import QUrl
+from PySide6.QtQml import QQmlApplicationEngine
+from PySide6.QtWidgets import QApplication
+from PySide6.QtWebEngine import QtWebEngine
def main():
app = QApplication([])
diff --git a/examples/webenginewidgets/simplebrowser.py b/examples/webenginewidgets/simplebrowser.py
index 365e69a05..8c5ec0704 100644
--- a/examples/webenginewidgets/simplebrowser.py
+++ b/examples/webenginewidgets/simplebrowser.py
@@ -39,21 +39,21 @@
##
#############################################################################
-"""PySide2 WebEngineWidgets Example"""
+"""PySide6 WebEngineWidgets Example"""
import sys
-from PySide2.QtCore import QUrl
-from PySide2.QtGui import QIcon
-from PySide2.QtWidgets import (QApplication, QLineEdit,
+from PySide6.QtCore import QUrl
+from PySide6.QtGui import QIcon
+from PySide6.QtWidgets import (QApplication, QLineEdit,
QMainWindow, QPushButton, QToolBar)
-from PySide2.QtWebEngineWidgets import QWebEnginePage, QWebEngineView
+from PySide6.QtWebEngineWidgets import QWebEnginePage, QWebEngineView
class MainWindow(QMainWindow):
def __init__(self):
super(MainWindow, self).__init__()
- self.setWindowTitle('PySide2 WebEngineWidgets Example')
+ self.setWindowTitle('PySide6 WebEngineWidgets Example')
self.toolBar = QToolBar()
self.addToolBar(self.toolBar)
diff --git a/examples/webenginewidgets/tabbedbrowser/bookmarkwidget.py b/examples/webenginewidgets/tabbedbrowser/bookmarkwidget.py
index 612c682cb..88ef74367 100644
--- a/examples/webenginewidgets/tabbedbrowser/bookmarkwidget.py
+++ b/examples/webenginewidgets/tabbedbrowser/bookmarkwidget.py
@@ -42,10 +42,10 @@ import json
import os
import warnings
-from PySide2 import QtCore
-from PySide2.QtCore import QDir, QFileInfo, QStandardPaths, Qt, QUrl
-from PySide2.QtGui import QIcon, QStandardItem, QStandardItemModel
-from PySide2.QtWidgets import QMenu, QMessageBox, QTreeView
+from PySide6 import QtCore
+from PySide6.QtCore import QDir, QFileInfo, QStandardPaths, Qt, QUrl
+from PySide6.QtGui import QIcon, QStandardItem, QStandardItemModel
+from PySide6.QtWidgets import QMenu, QMessageBox, QTreeView
_url_role = Qt.UserRole + 1
@@ -58,7 +58,7 @@ _default_bookmarks = [
['https://doc.qt.io/qtforpython/', 'Documentation'],
['https://bugreports.qt.io/projects/PYSIDE/', 'Bug Reports'],
['https://www.python.org/', 'Python', None],
- ['https://wiki.qt.io/PySide2', 'Qt for Python', None],
+ ['https://wiki.qt.io/PySide6', 'Qt for Python', None],
['Other Bookmarks']
]
diff --git a/examples/webenginewidgets/tabbedbrowser/browsertabwidget.py b/examples/webenginewidgets/tabbedbrowser/browsertabwidget.py
index 093eed6bb..00b7750f7 100644
--- a/examples/webenginewidgets/tabbedbrowser/browsertabwidget.py
+++ b/examples/webenginewidgets/tabbedbrowser/browsertabwidget.py
@@ -43,10 +43,10 @@ from functools import partial
from bookmarkwidget import BookmarkWidget
from webengineview import WebEngineView
from historywindow import HistoryWindow
-from PySide2 import QtCore
-from PySide2.QtCore import Qt, QUrl
-from PySide2.QtWidgets import QMenu, QTabBar, QTabWidget
-from PySide2.QtWebEngineWidgets import QWebEngineDownloadItem, QWebEnginePage
+from PySide6 import QtCore
+from PySide6.QtCore import Qt, QUrl
+from PySide6.QtWidgets import QMenu, QTabBar, QTabWidget
+from PySide6.QtWebEngineWidgets import QWebEngineDownloadItem, QWebEnginePage
class BrowserTabWidget(QTabWidget):
diff --git a/examples/webenginewidgets/tabbedbrowser/downloadwidget.py b/examples/webenginewidgets/tabbedbrowser/downloadwidget.py
index 73b8d116b..a773070a1 100644
--- a/examples/webenginewidgets/tabbedbrowser/downloadwidget.py
+++ b/examples/webenginewidgets/tabbedbrowser/downloadwidget.py
@@ -39,11 +39,11 @@
#############################################################################
import sys
-from PySide2 import QtCore
-from PySide2.QtCore import QDir, QFileInfo, QStandardPaths, Qt, QUrl
-from PySide2.QtGui import QDesktopServices
-from PySide2.QtWidgets import QMenu, QProgressBar, QStyleFactory
-from PySide2.QtWebEngineWidgets import QWebEngineDownloadItem
+from PySide6 import QtCore
+from PySide6.QtCore import QDir, QFileInfo, QStandardPaths, Qt, QUrl
+from PySide6.QtGui import QDesktopServices
+from PySide6.QtWidgets import QMenu, QProgressBar, QStyleFactory
+from PySide6.QtWebEngineWidgets import QWebEngineDownloadItem
# A QProgressBar with context menu for displaying downloads in a QStatusBar.
@@ -60,7 +60,7 @@ class DownloadWidget(QProgressBar):
download_item.stateChanged.connect(self._update_tool_tip())
path = download_item.path()
self.setMaximumWidth(300)
- # Shorten 'PySide2-5.11.0a1-5.11.0-cp36-cp36m-linux_x86_64.whl'...
+ # Shorten 'PySide6-5.11.0a1-5.11.0-cp36-cp36m-linux_x86_64.whl'...
description = QFileInfo(path).fileName()
description_length = len(description)
if description_length > 30:
diff --git a/examples/webenginewidgets/tabbedbrowser/findtoolbar.py b/examples/webenginewidgets/tabbedbrowser/findtoolbar.py
index 3557c2e31..ec52e9073 100644
--- a/examples/webenginewidgets/tabbedbrowser/findtoolbar.py
+++ b/examples/webenginewidgets/tabbedbrowser/findtoolbar.py
@@ -38,11 +38,11 @@
##
#############################################################################
-from PySide2 import QtCore
-from PySide2.QtCore import Qt
-from PySide2.QtGui import QIcon, QKeySequence
-from PySide2.QtWidgets import QCheckBox, QLineEdit, QToolBar, QToolButton
-from PySide2.QtWebEngineWidgets import QWebEnginePage
+from PySide6 import QtCore
+from PySide6.QtCore import Qt
+from PySide6.QtGui import QIcon, QKeySequence
+from PySide6.QtWidgets import QCheckBox, QLineEdit, QToolBar, QToolButton
+from PySide6.QtWebEngineWidgets import QWebEnginePage
# A Find tool bar (bottom area)
diff --git a/examples/webenginewidgets/tabbedbrowser/historywindow.py b/examples/webenginewidgets/tabbedbrowser/historywindow.py
index 6ce779743..e0f381962 100644
--- a/examples/webenginewidgets/tabbedbrowser/historywindow.py
+++ b/examples/webenginewidgets/tabbedbrowser/historywindow.py
@@ -38,9 +38,9 @@
##
#############################################################################
-from PySide2.QtWidgets import QApplication, QTreeView
+from PySide6.QtWidgets import QApplication, QTreeView
-from PySide2.QtCore import Signal, QAbstractTableModel, QModelIndex, Qt, QUrl
+from PySide6.QtCore import Signal, QAbstractTableModel, QModelIndex, Qt, QUrl
class HistoryModel(QAbstractTableModel):
diff --git a/examples/webenginewidgets/tabbedbrowser/main.py b/examples/webenginewidgets/tabbedbrowser/main.py
index 086946bac..388f3b2ec 100644
--- a/examples/webenginewidgets/tabbedbrowser/main.py
+++ b/examples/webenginewidgets/tabbedbrowser/main.py
@@ -39,7 +39,7 @@
##
#############################################################################
-"""PySide2 WebEngineWidgets Example"""
+"""PySide6 WebEngineWidgets Example"""
import sys
from bookmarkwidget import BookmarkWidget
@@ -47,12 +47,12 @@ from browsertabwidget import BrowserTabWidget
from downloadwidget import DownloadWidget
from findtoolbar import FindToolBar
from webengineview import WebEngineView
-from PySide2 import QtCore
-from PySide2.QtCore import Qt, QUrl
-from PySide2.QtGui import QAction, QKeySequence, QIcon
-from PySide2.QtWidgets import (QApplication, QDockWidget, QLabel,
+from PySide6 import QtCore
+from PySide6.QtCore import Qt, QUrl
+from PySide6.QtGui import QAction, QKeySequence, QIcon
+from PySide6.QtWidgets import (QApplication, QDockWidget, QLabel,
QLineEdit, QMainWindow, QToolBar)
-from PySide2.QtWebEngineWidgets import QWebEngineDownloadItem, QWebEnginePage
+from PySide6.QtWebEngineWidgets import QWebEngineDownloadItem, QWebEnginePage
main_windows = []
@@ -82,7 +82,7 @@ class MainWindow(QMainWindow):
def __init__(self):
super(MainWindow, self).__init__()
- self.setWindowTitle('PySide2 tabbed browser Example')
+ self.setWindowTitle('PySide6 tabbed browser Example')
self._tab_widget = BrowserTabWidget(create_main_window_with_browser)
self._tab_widget.enabled_changed.connect(self._enabled_changed)
diff --git a/examples/webenginewidgets/tabbedbrowser/webengineview.py b/examples/webenginewidgets/tabbedbrowser/webengineview.py
index 81b156f93..d7eba1246 100644
--- a/examples/webenginewidgets/tabbedbrowser/webengineview.py
+++ b/examples/webenginewidgets/tabbedbrowser/webengineview.py
@@ -38,9 +38,9 @@
##
#############################################################################
-from PySide2.QtWebEngineWidgets import QWebEnginePage, QWebEngineView
+from PySide6.QtWebEngineWidgets import QWebEnginePage, QWebEngineView
-from PySide2 import QtCore
+from PySide6 import QtCore
_web_actions = [QWebEnginePage.Back, QWebEnginePage.Forward,
QWebEnginePage.Reload,
diff --git a/examples/widgetbinding/dialog.py b/examples/widgetbinding/dialog.py
index e52155999..ea5f0530c 100644
--- a/examples/widgetbinding/dialog.py
+++ b/examples/widgetbinding/dialog.py
@@ -48,7 +48,7 @@
##
############################################################################
-from PySide2.QtWidgets import QDialog, QLineEdit, QVBoxLayout
+from PySide6.QtWidgets import QDialog, QLineEdit, QVBoxLayout
# Python binding from the C++ widget
from wiggly import WigglyWidget as WigglyWidgetCPP
diff --git a/examples/widgetbinding/main.py b/examples/widgetbinding/main.py
index 556eb2638..0076e88aa 100644
--- a/examples/widgetbinding/main.py
+++ b/examples/widgetbinding/main.py
@@ -50,7 +50,7 @@
import sys
-from PySide2.QtWidgets import QApplication
+from PySide6.QtWidgets import QApplication
from dialog import Dialog
diff --git a/examples/widgetbinding/wigglywidget.py b/examples/widgetbinding/wigglywidget.py
index 50a061074..5451b2320 100644
--- a/examples/widgetbinding/wigglywidget.py
+++ b/examples/widgetbinding/wigglywidget.py
@@ -48,9 +48,9 @@
##
############################################################################
-from PySide2.QtCore import QBasicTimer
-from PySide2.QtGui import QColor, QFontMetrics, QPainter, QPalette
-from PySide2.QtWidgets import QWidget
+from PySide6.QtCore import QBasicTimer
+from PySide6.QtGui import QColor, QFontMetrics, QPainter, QPalette
+from PySide6.QtWidgets import QWidget
class WigglyWidget(QWidget):
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)
diff --git a/examples/xml/dombookmarks/dombookmarks.py b/examples/xml/dombookmarks/dombookmarks.py
index f645bedce..0a8d01ec4 100644
--- a/examples/xml/dombookmarks/dombookmarks.py
+++ b/examples/xml/dombookmarks/dombookmarks.py
@@ -40,9 +40,9 @@
##
#############################################################################
-"""PySide2 port of the xml/dombookmarks example from Qt v5.x"""
+"""PySide6 port of the xml/dombookmarks example from Qt v5.x"""
-from PySide2 import QtCore, QtGui, QtWidgets, QtXml
+from PySide6 import QtCore, QtGui, QtWidgets, QtXml
class MainWindow(QtWidgets.QMainWindow):