aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/doc
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/doc')
-rw-r--r--sources/pyside6/doc/CMakeLists.txt293
-rw-r--r--sources/pyside6/doc/PySide6/QtAsyncio/index.rst150
-rw-r--r--sources/pyside6/doc/_static/css/qt_font.css15
-rw-r--r--sources/pyside6/doc/_static/css/qt_style.css100
-rw-r--r--sources/pyside6/doc/_static/qtforpython.icobin0 -> 766 bytes
-rw-r--r--sources/pyside6/doc/_static/qtforpython.pngbin0 -> 4043 bytes
-rw-r--r--sources/pyside6/doc/_tags/android.rst21
-rw-r--r--sources/pyside6/doc/_tags/tagsindex.rst12
-rw-r--r--sources/pyside6/doc/_templates/layout.html51
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/domainindex.html57
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/searchbox.html12
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/bg_header.pngbin36012 -> 0 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/bg_topo.jpgbin14237 -> 0 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/fakebar.pngbin101 -> 0 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/logo_python.jpgbin2660 -> 0 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/logo_qt.pngbin1936 -> 0 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/minus.pngbin199 -> 0 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/plus.pngbin199 -> 0 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/pyside.css2195
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/pysidelogo.pngbin4936 -> 0 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/static/relbar_bg.pngbin130 -> 0 bytes
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs/theme.conf7
-rw-r--r--sources/pyside6/doc/_themes/pysidedocs_qthelp/static/pyside.css8
-rw-r--r--sources/pyside6/doc/additionaldocs.lst661
-rw-r--r--sources/pyside6/doc/api.rst62
-rw-r--r--sources/pyside6/doc/commercial/index.rst250
-rw-r--r--sources/pyside6/doc/commercial/products.pngbin0 -> 23289 bytes
-rw-r--r--sources/pyside6/doc/commercial/qtcreator_python.pngbin0 -> 40845 bytes
-rw-r--r--sources/pyside6/doc/commercial/versions_commercial.pngbin0 -> 34660 bytes
-rw-r--r--sources/pyside6/doc/commercial/versions_lts.pngbin0 -> 34293 bytes
-rw-r--r--sources/pyside6/doc/conf.py.in80
-rw-r--r--sources/pyside6/doc/considerations.rst239
-rw-r--r--sources/pyside6/doc/contents.rst14
-rw-r--r--sources/pyside6/doc/deployment/deployment-briefcase.rst (renamed from sources/pyside6/doc/deployment-briefcase.rst)49
-rw-r--r--sources/pyside6/doc/deployment/deployment-cxfreeze.rst (renamed from sources/pyside6/doc/deployment-cxfreeze.rst)43
-rw-r--r--sources/pyside6/doc/deployment/deployment-fbs.rst (renamed from sources/pyside6/doc/deployment-fbs.rst)24
-rw-r--r--sources/pyside6/doc/deployment/deployment-nuitka.rst132
-rw-r--r--sources/pyside6/doc/deployment/deployment-py2exe.rst (renamed from sources/pyside6/doc/deployment-py2exe.rst)10
-rw-r--r--sources/pyside6/doc/deployment/deployment-pyinstaller.rst (renamed from sources/pyside6/doc/deployment-pyinstaller.rst)63
-rw-r--r--sources/pyside6/doc/deployment/deployment-pyside6-android-deploy.rst211
-rw-r--r--sources/pyside6/doc/deployment/deployment-pyside6-deploy.rst217
-rw-r--r--sources/pyside6/doc/deployment/index.rst (renamed from sources/pyside6/doc/deployment.rst)43
-rw-r--r--sources/pyside6/doc/developer/adapt_qt.rst54
-rw-r--r--sources/pyside6/doc/developer/add_module.rst61
-rw-r--r--sources/pyside6/doc/developer/add_port_example.rst67
-rw-r--r--sources/pyside6/doc/developer/add_tool.rst51
-rw-r--r--sources/pyside6/doc/developer/documentation.rst73
-rw-r--r--sources/pyside6/doc/developer/enumfeatures_doc.rst160
-rw-r--r--sources/pyside6/doc/developer/extras.rst55
-rw-r--r--sources/pyside6/doc/developer/feature-motivation.rst (renamed from sources/pyside6/doc/feature-why.rst)57
-rw-r--r--sources/pyside6/doc/developer/index.rst35
-rw-r--r--sources/pyside6/doc/developer/limited_api.rst703
-rw-r--r--sources/pyside6/doc/developer/signature_doc.rst361
-rw-r--r--sources/pyside6/doc/extras/QtBluetooth.rst102
-rw-r--r--sources/pyside6/doc/extras/QtCharts.rst21
-rw-r--r--sources/pyside6/doc/extras/QtConcurrent.rst37
-rw-r--r--sources/pyside6/doc/extras/QtCore.ClassInfo.rst29
-rw-r--r--sources/pyside6/doc/extras/QtCore.Property.rst49
-rw-r--r--sources/pyside6/doc/extras/QtCore.QEnum.rst85
-rw-r--r--sources/pyside6/doc/extras/QtCore.QFlag.rst74
-rw-r--r--sources/pyside6/doc/extras/QtCore.Signal.rst49
-rw-r--r--sources/pyside6/doc/extras/QtCore.Slot.rst57
-rw-r--r--sources/pyside6/doc/extras/QtCore.rst58
-rw-r--r--sources/pyside6/doc/extras/QtDBus.rst193
-rw-r--r--sources/pyside6/doc/extras/QtDataVisualization.rst30
-rw-r--r--sources/pyside6/doc/extras/QtDesigner.QPyDesignerContainerExtension.rst11
-rw-r--r--sources/pyside6/doc/extras/QtDesigner.QPyDesignerCustomWidgetCollection.rst28
-rw-r--r--sources/pyside6/doc/extras/QtDesigner.QPyDesignerMemberSheetExtension.rst11
-rw-r--r--sources/pyside6/doc/extras/QtDesigner.QPyDesignerTaskMenuExtension.rst11
-rw-r--r--sources/pyside6/doc/extras/QtDesigner.rst18
-rw-r--r--sources/pyside6/doc/extras/QtGui.rst141
-rw-r--r--sources/pyside6/doc/extras/QtHelp.rst16
-rw-r--r--sources/pyside6/doc/extras/QtMultimedia.rst111
-rw-r--r--sources/pyside6/doc/extras/QtMultimediaWidgets.rst15
-rw-r--r--sources/pyside6/doc/extras/QtNetwork.rst27
-rw-r--r--sources/pyside6/doc/extras/QtNetworkAuth.rst37
-rw-r--r--sources/pyside6/doc/extras/QtNfc.rst31
-rw-r--r--sources/pyside6/doc/extras/QtOpenGL.rst22
-rw-r--r--sources/pyside6/doc/extras/QtOpenGLWidgets.rst8
-rw-r--r--sources/pyside6/doc/extras/QtPositioning.rst40
-rw-r--r--sources/pyside6/doc/extras/QtPrintSupport.rst15
-rw-r--r--sources/pyside6/doc/extras/QtQml.ListProperty.rst24
-rw-r--r--sources/pyside6/doc/extras/QtQml.QPyQmlParserStatus.rst9
-rw-r--r--sources/pyside6/doc/extras/QtQml.QPyQmlPropertyValueSource.rst9
-rw-r--r--sources/pyside6/doc/extras/QtQml.QmlAnonymous.rst17
-rw-r--r--sources/pyside6/doc/extras/QtQml.QmlAttached.rst35
-rw-r--r--sources/pyside6/doc/extras/QtQml.QmlElement.rst35
-rw-r--r--sources/pyside6/doc/extras/QtQml.QmlExtended.rst32
-rw-r--r--sources/pyside6/doc/extras/QtQml.QmlForeign.rst28
-rw-r--r--sources/pyside6/doc/extras/QtQml.QmlNamedElement.rst26
-rw-r--r--sources/pyside6/doc/extras/QtQml.QmlSingleton.rst33
-rw-r--r--sources/pyside6/doc/extras/QtQml.QmlUncreatable.rst26
-rw-r--r--sources/pyside6/doc/extras/QtQml.qmlRegisterSingletonType.rst44
-rw-r--r--sources/pyside6/doc/extras/QtQml.qmlRegisterType.rst41
-rw-r--r--sources/pyside6/doc/extras/QtQml.qmlRegisterUncreatableType.rst36
-rw-r--r--sources/pyside6/doc/extras/QtQml.rst75
-rw-r--r--sources/pyside6/doc/extras/QtQuickControls2.rst45
-rw-r--r--sources/pyside6/doc/extras/QtQuickTest.rst58
-rw-r--r--sources/pyside6/doc/extras/QtRemoteObjects.rst101
-rw-r--r--sources/pyside6/doc/extras/QtScript.rst21
-rw-r--r--sources/pyside6/doc/extras/QtScriptTools.rst5
-rw-r--r--sources/pyside6/doc/extras/QtScxml.rst25
-rw-r--r--sources/pyside6/doc/extras/QtSensors.rst19
-rw-r--r--sources/pyside6/doc/extras/QtSerialBus.rst46
-rw-r--r--sources/pyside6/doc/extras/QtSerialPort.rst18
-rw-r--r--sources/pyside6/doc/extras/QtSql.rst18
-rw-r--r--sources/pyside6/doc/extras/QtSvg.rst18
-rw-r--r--sources/pyside6/doc/extras/QtTest.rst2
-rw-r--r--sources/pyside6/doc/extras/QtUiTools.loadUiType.rst36
-rw-r--r--sources/pyside6/doc/extras/QtUiTools.rst12
-rw-r--r--sources/pyside6/doc/extras/QtWebChannel.rst30
-rw-r--r--sources/pyside6/doc/extras/QtWebEngineCore.rst19
-rw-r--r--sources/pyside6/doc/extras/QtWebEngineWidgets.rst18
-rw-r--r--sources/pyside6/doc/extras/QtWebSockets.rst29
-rw-r--r--sources/pyside6/doc/extras/QtWidgets.rst86
-rw-r--r--sources/pyside6/doc/extras/QtXml.rst10
-rw-r--r--sources/pyside6/doc/extras/QtXmlPatterns.rst12
-rw-r--r--sources/pyside6/doc/faq.rst16
-rw-r--r--sources/pyside6/doc/faq/distribution.rst (renamed from sources/pyside6/doc/tutorials/pretutorial/distribution.rst)2
-rw-r--r--sources/pyside6/doc/faq/hello_linux.png (renamed from sources/pyside6/doc/tutorials/pretutorial/hello_linux.png)bin5960 -> 5960 bytes
-rw-r--r--sources/pyside6/doc/faq/hello_macOS.png (renamed from sources/pyside6/doc/tutorials/pretutorial/hello_macOS.png)bin38777 -> 38777 bytes
-rw-r--r--sources/pyside6/doc/faq/hello_win10.jpg (renamed from sources/pyside6/doc/tutorials/pretutorial/hello_win10.jpg)bin5314 -> 5314 bytes
-rw-r--r--sources/pyside6/doc/faq/tiobe.pngbin0 -> 49961 bytes
-rw-r--r--sources/pyside6/doc/faq/typesoffiles.rst (renamed from sources/pyside6/doc/tutorials/pretutorial/typesoffiles.rst)16
-rw-r--r--sources/pyside6/doc/faq/whatisqt.rst (renamed from sources/pyside6/doc/tutorials/pretutorial/whatisqt.rst)6
-rw-r--r--sources/pyside6/doc/faq/whatisshiboken.rst (renamed from sources/pyside6/doc/tutorials/pretutorial/whatisshiboken.rst)10
-rw-r--r--sources/pyside6/doc/faq/whichide.rst (renamed from sources/pyside6/doc/tutorials/pretutorial/whichide.rst)16
-rw-r--r--sources/pyside6/doc/faq/whyqtforpython.rst203
-rw-r--r--sources/pyside6/doc/gettingstarted-linux.rst79
-rw-r--r--sources/pyside6/doc/gettingstarted-windows.rst83
-rw-r--r--sources/pyside6/doc/gettingstarted.rst247
-rw-r--r--sources/pyside6/doc/gettingstarted/index.rst572
-rw-r--r--sources/pyside6/doc/gettingstarted/linux.rst115
-rw-r--r--sources/pyside6/doc/gettingstarted/macOS.rst (renamed from sources/pyside6/doc/gettingstarted-macOS.rst)41
-rw-r--r--sources/pyside6/doc/gettingstarted/package_details.rst75
-rw-r--r--sources/pyside6/doc/gettingstarted/packages.pngbin0 -> 12157 bytes
-rw-r--r--sources/pyside6/doc/gettingstarted/porting_from2.rst94
-rw-r--r--sources/pyside6/doc/gettingstarted/windows.rst110
-rw-r--r--sources/pyside6/doc/images/Commercial.svg49
-rw-r--r--sources/pyside6/doc/images/Deployment.svg26
-rw-r--r--sources/pyside6/doc/images/Desktop.svg26
-rw-r--r--sources/pyside6/doc/images/Dev.svg24
-rw-r--r--sources/pyside6/doc/images/Development.svg27
-rw-r--r--sources/pyside6/doc/images/Examples.svg34
-rw-r--r--sources/pyside6/doc/images/Support.svg24
-rw-r--r--sources/pyside6/doc/images/Tooling.svg24
-rw-r--r--sources/pyside6/doc/images/Training.svg24
-rw-r--r--sources/pyside6/doc/images/Tutorials.svg24
-rw-r--r--sources/pyside6/doc/images/cpp_python.svg142
-rw-r--r--sources/pyside6/doc/images/linux.svg37
-rw-r--r--sources/pyside6/doc/images/macos.svg38
-rw-r--r--sources/pyside6/doc/images/stopwatch.svg24
-rw-r--r--sources/pyside6/doc/images/windows.svg38
-rw-r--r--sources/pyside6/doc/import_inheritance.py152
-rw-r--r--sources/pyside6/doc/index.rst222
-rw-r--r--sources/pyside6/doc/inheritance_diagram.py229
-rw-r--r--sources/pyside6/doc/inheritance_diagram.pyproject6
-rw-r--r--sources/pyside6/doc/inheritance_graph.py145
-rw-r--r--sources/pyside6/doc/json_inheritance.py74
-rw-r--r--sources/pyside6/doc/modules.rst255
-rw-r--r--sources/pyside6/doc/porting_from2.rst100
-rw-r--r--sources/pyside6/doc/pysideinclude.py19
-rw-r--r--sources/pyside6/doc/qdoc_spawner.py.in105
-rw-r--r--sources/pyside6/doc/qtattributionsscannertorst.py95
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtbluetooth.qdocconf.in2
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtdbus.qdocconf.in2
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtdoc.qdocconf.in2
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtlocation.qdocconf.in3
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtmacextras.qdocconf.in2
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtnetworkauth.qdocconf.in2
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtnfc.qdocconf.in2
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtpdf.qdocconf.in3
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtpositioning.qdocconf.in4
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtquickcontrols2.qdocconf.in4
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtquicktest.qdocconf.in3
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtremoteobjects.qdocconf.in2
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtserialbus.qdocconf.in2
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtserialport.qdocconf.in2
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtspatialaudio.qdocconf.in3
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qttexttospeech.qdocconf.in4
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtuitools.qdocconf.in2
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtwinextras.qdocconf.in2
-rw-r--r--sources/pyside6/doc/qtmodules/pyside-qtx11extras.qdocconf.in2
-rw-r--r--sources/pyside6/doc/quickstart.rst219
-rw-r--r--sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_0.cpp.py4
-rw-r--r--sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_1.cpp.py5
-rw-r--r--sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_2.cpp.py5
-rw-r--r--sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_3.cpp.py5
-rw-r--r--sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_4.cpp.py4
-rw-r--r--sources/pyside6/doc/snippets/qtbase/examples/widgets/itemviews/spinboxdelegate/delegate_0.h.py18
-rw-r--r--sources/pyside6/doc/snippets/qtbase/examples/widgets/tutorials/modelview/1_readonly/mymodel_Quoting_ModelView_Tutorial.h.py15
-rw-r--r--sources/pyside6/doc/snippets/qtbase/examples/widgets/tutorials/modelview/5_edit/mymodel_Quoting_ModelView_Tutorial.h.py27
-rw-r--r--sources/pyside6/doc/snippets/qtbase/src/gui/doc/snippets/code/src_gui_painting_qpainter_drawText.cpp.py13
-rw-r--r--sources/pyside6/doc/snippets/qtbase/src/widgets/doc/snippets/stringlistmodel/model_0.h.py24
-rw-r--r--sources/pyside6/doc/tools/index.rst211
-rw-r--r--sources/pyside6/doc/tools/pyside-assistant.rst21
-rw-r--r--sources/pyside6/doc/tools/pyside-designer.rst91
-rw-r--r--sources/pyside6/doc/tools/pyside-genpyi.rst52
-rw-r--r--sources/pyside6/doc/tools/pyside-linguist.rst20
-rw-r--r--sources/pyside6/doc/tools/pyside-lrelease.rst25
-rw-r--r--sources/pyside6/doc/tools/pyside-lupdate.rst23
-rw-r--r--sources/pyside6/doc/tools/pyside-metaobjectdump.rst92
-rw-r--r--sources/pyside6/doc/tools/pyside-project.rst64
-rw-r--r--sources/pyside6/doc/tools/pyside-qml.rst84
-rw-r--r--sources/pyside6/doc/tools/pyside-qmlcachegen.rst25
-rw-r--r--sources/pyside6/doc/tools/pyside-qmllint.rst49
-rw-r--r--sources/pyside6/doc/tools/pyside-qmltyperegistrar.rst17
-rw-r--r--sources/pyside6/doc/tools/pyside-rcc.rst55
-rw-r--r--sources/pyside6/doc/tools/pyside-uic.rst59
-rw-r--r--sources/pyside6/doc/tools/pyside6-assistant_screenshot.webpbin0 -> 18474 bytes
-rw-r--r--sources/pyside6/doc/tools/pyside6-balsam.rst59
-rw-r--r--sources/pyside6/doc/tools/pyside6-balsamui.rst22
-rw-r--r--sources/pyside6/doc/tools/pyside6-balsamui_screenshot.webpbin0 -> 10190 bytes
-rw-r--r--sources/pyside6/doc/tools/pyside6-designer_base_screenshot.webpbin0 -> 9446 bytes
-rw-r--r--sources/pyside6/doc/tools/pyside6-designer_customwidgets_screenshot.webpbin0 -> 39422 bytes
-rw-r--r--sources/pyside6/doc/tools/pyside6-designer_screenshot.webpbin0 -> 61182 bytes
-rw-r--r--sources/pyside6/doc/tools/pyside6-designer_sections_screenshot.webpbin0 -> 73738 bytes
-rw-r--r--sources/pyside6/doc/tools/pyside6-linguist_screenshot.webpbin0 -> 90474 bytes
-rw-r--r--sources/pyside6/doc/tools/pyside6-qmlimportscanner.rst53
-rw-r--r--sources/pyside6/doc/tools/pyside6-qsb.rst39
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/clickablebutton.pngbin0 -> 7059 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst11
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/dialog.pngbin0 -> 21263 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/dialog.rst50
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/greenapplication.pngbin0 -> 2089 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/icons.pngbin3202 -> 1599 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/icons.zipbin0 -> 6156 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/player-new.pngbin7818 -> 3369 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/player.pngbin5835 -> 2631 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/qml.rst50
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/qrcfiles.rst34
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/signals_and_slots.rst263
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/signals_slots.pngbin0 -> 14787 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/tablewidget.pngbin17237 -> 14509 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/translations.pngbin0 -> 25318 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/translations.rst179
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/treewidget.pngbin10236 -> 3709 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/treewidget.rst12
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/uifiles.pngbin0 -> 86503 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/uifiles.rst94
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/widgets.pngbin0 -> 23233 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/widgets.rst7
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/widgetstyling-no.pngbin26444 -> 11004 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/widgetstyling-simple-no.pngbin3834 -> 1206 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/widgetstyling-simple-yes.pngbin4743 -> 1596 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/widgetstyling-yes.pngbin32311 -> 24791 bytes
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/widgetstyling.py41
-rw-r--r--sources/pyside6/doc/tutorials/basictutorial/widgetstyling.rst38
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/add_chart.rst4
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/add_mainwindow.rst2
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/add_tableview.rst10
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize.tar.bz2bin6086 -> 0 bytes
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize1/main.py41
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize2/main.py41
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize3/main.py41
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize3/main_window.py44
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main.py41
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main_widget.py41
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main_window.py43
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize4/table_model.py43
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main.py41
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main_widget.py49
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main_window.py43
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize5/table_model.py43
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main.py41
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main_widget.py55
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main_window.py46
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/datavisualize6/table_model.py43
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/filter_data.rst2
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/images/datavisualization_app.pngbin40458 -> 49419 bytes
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/index.rst7
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/plot_datapoints.rst4
-rw-r--r--sources/pyside6/doc/tutorials/datavisualize/read_data.rst2
-rw-r--r--sources/pyside6/doc/tutorials/debugging/mixed_debugging.rst126
-rw-r--r--sources/pyside6/doc/tutorials/debugging/qml_debugging.rst32
-rw-r--r--sources/pyside6/doc/tutorials/debugging/qtcreator/breakpoint_cpp.pngbin0 -> 42765 bytes
-rw-r--r--sources/pyside6/doc/tutorials/debugging/qtcreator/custom_executable_create.pngbin0 -> 40278 bytes
-rw-r--r--sources/pyside6/doc/tutorials/debugging/qtcreator/custom_executable_run_config.pngbin0 -> 43483 bytes
-rw-r--r--sources/pyside6/doc/tutorials/debugging/qtcreator/qtcreator.rst39
-rw-r--r--sources/pyside6/doc/tutorials/debugging/qtcreator/start_debugging_without_deployment.pngbin0 -> 49267 bytes
-rw-r--r--sources/pyside6/doc/tutorials/debugging/vscode/audioformat_cpp.pngbin0 -> 43650 bytes
-rw-r--r--sources/pyside6/doc/tutorials/debugging/vscode/audioformat_wrapper.pngbin0 -> 40677 bytes
-rw-r--r--sources/pyside6/doc/tutorials/debugging/vscode/breakpoint_gdb.pngbin0 -> 33684 bytes
-rw-r--r--sources/pyside6/doc/tutorials/debugging/vscode/find_process_gdb.pngbin0 -> 42303 bytes
-rw-r--r--sources/pyside6/doc/tutorials/debugging/vscode/python_set_interpreter.pngbin0 -> 4664 bytes
-rw-r--r--sources/pyside6/doc/tutorials/debugging/vscode/vscode.rst192
-rw-r--r--sources/pyside6/doc/tutorials/expenses/expenses.rst107
-rw-r--r--sources/pyside6/doc/tutorials/expenses/main.py112
-rw-r--r--sources/pyside6/doc/tutorials/expenses/main_snake_prop.py65
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/01-expenses.py43
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/02-expenses.py48
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/03-expenses.py55
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/04-expenses.py55
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/05-expenses.py67
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/06-expenses.py83
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/07-expenses.py91
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/08-expenses.py101
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/09-expenses.py102
-rw-r--r--sources/pyside6/doc/tutorials/expenses/steps/10-expenses.py112
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/Main.qml196
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/app.qrc16
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons.qrc15
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/app_icon.svg2
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/folder_closed.svg38
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/folder_open.svg38
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/generic_file.svg38
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/globe.svg38
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/info_sign.svg38
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/leaf.svg7
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/light_bulb.svg43
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/qt_logo.svg26
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/read.svg38
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/resize.svg6
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/About.qml93
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/ColorScheme.qml118
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/Editor.qml160
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/FileSystemView.qml156
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/MyMenu.qml45
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/MyMenuBar.qml177
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/ResizeButton.qml23
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/Sidebar.qml146
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/WindowDragHandler.qml16
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qmldir11
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/editormodels.py116
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/extendedexplorer.md210
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/extendedexplorer.pyproject31
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/main.py50
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/resources/Colors.qml22
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/resources/colorscheme.pngbin0 -> 27675 bytes
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/resources/extendedexplorer.gifbin0 -> 2082470 bytes
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/resources/extendedexplorer.webpbin0 -> 23628 bytes
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/scheme_manager.py97
-rw-r--r--sources/pyside6/doc/tutorials/extendedexplorer/schemes.json82
-rw-r--r--sources/pyside6/doc/tutorials/index.rst181
-rw-r--r--sources/pyside6/doc/tutorials/modelviewprogramming/qlistview-dnd.py137
-rw-r--r--sources/pyside6/doc/tutorials/modelviewprogramming/simplemodel-use.py44
-rw-r--r--sources/pyside6/doc/tutorials/modelviewprogramming/stringlistmodel.py124
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter1/chapter1.rst26
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter1/createdb.py41
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter1/initdb.h51
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter1/main.py41
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.cpp51
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.h51
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.py41
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter2/chapter2.rst20
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter2/createdb.py41
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter2/main.py41
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/bookdelegate-old.py41
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/bookdelegate.py41
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.cpp51
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.py41
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/chapter3.rst20
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/createdb.py41
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/main-old.py41
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/chapter3/main.py41
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/hello_world_ex.py41
-rw-r--r--sources/pyside6/doc/tutorials/portingguide/index.rst6
-rw-r--r--sources/pyside6/doc/tutorials/qmlapp/main.py41
-rw-r--r--sources/pyside6/doc/tutorials/qmlapp/qmlapplication.rst32
-rw-r--r--sources/pyside6/doc/tutorials/qmlapp/view.qml51
-rw-r--r--sources/pyside6/doc/tutorials/qmlintegration/main.py42
-rw-r--r--sources/pyside6/doc/tutorials/qmlintegration/qmlintegration.rst74
-rw-r--r--sources/pyside6/doc/tutorials/qmlintegration/view.qml41
-rw-r--r--sources/pyside6/doc/tutorials/qmlsqlintegration/chat.qml50
-rw-r--r--sources/pyside6/doc/tutorials/qmlsqlintegration/main.py40
-rw-r--r--sources/pyside6/doc/tutorials/qmlsqlintegration/qmlsqlintegration.rst103
-rw-r--r--sources/pyside6/doc/tutorials/qmlsqlintegration/sqlDialog.py40
-rw-r--r--sources/pyside6/doc/typesystem_doc.xml.in50
-rw-r--r--sources/pyside6/doc/videos.rst251
369 files changed, 14021 insertions, 7292 deletions
diff --git a/sources/pyside6/doc/CMakeLists.txt b/sources/pyside6/doc/CMakeLists.txt
index f900b96eb..83583756f 100644
--- a/sources/pyside6/doc/CMakeLists.txt
+++ b/sources/pyside6/doc/CMakeLists.txt
@@ -1,7 +1,48 @@
-cmake_minimum_required(VERSION 3.16)
-cmake_policy(VERSION 3.16)
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.18)
+cmake_policy(VERSION 3.18)
project(doc)
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../../shiboken6/cmake")
+include(FindDocTools)
+
+# When the doc project is built as part of the pyside project, we show informational message
+# and return early if requirements are not met.
+if(NOT CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
+ if(QT_SRC_DIR AND SPHINX_BUILD AND DOT_EXEC AND BUILD_DOCS)
+ # All requirements met, proceed.
+ else()
+ set(reasons "")
+ if(NOT QT_SRC_DIR)
+ list(APPEND reasons " QT_SRC_DIR variable not set\n")
+ endif()
+ if(NOT SPHINX_BUILD)
+ list(APPEND reasons " sphinx-build command not found\n")
+ endif()
+ if(NOT DOT_EXEC)
+ list(APPEND reasons " graphviz not found\n")
+ endif()
+ if(NOT BUILD_DOCS)
+ list(APPEND reasons " BUILD_DOCS was set to FALSE (default)\n")
+ endif()
+ message(STATUS "apidoc generation targets disabled due to the following reasons:\n"
+ ${reasons})
+ return()
+ endif()
+else()
+ # We are building the docs as a standalone project, likely via setup.py build_base_docs
+ # command. Perform stricter sanity checks.
+ if(NOT SPHINX_BUILD)
+ message(FATAL_ERROR "sphinx-build command not found. Please set the SPHINX_BUILD variable.")
+ endif()
+endif()
+
+# Generate html by default.
+if(NOT DOC_OUTPUT_FORMAT)
+ set(DOC_OUTPUT_FORMAT "html")
+endif()
if (WIN32)
set(PATH_SEP "\;")
@@ -10,6 +51,12 @@ else()
endif()
set(DOC_DATA_DIR "${CMAKE_CURRENT_BINARY_DIR}/qdoc-output")
+# Directory for sphinx-generated files to build the HTML website. If changed,
+# update "build_scripts/main.py" in "PysideBaseDocs" class at line:
+# self.sphinx_src = self.out_dir / "base".
+set(DOC_BASE_DIR "base")
+
+set(ENV_INHERITANCE_FILE "${CMAKE_CURRENT_BINARY_DIR}/inheritance.json")
get_filename_component(ROOT ${CMAKE_CURRENT_BINARY_DIR} DIRECTORY)
set(TS_ROOT "${ROOT}/PySide6")
@@ -17,39 +64,53 @@ set(TS_ROOT "${ROOT}/PySide6")
file(REMOVE ${CMAKE_CURRENT_LIST_DIR}/pyside.qdocconf ${CMAKE_CURRENT_LIST_DIR}/pyside.qdocconf.in)
# We need to find the interpreter when running this only
-# for a rst_build_docs case, and not a full doc build
+# for the 'build_base_docs' case, and not a full doc build
if (NOT FULLDOCSBUILD)
find_package(Python COMPONENTS Interpreter)
- set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
endif()
+if (QT_SRC_DIR)
+ file(REAL_PATH ${QT_SRC_DIR}/.. QT_ROOT_PATH)
+else()
+ set(QT_ROOT_PATH "")
+endif()
+
+if(PYSIDE_IS_CROSS_BUILD)
+ set(python_executable "${QFP_PYTHON_HOST_PATH}")
+else()
+ set(python_executable "${Python_EXECUTABLE}")
+endif()
+
+set(TOOLS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../tools")
+
if (FULLDOCSBUILD)
# Fetch and transform the snippets from Qt
- message(STATUS "Fetching and converting snippets")
- if ("${QT_SRC_DIR}" STREQUAL "")
- message(FATAL_ERROR "There is no value set on QT_SRC_DIR, the snippet conversion will fail")
- endif()
- set(PYSIDE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../../../")
- set(SNIPPETS_TOOL "${CMAKE_CURRENT_SOURCE_DIR}/../../../tools/snippets_translate/main.py")
+ set(SNIPPETS_TOOL "${TOOLS_DIR}/snippets_translate/main.py")
+ set(SNIPPETS_TARGET ${CMAKE_CURRENT_BINARY_DIR}/${DOC_BASE_DIR}/codesnippets)
+
# Note QT_SRC_DIR points to 'qtbase',
# so we use the general SRC directory to copy all the other snippets
- execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SNIPPETS_TOOL}
- --qt ${QT_SRC_DIR}/.. --pyside ${PYSIDE_ROOT} -w
- WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
- ERROR_VARIABLE SNIPPETS_ERROR)
- if (SNIPPETS_ERROR)
- message(FATAL_ERROR "The 'snippets_translate' tool failed: ${SNIPPETS_ERROR}")
- endif()
+ add_custom_target("snippets_translate" DEPENDS "${SNIPPETS_TARGET}")
+ add_custom_command(OUTPUT "${SNIPPETS_TARGET}"
+ COMMAND ${python_executable} ${SNIPPETS_TOOL}
+ --qt ${QT_ROOT_PATH} --target ${SNIPPETS_TARGET} -w
+ WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
+ COMMENT "Fetching and converting snippets...")
endif()
# Generate example gallery
-message(STATUS "Generating example gallery")
+set(EXAMPLE_TOOL_TARGET "${CMAKE_CURRENT_BINARY_DIR}/${DOC_BASE_DIR}/examples")
+set(EXAMPLE_TOOL_OPTIONS --target "${EXAMPLE_TOOL_TARGET}" --qt-src-dir "${QT_SRC_DIR}")
if (QUIET_BUILD)
- set (EXAMPLE_TOOL_OPTIONS "-q")
+ list(APPEND EXAMPLE_TOOL_OPTIONS "-q")
endif()
-set(EXAMPLE_TOOL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../tools/example_gallery/main.py")
-execute_process(COMMAND ${PYTHON_EXECUTABLE} ${EXAMPLE_TOOL_DIR} ${EXAMPLE_TOOL_OPTIONS}
- WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
+set(EXAMPLE_TOOL_DIR "${TOOLS_DIR}/example_gallery/main.py")
+
+add_custom_target("example_gallery" DEPENDS "${EXAMPLE_TOOL_TARGET}")
+add_custom_command(OUTPUT "${EXAMPLE_TOOL_TARGET}"
+ COMMAND ${python_executable} ${EXAMPLE_TOOL_DIR} ${EXAMPLE_TOOL_OPTIONS}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
+ COMMENT "Generating example gallery...")
set(SHIBOKEN_INTERSPHINX_FILE "${ROOT}/pyside6/shiboken6/objects.inv")
set(HAS_WEBENGINE_WIDGETS 0)
@@ -64,13 +125,26 @@ if (FULLDOCSBUILD)
# The last element of the include list is the mkspec directory containing qplatformdefs.h
list(GET Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS -1 mkspecInclude)
- configure_file("pyside-config.qdocconf.in" "${CMAKE_CURRENT_LIST_DIR}/pyside-config.qdocconf" @ONLY)
+ set(config_docconf "${CMAKE_CURRENT_LIST_DIR}/pyside-config.qdocconf")
+ configure_file("pyside-config.qdocconf.in" "${config_docconf}" @ONLY)
+ set(global_header "${pyside6_BINARY_DIR}/qdoc.h")
file(READ "${pyside6_BINARY_DIR}/pyside6_global.h" docHeaderContents)
+ file(WRITE ${global_header} "${docHeaderContents}")
+
+ set(global_typesystem "${CMAKE_CURRENT_BINARY_DIR}/typesystem_doc.xml")
file(READ "typesystem_doc.xml.in" typeSystemDocXmlContents)
+ file(WRITE ${global_typesystem} "${typeSystemDocXmlContents}")
+ execute_process(
+ COMMAND ${Python_EXECUTABLE} "${TOOLS_DIR}/doc_modules.py"
+ -t "${global_typesystem}" -g "${global_header}" -d "${config_docconf}"
+ "${QT_INCLUDE_DIR}" "${SUPPORTED_QT_VERSION}"
+ OUTPUT_VARIABLE ALL_DOC_MODULES
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ separate_arguments (ALL_DOC_MODULES UNIX_COMMAND "${ALL_DOC_MODULES}")
- foreach(moduleIn ${all_module_shortnames})
+ foreach(moduleIn ${ALL_DOC_MODULES})
string(TOLOWER "${moduleIn}" lowerModuleIn)
set(docConf "${CMAKE_CURRENT_LIST_DIR}/qtmodules/pyside-qt${lowerModuleIn}.qdocconf.in")
if(EXISTS "${docConf}")
@@ -78,85 +152,49 @@ if (FULLDOCSBUILD)
get_filename_component(BASENAME ${OUTFILE} NAME)
configure_file(${docConf} "${CMAKE_CURRENT_LIST_DIR}/qtmodules/${BASENAME}" @ONLY)
file(APPEND "pyside.qdocconf.in" "\@CMAKE_CURRENT_LIST_DIR\@/qtmodules/${BASENAME}\n")
- # Handle docconf files in Qt that contain multiple modules
- if ("${moduleIn}" STREQUAL "3DExtras")
- set(modules 3DCore 3DRender 3DInput 3DLogic 3DAnimation "${moduleIn}")
- elseif ("${moduleIn}" STREQUAL "OpenGL")
- set(modules "${moduleIn}" OpenGLWidgets)
- elseif ("${moduleIn}" STREQUAL "QuickWidgets")
- set(modules Qml Quick "${moduleIn}")
- elseif ("${moduleIn}" STREQUAL "MultimediaWidgets")
- set(modules Multimedia "${moduleIn}")
- elseif ("${moduleIn}" STREQUAL "Scxml")
- set(modules StateMachine "${moduleIn}")
- elseif ("${moduleIn}" STREQUAL "Svg")
- set(modules "${moduleIn}" SvgWidgets)
- elseif ("${moduleIn}" STREQUAL "WebEngineWidgets")
- set(modules WebEngineCore WebEngineWidgets WebEngineQuick "${moduleIn}")
- set(HAS_WEBENGINE_WIDGETS 1)
- else()
- set(modules "${moduleIn}")
- endif()
- foreach(module ${modules})
- string(TOLOWER "${module}" lowerModule)
- # -- @TODO fix this for macOS frameworks.
- file(APPEND "${CMAKE_CURRENT_LIST_DIR}/pyside-config.qdocconf"
- " -I ${QT_INCLUDE_DIR}Qt${module} \\\n"
- " -I ${QT_INCLUDE_DIR}Qt${module}/${Qt${QT_MAJOR_VERSION}Core_VERSION} \\\n"
- " -I ${QT_INCLUDE_DIR}Qt${module}/${Qt${QT_MAJOR_VERSION}Core_VERSION}/Qt${module} \\\n")
-
- set(globalHeader "Qt${module}")
- set(docHeaderContents "${docHeaderContents}\n#include <Qt${module}/${globalHeader}>")
- set(typeSystemDocXmlContents "${typeSystemDocXmlContents}\n<load-typesystem name=\"Qt${module}/typesystem_${lowerModule}.xml\" generate=\"yes\"/>")
- endforeach()
endif()
endforeach()
- set(typeSystemDocXmlContents "${typeSystemDocXmlContents}\n</typesystem>\n")
- file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/typesystem_doc.xml" "${typeSystemDocXmlContents}")
+ # There is no binding for the qtdoc repository, but it has some relevant documents.
+ set(qtdoc_doc_conf "qtmodules/pyside-qtdoc.qdocconf")
+ configure_file("${qtdoc_doc_conf}.in" "${CMAKE_CURRENT_LIST_DIR}/${qtdoc_doc_conf}" @ONLY)
+ file(APPEND "pyside.qdocconf.in" "\@CMAKE_CURRENT_LIST_DIR\@/${qtdoc_doc_conf}\n")
- set(docHeader "${pyside6_BINARY_DIR}/qdoc.h")
- file(WRITE ${docHeader} "${docHeaderContents}")
configure_file("pyside.qdocconf.in" "pyside.qdocconf" @ONLY)
+ configure_file("qdoc_spawner.py.in" "qdoc_spawner.py" @ONLY)
set(QDOC_TYPESYSTEM_PATH "${pyside6_SOURCE_DIR}${PATH_SEP}${pyside6_BINARY_DIR}")
+ if(NOT qdoc_binary)
+ message(FATAL_ERROR
+ "No qdoc binary was found which full documentation generation requires. "
+ "Please either add qdoc to PATH or specify the QDOC_EXECUTABLE variable."
+ )
+ endif()
+
add_custom_target(qdoc DEPENDS "${DOC_DATA_DIR}/webxml/qtcore-index.webxml")
add_custom_command(OUTPUT "${DOC_DATA_DIR}/webxml/qtcore-index.webxml"
- # Use dummy Qt version information, QDoc needs it but has no effect on WebXML output
- COMMAND ${CMAKE_COMMAND} -E env BUILDDIR=${CMAKE_CURRENT_LIST_DIR}/src QT_INSTALL_DOCS=${QT_SRC_DIR}/doc
- QT_VERSION=${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}
- QT_VER=${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}
- QT_VERSION_TAG=${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}
- qdoc pyside.qdocconf -single-exec -installdir ${DOC_DATA_DIR} -outputdir ${DOC_DATA_DIR}
+ Use dummy Qt version information, QDoc needs it but has no effect on WebXML output
+ COMMAND ${CMAKE_COMMAND} -E env ${python_executable} qdoc_spawner.py
+ --qt=${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}
+ --doc-data-dir=${DOC_DATA_DIR}
+ --qdoc-binary=${qdoc_binary}
+ --build-dir=${CMAKE_CURRENT_LIST_DIR}/src
+ --qt-install-docs=${QT_SRC_DIR}/doc
+ --parallel="auto"
+ --verbose
COMMENT "Running qdoc against Qt source code...")
endif()
-# conditional tag for sphinx build
-#string(JOIN "_" SPHINX_TAG ${DOC_OUTPUT_FORMAT} "format")
-# Python script to replace the virtualFolder string in the QHP
-set(py_cmd "
-import fileinput
-import re
-try:
-\tfor line in fileinput.input('html/PySide.qhp',inplace=True,backup='.bak'):
-\t\tline_copy=line.strip()
-\t\tif not line_copy: # check for empty line
-\t\t\tcontinue
-\t\tmatch=re.match('(^.*virtualFolder.)doc(.*$)',line)
-\t\tif match:
-\t\t\trepl=''.join([match.group(1),'pyside6',match.group(2)])
-\t\t\tprint(line.replace(match.group(0),repl),end='')
-\t\telse:
-\t\t\tprint(line)
-except:
-\tpass\n")
-file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/py_script.py CONTENT ${py_cmd})
-
+# Avoid using 'auto' for '-j' option as it could lead to
+# crash on some systems due to out-of-memory situation. Instead
+# use a no. less than 8.
add_custom_target(apidoc
- COMMAND ${SHIBOKEN_PYTHON_INTERPRETER} ${SPHINX_BUILD} -b ${DOC_OUTPUT_FORMAT} ${CMAKE_CURRENT_BINARY_DIR}/rst html
+ COMMAND ${CMAKE_COMMAND} -E env INHERITANCE_FILE=${ENV_INHERITANCE_FILE}
+ ${SHIBOKEN_PYTHON_INTERPRETER} ${SPHINX_BUILD} -b ${DOC_OUTPUT_FORMAT}
+ -j 6 ${CMAKE_CURRENT_BINARY_DIR}/${DOC_BASE_DIR} html
COMMENT "Generating PySide htmls..."
)
@@ -169,56 +207,83 @@ if(DOC_OUTPUT_FORMAT STREQUAL "html")
${CMAKE_CURRENT_BINARY_DIR}/../../shiboken6/doc/html
${CMAKE_CURRENT_BINARY_DIR}/html/shiboken6
COMMENT "Copying Shiboken docs..."
+ DEPENDS "${DOC_DATA_DIR}/webxml/qtcore-index.webxml"
VERBATIM)
else()
- file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/html/PySide.qhp QHP_FILE)
- add_custom_command(TARGET apidoc POST_BUILD
- COMMAND ${PYTHON_EXECUTABLE} py_script.py
- COMMAND qhelpgenerator ${QHP_FILE}
- COMMENT "Generating QCH from a QHP file..."
- VERBATIM)
+ if(qhelpgenerator_binary)
+ message(STATUS "qhelpgenerator - found")
+ # Python script that will be called to update the QHP
+ set(PATCH_QHP_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/../../shiboken6/doc/scripts/patch_qhp.py")
+ file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR}/html/PySide.qhp QHP_FILE)
+ add_custom_command(TARGET apidoc POST_BUILD
+ COMMAND ${python_executable} ${PATCH_QHP_SCRIPT} -p -v pyside6 ${QHP_FILE}
+ COMMAND "${qhelpgenerator_binary}" ${QHP_FILE}
+ COMMENT "Generating QCH from a QHP file..."
+ DEPENDS "${DOC_DATA_DIR}/webxml/qtcore-index.webxml"
+ VERBATIM
+ )
+ else()
+ message(WARNING "qhelpgenerator - not found! qch generation disabled")
+ endif()
endif()
# create conf.py based on conf.py.in
-configure_file("conf.py.in" "rst/conf.py" @ONLY)
-
-add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/rst/PySide6/QtCore/index.rst"
- COMMAND Shiboken6::shiboken6 --generator-set=qtdoc ${docHeader}
- --include-paths="${QT_INCLUDE_DIR}${PATH_SEP}${pyside6_SOURCE_DIR}${PATH_SEP}${TS_ROOT}"
- --api-version=${SUPPORTED_QT_VERSION}
- --typesystem-paths="${QDOC_TYPESYSTEM_PATH}"
- --library-source-dir=${QT_SRC_DIR}
- --documentation-data-dir=${DOC_DATA_DIR}/webxml
- --output-directory=${CMAKE_CURRENT_BINARY_DIR}/rst
- --documentation-code-snippets-dir=${CMAKE_CURRENT_BINARY_DIR}/rst/codesnippets/doc/src/snippets${PATH_SEP}${CMAKE_CURRENT_BINARY_DIR}/rst/codesnippets/examples
- --documentation-extra-sections-dir=${CMAKE_CURRENT_BINARY_DIR}/rst/extras
- --additional-documentation=${CMAKE_CURRENT_BINARY_DIR}/rst/additionaldocs.lst
- ${CMAKE_CURRENT_BINARY_DIR}/typesystem_doc.xml
+configure_file("conf.py.in" "${DOC_BASE_DIR}/conf.py" @ONLY)
+
+set(CODE_SNIPPET_ROOT "${CMAKE_CURRENT_BINARY_DIR}/${DOC_BASE_DIR}/codesnippets")
+
+if (FULLDOCSBUILD)
+shiboken_get_tool_shell_wrapper(shiboken tool_wrapper)
+
+add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${DOC_BASE_DIR}/PySide6/QtCore/index.rst"
+ COMMAND
+ ${tool_wrapper}
+ $<TARGET_FILE:Shiboken6::shiboken6>
+ --generator-set=qtdoc
+ ${global_header}
+ --enable-pyside-extensions
+ --include-paths="${QT_INCLUDE_DIR}${PATH_SEP}${pyside6_SOURCE_DIR}${PATH_SEP}${TS_ROOT}"
+ --api-version=${SUPPORTED_QT_VERSION}
+ --typesystem-paths="${QDOC_TYPESYSTEM_PATH}"
+ --library-source-dir=${QT_SRC_DIR}
+ --documentation-data-dir=${DOC_DATA_DIR}/webxml
+ --output-directory=${CMAKE_CURRENT_BINARY_DIR}/${DOC_BASE_DIR}
+ --documentation-code-snippets-dir=${CODE_SNIPPET_ROOT}
+ --snippets-path-rewrite=${QT_ROOT_PATH}:${CODE_SNIPPET_ROOT}
+ --documentation-extra-sections-dir=${CMAKE_CURRENT_BINARY_DIR}/${DOC_BASE_DIR}/extras
+ --additional-documentation=${CMAKE_CURRENT_BINARY_DIR}/${DOC_BASE_DIR}/additionaldocs.lst
+ --inheritance-file=${ENV_INHERITANCE_FILE}
+ ${global_typesystem}
WORKING_DIRECTORY ${${module}_SOURCE_DIR}
COMMENT "Running generator to generate documentation...")
+endif()
-add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/rst/codesnippets"
- COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/rst
+add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${DOC_BASE_DIR}/extras"
+ COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${DOC_BASE_DIR}
COMMENT "Copying docs...")
add_custom_target("doc_copy"
- DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/rst/codesnippets")
+ DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${DOC_BASE_DIR}/extras")
add_custom_target("docrsts"
- DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/rst/PySide6/QtCore/index.rst")
+ DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${DOC_BASE_DIR}/PySide6/QtCore/index.rst")
+set(LIBEXEC_PATH "${QT6_INSTALL_PREFIX}/${QT6_INSTALL_LIBEXECS}")
add_custom_target("licensedocrsts"
- COMMAND ${PYTHON_EXECUTABLE}
+ COMMAND ${python_executable}
${CMAKE_CURRENT_LIST_DIR}/qtattributionsscannertorst.py
+ -l "${LIBEXEC_PATH}"
${CMAKE_CURRENT_LIST_DIR}/../../..
- ${CMAKE_CURRENT_BINARY_DIR}/rst/licenses.rst
+ ${CMAKE_CURRENT_BINARY_DIR}/${DOC_BASE_DIR}/licenses.rst
COMMENT "Creating 3rdparty license documentation..."
)
+add_dependencies(docrsts example_gallery)
+
if (FULLDOCSBUILD)
add_dependencies(apidoc docrsts licensedocrsts)
add_dependencies(licensedocrsts docrsts)
- add_dependencies(docrsts doc_copy qdoc)
+ add_dependencies(docrsts doc_copy qdoc snippets_translate)
endif()
#install files
diff --git a/sources/pyside6/doc/PySide6/QtAsyncio/index.rst b/sources/pyside6/doc/PySide6/QtAsyncio/index.rst
new file mode 100644
index 000000000..326f6efcc
--- /dev/null
+++ b/sources/pyside6/doc/PySide6/QtAsyncio/index.rst
@@ -0,0 +1,150 @@
+.. module:: PySide6.QtAsyncio
+
+PySide6.QtAsyncio
+*****************
+
+.. note:: This module is currently in technical preview.
+
+The Qt Asyncio module is a pure Python module that allows programs to be
+written that use Qt's API in conjunction with `asyncio
+<https://docs.python.org/3/library/asyncio.html>`_. asyncio is a popular
+Python library for asynchronous programming. It is used in particular
+for programs that need to handle many I/O operations from many sources,
+such as web servers. More generally, it allows developers to work with
+`couroutines <https://docs.python.org/3/library/asyncio-task.html#coroutine>`_.
+Coroutines can be imagined as "asynchronous functions". In contrast to
+Qt's signals and slot mechanism, this allows for asynchronous programs
+that are closer in program flow to synchronous programs, as programs no
+longer have to be imagined as a series of callbacks. Instead, coroutines
+transparently resume and yield at designated spots.
+
+Consider the following simple coroutine defined with the ``async``
+keyword in front of its definition:
+
+::
+
+ async def do_something():
+ result = await do_something_asynchronously()
+ print(result)
+
+``do_something_asynchronously()`` is a coroutine itself, e.g., an
+I/O-heavy operation that would normally block the execution flow in a
+synchronous program. Instead, the ``await`` keyword is used to wait for
+the result, at which point ``do_something()`` yields and the program
+flow transparently switches to the next asynchronous task. When the
+result becomes available, the program flow is able to switch back to the
+``do_something()`` coroutine, which then resumes and prints the result.
+
+The asyncio API
+^^^^^^^^^^^^^^^
+
+asyncio and Qt are both based on an event loop. asyncio provides an API
+to replace its default event loop with a custom implementation.
+**QtAsyncio** provides such an implementation that uses Qt's event loop,
+allowing Qt and asyncio to be used together.
+
+We consider that this API consists of two levels:
+
+1. Fundamental infrastructure for event loops and asynchronous
+ operations, including `futures
+ <https://docs.python.org/3/library/asyncio-future.html#asyncio.Future>`_,
+ `tasks <https://docs.python.org/3/library/asyncio-task.html#asyncio.Task>`_,
+ `handles <https://docs.python.org/3/library/asyncio-eventloop.html#callback-handles>`_,
+ executors, and event loop management functions (see below).
+2. A user-facing API for use in applications, including transports and
+ protocols, network connections, servers, sockets, signals,
+ subprocesses.
+
+**QtAsyncio** currently covers the first level. This includes the
+following functions, for which the API is identical with QtAsyncio as
+with asyncio:
+
+* `run_until_complete() <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_until_complete>`_
+* `run_forever() <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_forever>`_
+* `stop() <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.stop>`_
+* `is_running() <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.is_running>`_
+* `is_closed() <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.is_closed>`_
+* `close() <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.close>`_
+* `shutdown_asyncgens() <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.shutdown_asyncgens>`_
+* `shutdown_default_executor() <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.shutdown_default_executor>`_
+* `call_soon() <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.call_soon>`_
+* `call_soon_threadsafe() <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.call_soon_threadsafe>`_
+* `call_later() <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.call_later>`_
+* `call_at() <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.call_at>`_
+* `time() <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.time>`_
+* `create_future() <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.create_future>`_
+* `create_task() <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.create_task>`_
+* `set_task_factory() <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.set_task_factory>`_
+* `get_task_factory() <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.get_task_factory>`_
+
+Also included is the ability to
+`run synchronous code in an executor <https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_in_executor>`_
+(``ThreadPoolExecutor``).
+
+Get started with QtAsyncio
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+To write a program with **QtAsyncio**, first import the module, e.g.:
+
+::
+
+ import PySide6.QtAsyncio as QtAsyncio
+
+**QtAsyncio** provides a function ``run()`` that can be used to run a
+specific coroutine until it is complete, or to start the Qt & asyncio
+event loop plainly. The former case makes sense if the program flow
+starts with said coroutine, the latter case makes sense if a coroutine
+is enqueued later in the program flow, e.g., after pressing a button in
+the UI.
+
+::
+
+ QtAsyncio.run()
+
+(see the `asyncio "minimal" example <https://doc.qt.io/qtforpython-6/examples/example_async_minimal.html>`_
+for an instance of this usage) or
+
+::
+
+ QtAsyncio.run(my_coroutine())
+
+(see the `asyncio "Eratosthenes" example <https://doc.qt.io/qtforpython-6/examples/example_async_eratosthenes.html>`_)
+or
+
+::
+
+ QtAsyncio.run(my_coroutine(), keep_running=False)
+
+to run the coroutine and then stop the event loop upon its completion.
+This latter case behaves identically to ``asyncio.run(my_coroutine())``.
+
+An additional optional argument ``quit_qapp`` can be passed to ``run()``
+to configure whether the QCoreApplication at the core of QtAsyncio
+should be shut down when asyncio finishes. A special case where one
+would want to disable this is test suites that want to reuse a single
+QCoreApplication instance across all unit tests, which would fail if
+this instance is shut down every time. The default is ``True``.
+
+Note that this argument is orthogonal to the ``keep_running`` argument.
+``keep_running`` determines if **asyncio** should keep running after the
+coroutine has finished, while ``quit_qapp`` determines if the
+QCoreApplication should be shut down after asyncio has finished. It is
+possible for asyncio to finish while the QCoreApplication is kept alive.
+
+An argument ``handle_sigint`` determines whether QtAsyncio should handle
+SIGINT (Ctrl+C) and shut down the event loop when it is received. The
+default is ``False``. Set this to ``True`` if you want QtAsyncio to take
+care of handling SIGINT instead of your program.
+
+Coroutines explained
+^^^^^^^^^^^^^^^^^^^^
+
+Coroutines are functions that can be paused (yield) and resumed. Behind
+this simple concept lies a complex mechanism that is abstracted by the
+asynchronous framework. This talk presents a diagram that attempts to
+illustrate the flow of a coroutine from the moment it's provided to the
+async framework until it's completed.
+
+.. image:: https://img.youtube.com/vi/XuqdTvisqkQ/mqdefault.jpg
+ :alt: Asynchronous programming with asyncio and Qt
+ :target: https://www.youtube.com/watch?v=XuqdTvisqkQ
diff --git a/sources/pyside6/doc/_static/css/qt_font.css b/sources/pyside6/doc/_static/css/qt_font.css
new file mode 100644
index 000000000..ce39943ef
--- /dev/null
+++ b/sources/pyside6/doc/_static/css/qt_font.css
@@ -0,0 +1,15 @@
+@font-face {
+ font-family: 'Titillium Web';
+ font-style: normal;
+ font-weight: 400;
+ src: url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.eot");
+ /* IE9 Compat Modes */
+ src: local("Titillium Web"),
+ local("TitilliumWeb-Regular"),
+ url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.eot?#iefix") format("embedded-opentype"),
+ url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.woff2") format("woff2"),
+ url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.woff") format("woff"),
+ url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.ttf") format("truetype"),
+ url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.svg#TitilliumWeb") format("svg");
+ /* Legacy iOS */
+}
diff --git a/sources/pyside6/doc/_static/css/qt_style.css b/sources/pyside6/doc/_static/css/qt_style.css
new file mode 100644
index 000000000..08c4646c6
--- /dev/null
+++ b/sources/pyside6/doc/_static/css/qt_style.css
@@ -0,0 +1,100 @@
+.text-center {
+ text-align: center !important;
+}
+
+.text-center img {
+ padding-top: 10px;
+ height: 70px !important;
+}
+
+.cover-img img {
+ object-fit: cover;
+ height: 50%;
+}
+
+/* Tables */
+.section .docutils.container td {
+ float:left;
+}
+
+table.docutils {
+ margin-right: auto;
+ margin-bottom: 10px;
+ border: none;
+ width: initial;
+ font-size: 0.8em;
+}
+
+table.docutils.colwidths-given td {
+ float: none;
+}
+
+table.docutils th,
+table.docutils td {
+ padding-left:0;
+ border: none;
+}
+
+table.docutils td ul {
+ margin:0
+}
+
+table.docutils td ul > li {
+ margin: 0 0 0.5em;
+}
+
+.hide {
+ display: none;
+}
+
+.fixed .container {
+ max-width:1280px;
+ margin:0 auto;
+ padding:0 3.9%; /* 0? */
+ position:relative;
+ overflow:visible
+}
+
+/* We cannot put a :download:`....` command inside
+ * a sphinx-design button, so we add some properties from the button
+ * to the download class to mimic it */
+code.download {
+ text-align: center;
+ color: var(--color-brand-primary);
+ display: block;
+ border-color: transparent;
+ background-color: transparent;
+ border: 1px solid var(--color-brand-primary) !important;
+ border-radius: 0.25rem;
+ font-size: 1rem;
+ font-weight: 400;
+ vertical-align: middle;
+ padding: .375rem .75rem;
+ user-select: none;
+ line-height: 1.5;
+ transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
+}
+
+code.download:hover {
+ color: white;
+ background-color: var(--color-brand-primary);
+ border-color: var(--color-brand-primary);
+ text-decoration: none;
+ padding: .375rem .75rem;
+}
+
+dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple):first-child > dt {
+ font-size: +2.25rem;
+ font-weight: 700;
+ color: #ff00dd;
+}
+
+.theme-toggle svg{
+ width: +1.25rem;
+ height: +2.25rem;
+}
+
+.sd-card-title code span {
+ font-size: +1rem;
+ color: var(--color-brand-primary);
+}
diff --git a/sources/pyside6/doc/_static/qtforpython.ico b/sources/pyside6/doc/_static/qtforpython.ico
new file mode 100644
index 000000000..2f4d9e9de
--- /dev/null
+++ b/sources/pyside6/doc/_static/qtforpython.ico
Binary files differ
diff --git a/sources/pyside6/doc/_static/qtforpython.png b/sources/pyside6/doc/_static/qtforpython.png
new file mode 100644
index 000000000..33e971022
--- /dev/null
+++ b/sources/pyside6/doc/_static/qtforpython.png
Binary files differ
diff --git a/sources/pyside6/doc/_tags/android.rst b/sources/pyside6/doc/_tags/android.rst
new file mode 100644
index 000000000..08a30fc0f
--- /dev/null
+++ b/sources/pyside6/doc/_tags/android.rst
@@ -0,0 +1,21 @@
+My tags: Android
+################
+
+.. toctree::
+ :maxdepth: 1
+ :caption: With this tag
+
+ ../examples/example_bluetooth_heartrate_game.rst
+ ../examples/example_bluetooth_lowenergyscanner.rst
+ ../examples/example_location_mapviewer.rst
+ ../examples/example_multimedia_audiooutput.rst
+ ../examples/example_multimedia_audiosource.rst
+ ../examples/example_multimedia_camera.rst
+ ../examples/example_qml_editingmodel.rst
+ ../examples/example_qml_usingmodel.rst
+ ../examples/example_quick_models_objectlistmodel.rst
+ ../examples/example_quick_models_stringlistmodel.rst
+ ../examples/example_quick_painteditem.rst
+ ../examples/example_quickcontrols_contactslist.rst
+ ../examples/example_quickcontrols_gallery.rst
+ ../examples/example_widgets_widgets_digitalclock.rst
diff --git a/sources/pyside6/doc/_tags/tagsindex.rst b/sources/pyside6/doc/_tags/tagsindex.rst
new file mode 100644
index 000000000..be29337ec
--- /dev/null
+++ b/sources/pyside6/doc/_tags/tagsindex.rst
@@ -0,0 +1,12 @@
+:orphan:
+
+.. _tagoverview:
+
+Tags overview
+#############
+
+.. toctree::
+ :caption: Tags
+ :maxdepth: 1
+
+ Android (14) <android.rst>
diff --git a/sources/pyside6/doc/_templates/layout.html b/sources/pyside6/doc/_templates/layout.html
index 6ab1276a3..8f16e1cdf 100644
--- a/sources/pyside6/doc/_templates/layout.html
+++ b/sources/pyside6/doc/_templates/layout.html
@@ -1,40 +1,53 @@
{% extends "!layout.html" %}
-# Invert sidebars
{%- block sidebar1 %}{{ sidebar() }}{%- endblock %}
{%- block sidebar2 %}{%- endblock %}
+{% block sidebarlogo %}
+<div class="logo">
+ <a href="http://www.pyside.org">
+ <img alt="PySide" src="{{ pathto('_static/pysidelogo.png', 1) }}"/>
+ </a>
+</div>
+{% endblock %}
+
{%- block header %}
<div id="container">
-<div class="header">
+ <div class="header">
<div class="header_container">
- <div class="logo"><a href="http://www.pyside.org"><img alt="PySide" src="{{ pathto('_static/pysidelogo.png', 1) }}"/></a></div>
- <div class="related">
- <ul>
- {%- block rootrellink %}
- <li><a href="{{ pathto( 'index' ) }}">{{ shorttitle|e }}</a></li>
- {%- endblock %}
- {%- for parent in parents %}
- <li>{{ reldelim1 }} <a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a></li>
- {%- endfor %}
- {%- block relbaritems %} {% endblock %}
- </ul>
- </div>
+ <div class="related">
+ <ul>
+ {%- block rootrellink %}
+ <li><a href="{{ pathto( 'index' ) }}">{{ shorttitle|e }}</a></li>
+ {%- endblock %}
+ {%- for parent in parents %}
+ <li>{{ reldelim1 }} <a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a></li>
+ {%- endfor %}
+ {%- block relbaritems %} {% endblock %}
+ </ul>
+ </div>
</div>
-</div>
+ </div>
{%- endblock -%}
+{%- block document %}
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body" role="main">
+ {% block body %} {% endblock %}
+ </div>
+ </div>
+ </div>
+{% endblock %}
+
{%- block footer %}
<div class="footer">
- <a href="http://www.qt.io/"><img src="{{ pathto('_static/logo_qt.png', 1) }}" alt="Qt" border="0" /></a>
+ <a href="https://www.qt.io/"><img src="{{ pathto('_static/logo_qt.png', 1) }}" alt="Qt" border="0" /></a>
<a href="http://www.python.org"><img src="{{ pathto('_static/logo_python.jpg', 1) }}" alt="Python" border="0" /></a>
<p>{{ copyright }}</p>
</div>
</div>
{%- endblock %}
-# No top relbar.
{%- block relbar1 %}{%- endblock %}
-
-# No bottom relbar.
{%- block relbar2 %}{%- endblock %}
diff --git a/sources/pyside6/doc/_themes/pysidedocs/domainindex.html b/sources/pyside6/doc/_themes/pysidedocs/domainindex.html
deleted file mode 100644
index c136cdd1c..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/domainindex.html
+++ /dev/null
@@ -1,57 +0,0 @@
-{#
- basic/domainindex.html
- ~~~~~~~~~~~~~~~~~~~~~~
-
- Template for domain indices (module index, ...).
-
- :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-#}
-{% extends "layout.html" %}
-{% set title = indextitle %}
-{% block extrahead %}
-{{ super() }}
-{% if not embedded and collapse_index %}
- <script type="text/javascript">
- DOCUMENTATION_OPTIONS.COLLAPSE_INDEX = true;
- </script>
-{% endif %}
-{% endblock %}
-{% block body %}
-<div class="section">
- {%- set curr_group = 0 %}
-
- <h1>{{ indextitle }}</h1>
-
- <div class="modindex-jumpbox">
- {%- for (letter, entries) in content %}
- <a href="#cap-{{ letter }}"><strong>{{ letter }}</strong></a>
- {%- if not loop.last %} | {% endif %}
- {%- endfor %}
- </div>
-
- <table class="indextable modindextable" cellspacing="0" cellpadding="2">
- {%- for letter, entries in content %}
- <tr class="pcap"><td></td><td>&nbsp;</td><td></td></tr>
- <tr class="cap"><td></td><td><a name="cap-{{ letter }}">
- <strong>{{ letter }}</strong></a></td><td></td></tr>
- {%- for (name, grouptype, page, anchor, extra, qualifier, description)
- in entries %}
- {%- if grouptype == 1 %}{% set curr_group = curr_group + 1 %}{% endif %}
- <tr{% if grouptype == 2 %} class="cg-{{ curr_group }}"{% endif %}>
- <td>{% if grouptype == 1 -%}
- <img src="{{ pathto('_static/minus.png', 1) }}" id="toggle-{{ curr_group }}"
- class="toggler" style="display: none" alt="-" />
- {%- endif %}</td>
- <td>{% if grouptype == 2 %}&nbsp;&nbsp;&nbsp;{% endif %}
- {% if page %}<a href="{{ pathto(page) }}#{{ anchor }}">{% endif -%}
- <tt class="xref">{{ name|e }}</tt>
- {%- if page %}</a>{% endif %}
- {%- if extra %} <em>({{ extra|e }})</em>{% endif -%}
- </td><td>{% if qualifier %}<strong>{{ qualifier|e }}:</strong>{% endif %}
- <em>{{ description|e }}</em></td></tr>
- {%- endfor %}
- {%- endfor %}
- </table>
-</div>
-{% endblock %}
diff --git a/sources/pyside6/doc/_themes/pysidedocs/searchbox.html b/sources/pyside6/doc/_themes/pysidedocs/searchbox.html
deleted file mode 100644
index 55a972156..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/searchbox.html
+++ /dev/null
@@ -1,12 +0,0 @@
-{%- if pagename != "search" %}
-<div id="searchbox" style="display: none">
- <h3>{{ _('Quick search') }}</h3>
- <form class="search" action="{{ pathto('search') }}" method="get">
- <input type="text" name="q" id="q" size="18" />
- <input type="submit" value="{{ _('Go') }}" id="search_button" />
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
- </form>
-</div>
-<script type="text/javascript">$('#searchbox').show(0);</script>
-{%- endif %}
diff --git a/sources/pyside6/doc/_themes/pysidedocs/static/bg_header.png b/sources/pyside6/doc/_themes/pysidedocs/static/bg_header.png
deleted file mode 100644
index 843e7e2c5..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/static/bg_header.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside6/doc/_themes/pysidedocs/static/bg_topo.jpg b/sources/pyside6/doc/_themes/pysidedocs/static/bg_topo.jpg
deleted file mode 100644
index 4229ae8db..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/static/bg_topo.jpg
+++ /dev/null
Binary files differ
diff --git a/sources/pyside6/doc/_themes/pysidedocs/static/fakebar.png b/sources/pyside6/doc/_themes/pysidedocs/static/fakebar.png
deleted file mode 100644
index b45830e00..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/static/fakebar.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside6/doc/_themes/pysidedocs/static/logo_python.jpg b/sources/pyside6/doc/_themes/pysidedocs/static/logo_python.jpg
deleted file mode 100644
index cd474efba..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/static/logo_python.jpg
+++ /dev/null
Binary files differ
diff --git a/sources/pyside6/doc/_themes/pysidedocs/static/logo_qt.png b/sources/pyside6/doc/_themes/pysidedocs/static/logo_qt.png
deleted file mode 100644
index 3bc03b7c7..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/static/logo_qt.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside6/doc/_themes/pysidedocs/static/minus.png b/sources/pyside6/doc/_themes/pysidedocs/static/minus.png
deleted file mode 100644
index da1c5620d..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/static/minus.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside6/doc/_themes/pysidedocs/static/plus.png b/sources/pyside6/doc/_themes/pysidedocs/static/plus.png
deleted file mode 100644
index b3cb37425..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/static/plus.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside6/doc/_themes/pysidedocs/static/pyside.css b/sources/pyside6/doc/_themes/pysidedocs/static/pyside.css
deleted file mode 100644
index c4767f57f..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/static/pyside.css
+++ /dev/null
@@ -1,2195 +0,0 @@
-@import url('cookie-confirm.css') screen;
-
-/* -- admonitions -- */
-
-div.admonition {
- margin: 1.5em 0 1.5em;
- padding: 0;
-}
-
-div.admonition dt {
- font-weight: bold;
-}
-
-div.admonition dl {
- margin-bottom: 0;
-}
-
-p.admonition-title {
- margin: 0px 10px 5px 0px;
- font-weight: bold;
-}
-
-div.admonition code {
- font-family: inherit;
-}
-
-p.admonition-title + p {
- padding-left: 1em;
-}
-
-div.admonition a:after {
- content: ', ';
-}
-
-div.admonition a:last-child:after {
- content: '';
-}
-
-.body {
- width: 100%;
- background-color: #00FF00;
- clear: both;
- display:inline-block;
- background-color:#fff;
- padding: 25px 35px 20px 30px;
- -webkit-box-sizing:border-box;
- -moz-box-sizing:border-box;
- -ms-box-sizing:border-box;
- box-sizing:border-box;
-}
-.bodywrapper {
- position: relative;
- /*background-color: #0000ff;*/
-}
-.bodywrapper .admonition p.admonition-title {
- margin-bottom:5px
-}
-
-.bodywrapper .admonition p {
- margin:0
-}
-
-div.body p.centered {
- text-align: center;
- margin-top: 25px;
-}
-
-div.warning, div.seealso, div.note, div.important {
- padding: 6px 0px 6px 10px;
- border: none;
-}
-
-div.warning {
- background-color: #ffe4e4;
-}
-
-div.important {
- background-color: #fef9f3;
- border-left: 5px solid #feeec8;
-}
-
-div.seealso {
- background-color: #fff2d6;
-}
-
-div.note {
- background-color: #c5d3f4;
- border-left: 5px solid #7899f4;
-}
-
-table.docutils {
- margin-right: auto;
- margin-bottom: 10px;
- border: none;
- width: initial;
-}
-
-table.docutils.colwidths-given td {
- float: none;
-}
-
-table.docutils th,
-table.docutils td {
- padding-left:0;
- border: none;
-}
-
-table.docutils td ul {
- margin:0
-}
-
-table.docutils td ul > li {
- margin: 0 0 0.5em;
-}
-h2 em {
- float: right;
- font-size: 10px;
- position: relative;
- top: -20px;
-}
-
-.document {
- padding-bottom: 20px;
-}
-
-.documentwrapper {
- margin-left: 255px;
- position: relative;
-}
-@media screen and (max-width: 700px) {
- .documentwrapper {
- clear: both;
- margin-left: 0px;
- position: relative;
- }
-}
-
-.body blockquote {
- border: none;
- padding-left: 0;
- margin-bottom: 1.5em;
-}
-
-.sphinxsidebar {
- float: left;
- width: 186px;
- padding: 15px;
- text-align: left;
- background-color: #fff;
- clear: both;
-}
-
-.sphinxsidebar ul {
- padding: 0px;
- margin: 0px;
- list-style-position: inside;
-}
-
-.sphinxsidebar > ul {
- padding: 0px;
- margin: 0px;
-}
-
-.sphinxsidebar ul li li {
- margin-left: 10px;
- padding: 0px;
- font-size: 0.95em;
-}
-
-.sphinxsidebar ul a,
-.sphinxsidebar p.topless a {
- word-break: break-word;
-}
-
-.sphinxsidebar h3, .sphinxsidebar h3 a {
- color: #333;
-}
-
-.sphinxsidebar p.topless {
- margin: 1em 0 1em;
-}
-
-.pysidetoc ul {
- list-style: none;
- padding: 0px;
- margin: 0px;
-}
-
-.pysidetoc em {
- font-style: normal;
-}
-
-.pysidetoc strong {
- display: block;
- padding: 5px;
- margin: 0 10px 10px 0;
- border: none;
- background-color: #e2e2e2;
-}
-
-.section .docutils.container td {
- float:left;
-}
-
-.hide {
- display: none;
-}
-
-/* copy-notice */
-.document + p {
- margin-left: 255px;
- width: 70%;
- font-size: 0.75em;
- margin: 0 35px 15px 280px;
-}
-
-#searchbox {
- border-top: 1px solid #989898;
- padding-top: 10px;
- margin-left: -10px;
- margin-right: -10px;
- padding-left: 10px;
- padding-right: 10px;
-}
-
-#search_button {
- border: 1px solid #3A393A;
- background-color: #3A393A;
- color: white;
- cursor: pointer;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- -khtml-border-radius: 5px;
-
-}
-
-form {
- margin: 0px;
- padding: 0px;
-}
-
-#searchbox h3 {
- padding: 10px 0 0 0;
- margin-bottom: 5px;
-}
-
-/* search field */
-form #q {
- width: 136px;
- /* height: 22px; */
- /* border: none; */
- margin: 0px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- -khtml-border-radius: 5px;
- margin-top: 2px;
- padding: 4px;
- line-height: 22px;
-}
-
-#search-results h2 {
- display: none;
-}
-
-#search-results h2 {
- display: none;
-}
-
-#search-results ul.search {
- margin: 0px;
- padding: 0px;
-}
-
-ul.search div.context {
- padding-left: 40px;
-}
-
-#installation td {
- text-align: center;
- font-weight: bold;
-}
-
-em {
- color: inherit;
- font-style:italic;
-}
-
-/******** REL bar *********/
-
-.related {
- display: inline;
-}
-
-.related h3 {
- display: none;
-}
-
-.align-center {
- text-align: center;
-}
-
-.contentstable {
- width: 100%;
-}
-
-.contentstable td {
- padding-left: 30px;
- vertical-align: top;
-}
-
-p.biglink a {
- font-size: 20px;
-}
-
-dt:target, .highlight {
- background-color: #fbe54e;
-}
-
-p.highlight-link {
- margin-top: 10px;
- font-size: 0.8em;
-}
-
-#synopsis table, table.field-list {
- margin: 1em 0 1em 0;
-}
-
-table.field-list tr {
- text-align: left;
-}
-
-tt.descname {
- font-size: 120%;
- font-weight: bold;
-}
-
-#functions ul, #virtual-functions ul, #slots ul, #signals ul, #static-functions ul {
- margin: 0;
- padding: 6px;
- border: 1px solid #ddd;
- border-radius: 0;
- background-color: #e2e2e2;
-}
-
-#functions p, #virtual-functions p, #slots p, #signals p, #static-functions p {
- margin: 0;
- padding: 0;
-}
-
-#functions li, #virtual-functions li, #slots li, #signals li, #static-functions li {
- list-style: none;
- margin: 5px;
- padding: 0;
- font-size: 90%;
-}
-
-#synopsis span.pre {
- color: #009491;
- font-weight: bolder;
-}
-
-#detailed-description .class dt,
-#detailed-description .method dt,
-#detailed-description .staticmethod dt,
-#detailed-description .attribute dt {
- margin: 0px;
- margin-bottom: 10px;
- padding: 10px;
- font-weight: bold;
- background-color: #e2e2e2;
- border: none;
- border-radius: 0;
-}
-
-#detailed-description dd > blockquote,
-#detailed-description dd > .field-list {
- font-family: 'Droid Sans Mono', monospace;
- font-size: small;
- border-left: 10px solid #e2e2e2;
- padding-left: 10px;
- margin-bottom: 1.5em;
-}
-
-#detailed-description dd > blockquote blockquote {
- border: none;
- padding: 0;
-}
-
-#detailed-description .class .field-odd,
-#detailed-description .method .field-odd,
-#detailed-description .staticmethod .field-odd,
-#detailed-description .attribute .field-odd {
- margin: 0;
- padding: 1px 0 0 0;
- background-color: #ffffff;
-
-}
-
-#detailed-description .class .field-even,
-#detailed-description .method .field-even,
-#detailed-description .staticmethod .field-even,
-#detailed-description .attribute .field-even {
- margin: 0;
- padding: 1px 0 0 0;
- background-color: #ffffff;
-}
-
-#detailed-description .class .field-odd li,
-#detailed-description .method .field-odd li,
-#detailed-description .staticmethod .field-odd li,
-#detailed-description .attribute .field-odd li {
- list-style: none;
- margin: 0;
- padding: 0;
-
-}
-
-#detailed-description .class .field-even li,
-#detailed-description .method .field-even li,
-#detailed-description .staticmethod .field-even li,
-#detailed-description .attribute .field-even li {
- list-style: none;
- margin: 0;
- padding: 0;
-}
-
-#detailed-description .class .field-odd p,
-#detailed-description .method .field-odd p,
-#detailed-description .staticmethod .field-odd p,
-#detailed-description .attribute .field-odd p{
- margin: 0;
- margin-left: 20px;
-
-}
-
-#detailed-description .class .field-even p,
-#detailed-description .method .field-even p,
-#detailed-description .staticmethod .field-even p,
-#detailed-description .attribute .field-even p{
- margin: 0;
- margin-left: 20px;
-}
-
-#detailed-description .class .field-odd p:last-child,
-#detailed-description .method .field-odd p:last-child,
-#detailed-description .staticmethod .field-odd p:last-child,
-#detailed-description .attribute .field-odd p:last-child {
- margin-bottom: 10px;
-
-}
-
-#detailed-description .class .field-even p:last-child,
-#detailed-description .method .field-even p:last-child,
-#detailed-description .staticmethod .field-even p:last-child,
-#detailed-description .attribute .field-even p:last-child{
- margin-bottom: 10px;
-}
-
-.document dl.attribute,
-.document dl.class,
-.document dl.method,
-.document dl.staticmethod {
- margin-top: 2em;
-}
-
-.document dl.attribute dd,
-.document dl.class dd,
-.document dl.method dd,
-.document dl.staticmethod dd {
- padding-left: 1em;
-}
-
-#detailed-description .attribute td:nth-child(1) {
- font-family: 'Droid Sans Mono', monospace;
-}
-
-/* Qt theme */
-#navbar {
- position:fixed;
- top:0;
- left:0;
- z-index:100;
- background:#fff;
- width:100%
-}
-#navbar .container, .fixed .container {
- max-width:1280px;
- margin:0 auto;
- padding:0 3.9%; /* 0? */
- position:relative;
- overflow:visible
-}
-#navbar .navbar-header {
- position:relative
-}
-#menuextras li a:hover span {
- color: #41cd52;
-}
-/* new header */
-#mm-wrap, #mm-wrap #mm-helper,
-#mm-wrap #mm-helper li.mm-item,
-#mm-wrap #mm-helper a.mm-link {
- -moz-transition: none;
- -o-transition: none;
- -webkit-transition: none;
- transition: none;
- -webkit-border-radius: 0 0 0 0;
- -moz-border-radius: 0 0 0 0;
- -ms-border-radius: 0 0 0 0;
- -o-border-radius: 0 0 0 0;
- border-radius: 0 0 0 0;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- -ms-box-shadow: none;
- -o-box-shadow: none;
- box-shadow: none;
- background: none;
- border: 0;
- bottom: auto;
- box-sizing: border-box;
- clip: auto;
- color: #090e21;
- display: block;
- float: none;
- font-family: inherit;
- font-size: 14px;
- height: auto;
- left: auto;
- line-height: 1.7;
- list-style-type: none;
- margin: 0;
- min-height: 0;
- opacity: 1;
- outline: none;
- overflow: visible;
- padding: 0;
- position: relative;
- right: auto;
- text-align: left;
- text-decoration: none;
- text-transform: none;
- top: auto;
- vertical-align: baseline;
- visibility: inherit;
- width: auto;
-}
-#mm-wrap #mm-helper {
- visibility:visible;
- text-align:right;
- padding:0 0px 0 0px
-}
-#navbar #mm-wrap #mm-helper li.mm-item {
- border-right:solid #f3f3f4 1px;
- padding-right:30px;
- padding-left:30px
-}
-#navbar #mm-wrap #mm-helper li.mm-item > a:hover {
- opacity: .5
-}
-#mm-wrap #mm-helper > li.mm-item {
- margin:0 0 0 0;
- display:inline-block;
- height:auto;
- vertical-align:middle
-}
-#navbar #mm-wrap #mm-helper li.mm-item:nth-child(3) {
- border-right:0
-}
-#mm-wrap #mm-helper a.mm-link {
- cursor: pointer
-}
-@media (max-width: 1279px) {
- #navbar {
- padding:0;
- position:relative;
- }
- #navbar .container {
- max-width:100%
- }
- .container {
- padding:0 2%
- }
- .sphinxsidebar {
- top: 16px !important;
- }
-}
-#navbar .navbar-oneQt {
- display:inline;
- float:left;
- width:31px;
- color:#41cd52
-}
-#navbar .navbar-oneQt:before {
- content:attr(data-icon);
- position:absolute;
- top:14px;
- left:0;
- color:#41cd52;
- font-family:'Qt Icons';
- line-height:1;
- font-size:40px;
- transition:all 0.3s ease-in-out;
-}
-#mm-wrap {
- clear:both;
- background:rgba(255, 255, 255, 0.1);
- -webkit-border-radius:0px 0px 0px 0px;
- -moz-border-radius:0px 0px 0px 0px;
- -ms-border-radius:0px 0px 0px 0px;
- -o-border-radius:0px 0px 0px 0px;
- border-radius:0px 0px 0px 0px
-}
-#mm-wrap #mm-helper li.mm-item:last-child a {
- background:transparent url("icon_avatar.png") 50% 50% no-repeat !important;
- background-size:24px !important;
- width:24px !important;
- height:24px !important;
-}
-#navbar #mm-wrap #mm-helper li.mm-item > a {
- opacity:1;
- -webkit-transition:all 0.3s ease-in-out;
- -moz-transition:all 0.3s ease-in-out;
- -ms-transition:all 0.3s ease-in-out;
- -o-transition:all 0.3s ease-in-out;
- transition:all 0.3s ease-in-out;
-}
-#mm-wrap #mm-helper > li.mm-item > a.mm-link {
- border-top:0px solid #fff;
- border-left:0px solid #fff;
- border-right:0px solid #fff;
- border-bottom:0px solid #fff;
- outline:none;
- text-decoration:none;
- padding:0 0 0 0;
- line-height:70px;
- font-weight:normal;
- height:70px;
- vertical-align:baseline;
- text-align:left;
- width:auto;
- display:block;
- color:#090e21;
- text-transform:none;
- text-decoration:none;
- background:rgba(0, 0, 0, 0);
- -webkit-border-radius:0px 0px 0px 0px;
- -moz-border-radius:0px 0px 0px 0px;
- -ms-border-radius:0px 0px 0px 0px;
- -o-border-radius:0px 0px 0px 0px;
- border-radius:0px 0px 0px 0px;
- font-family:inherit;
- font-size:14px;
-}
-/* end new header */
-@media (min-width: 1320px) {
- .body .flowListDiv dl.flowList {
- -webkit-column-count:3;
- -moz-column-count:3;
- column-count:3
- }
-}
-@media (min-width: 1120px) {
- #navbar.fixed {
- -moz-box-shadow:0px 0px 8px rgba(0,0,0,0.23);
- -webkit-box-shadow:0px 0px 8px rgba(0,0,0,0.23);
- box-shadow:0px 0px 8px rgba(0,0,0,0.23)
- }
- #navbar.fixed #mm-wrap #mm-helper > li.mm-item > a.mm-link {
- height:50px;
- line-height:50px
- }
- #navbar.fixed .navbar-oneQt:before {
- font-size:35px;
- top:7px
- }
-
- .flowListDiv dl.flowList {
- -webkit-column-count:2;
- -moz-column-count:2;
- column-count:2
- }
-}
-@media (max-width: 1120px) {
- #navbar {
- padding:0;
- position:relative
- }
- #navbar .navbar-oneQt:before {
- left:10px
- }
- #navbar .container {
- max-width:100%;
- padding:0
- }
- #footerbar .container {
- padding:0
- }
- body .main {
- margin-top:0px
- }
- #footerbar .footer-main .footer-nav {
- padding:3.9% 0 3.9% 3%;
- border-bottom:1px solid #413d3b;
- float:none;
- display:block;
- width:auto
- }
- #footerbar .footer-main .theqtcompany {
- clear:both;
- float:left;
- margin:30px 0 8px 3%
- }
- #footerbar .footer-main .footer-social {
- float:left;
- padding:50px 0px 0px 3%
- }
- #footerbar #menu-footer-submenu {
- clear:both;
- float:none;
- display:block;
- padding:0px 0px 3.9% 3%
- }
- ul#menu-footer-submenu {
- margin-left: 0
- }
-}
-.cookies_yum {
- background-color:#cecfd5;
- display:none;
- width:100%
-}
-.cookies_yum img {
- width:25px;
- top:6px;
- display:inline-block;
- position:absolute;
- left:13px
-}
-.cookies_yum div {
- margin:0 auto;
- max-width:1280px;
- min-height:30px;
- padding:6px 0px 6px 0px;
- position:relative
-}
-.cookies_yum p {
- color:#09102b;
- margin:0px;
- font-size:0.79em;
- display:inline-block;
- line-height:1.2;
- padding:0 30px 0 50px
-}
-.cookies_yum p a {
- white-space:nowrap
-}
-.cookies_yum a:hover {
- color:#46a2da
-}
-.cookies_yum .close {
- width:15px;
- height:15px;
- background-image:url("cookiebar-x.png");
- background-size:15px 30px;
- background-position:top left;
- cursor:pointer;
- top:13px;
- right:13px;
- position:absolute;
- transition:none
-}
-.cookies_yum .close:hover {
- background-position:bottom left
-}
-#sidebar-toggle,#toc-toggle {
- width:24px;
- height:14px;
- background-size:24px 28px;
- cursor:pointer;
- background-image:url("list_expand.png");
- float:right
-}
-#sidebar-toggle.collapsed,
-#toc-toggle.collapsed {
- background-position:bottom left
-}
-#sidebar-content > h2 {
- display:none
-}
-#footerbar {
- background:#222840;
- color:#fff;
- font-size: 0.9em;
-}
-#footerbar.fixed {
- bottom:0;
- left:0;
- width:100%
-}
-#footerbar .footer-nav {
- display:inline;
- float:left
-}
-#footerbar .footer-main .footer-nav li {
- float:left;
- margin-right:1em
-}
-#footerbar .footer-main .footer-nav li a {
- display:block;
- padding:30px 0 10px 0;
- line-height:20px;
- height:20px;
- color:#fff;
- font-weight: 600;
-}
-#footerbar .footer-main .footer-nav li a:hover,#footerbar .footer-main .footer-nav li.current-menu-item a {
- color:#eee
-}
-#footerbar .footer-main .footer-nav .sub-menu {
- margin-left:0;
- margin-bottom:0
-}
-#footerbar .footer-main .footer-nav .sub-menu li {
- float:none;
- width: 100%;
-}
-#footerbar .footer-main .footer-nav .sub-menu ul {
- padding:1px 1em;
- font-size:0.786em;
- line-height:8px;
- float:none;
- color:#5d5b59;
- margin-bottom:0
-}
-#footerbar .footer-main .footer-nav .sub-menu li a {
- padding:2px 0;
- font-size:1em;
- float:none;
- color:#cecfd5;
- font-weight: 400;
-}
-#footerbar .footer-main .footer-nav .sub-menu li a:hover,#footerbar .footer-main .footer-nav .sub-menu li.current-menu-item a {
- color:#eee
-}
-#footerbar .theqtcompany {
- background:url("theqtcompany.png") no-repeat;
- background-size:100%;
- width:215px;
- height:68px;
- display:inline;
- float:right;
- margin:29px 0 28px 30px
-}
-#footerbar .footer-social {
- display:inline;
- float:right;
- width:164px
-}
-#footerbar .footer-main .footer-social>div {
- margin-left:0.1em;
- margin-bottom:10px
-}
-#footerbar .disclaimer {
- font-size:0.786em;
- line-height:2.73;
- color:#868584;
- padding-top:20px;
- padding-bottom:0.5%
-}
-#footerbar .disclaimer a {
- color:#bdbebf
-}
-#footerbar .disclaimer a:hover {
- color:#d6d6d6
-}
-#footerbar .disclaimer ul li {
- float:left;
- vertical-align:middle;
- margin-left:1.18em
-}
-#footerbar .disclaimer ul li:first-child {
- margin-left:0
-}
-#footerbar .disclaimer ul.lang-selector a {
- color:#506a34;
- color:rgba(128,195,66,0.3)
-}
-#footerbar .disclaimer ul.lang-selector a:hover {
- color:#80c342;
- color:rgba(128,195,66,0.7)
-}
-#menu-footer-menu, #menu-footer-menu ul {
- margin-left:0;
- margin-bottom:0
-}
-@font-face {
- font-family: 'Titillium Web';
- font-style: normal;
- font-weight: 400;
- src: url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.eot");
- /* IE9 Compat Modes */
- src: local("Titillium Web"), local("TitilliumWeb-Regular"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.eot?#iefix") format("embedded-opentype"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.woff2") format("woff2"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.woff") format("woff"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.ttf") format("truetype"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-regular.svg#TitilliumWeb") format("svg");
- /* Legacy iOS */
-}
-/* titillium-web-italic - latin_latin-ext */
-@font-face {
- font-family: 'Titillium Web';
- font-style: italic;
- font-weight: 400;
- src: url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-italic.eot");
- /* IE9 Compat Modes */
- src: local("Titillium WebItalic"), local("TitilliumWeb-Italic"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-italic.eot?#iefix") format("embedded-opentype"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-italic.woff2") format("woff2"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-italic.woff") format("woff"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-italic.ttf") format("truetype"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-italic.svg#TitilliumWeb") format("svg");
- /* Legacy iOS */
-}
-/* titillium-web-600 - latin_latin-ext */
-@font-face {
- font-family: 'Titillium Web';
- font-style: normal;
- font-weight: 600;
- src: url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-600.eot");
- /* IE9 Compat Modes */
- src: local("Titillium WebSemiBold"), local("TitilliumWeb-SemiBold"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-600.eot?#iefix") format("embedded-opentype"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-600.woff2") format("woff2"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-600.woff") format("woff"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-600.ttf") format("truetype"), url("//d33sqmjvzgs8hq.cloudfront.net/wp-content/themes/oneqt/assets/fonts/titillium-web-v4-latin_latin-ext-600.svg#TitilliumWeb") format("svg");
- /* Legacy iOS */
-}
-@font-face {
- font-family: 'Droid Sans Mono', monospace;
- font-style:normal;
- font-weight:400;
- src:local("Droid Sans Mono"),local("DroidSansMono"),url(//fonts.gstatic.com/s/droidsansmono/v7/ns-m2xQYezAtqh7ai59hJUYuTAAIFFn5GTWtryCmBQ4.woff) format("woff")
-}
-@font-face {
- font-family:'Qt Icons';
- src:url("../style/icomoon.eot?-tgjuoj");
- src:url("../style/icomoon.eot?#iefix-tgjuoj") format("embedded-opentype"),url("../style/icomoon.woff?-tgjuoj") format("woff"),url("../style/icomoon.ttf?-tgjuoj") format("truetype"),url("../style/icomoon.svg?-tgjuoj#icomoon") format("svg");
- font-weight:normal;
- font-style:normal
-}
-@font-face {
- font-family:'social-icons';
- src:url("../style/social-icons.eot?54625607");
- src:url("../style/social-icons.eot?54625607#iefix") format("embedded-opentype"),
- url("../style/social-icons.woff?54625607") format("woff");
- font-weight:normal;
- font-style:normal
-}
-.clearfix:before,.clearfix:after {
- content:" ";
- display:table
-}
-.clearfix:after {
- clear:both
-}
-.clearfix {
- *zoom:1
-}
-.clearfix .right {
- float:right
-}
-html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video {
- margin:0;
- padding:0;
- border:0;
- font-size:100%
- line-height: 1.4;
-}
-html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,caption,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video {
- vertical-align:baseline
-}
-h1,h2,h3,h4,h5,h6 {
- font-weight:300
-}
-.body h2,.body h3,.body h4,.body h5,.body h6 {
- margin:1.5em 0 0.75em
-}
-.body h1 {
- margin-bottom:0.75em;
- font-size:2.25em;
-}
-.body h3.fn,.body h3.flags {
- color:#26282a;
- font-size:1.46em;
- padding:15px 0 15px 0;
- border-bottom:2px #eee solid;
- word-wrap:break-word
-}
-.body .fngroup {
- border-bottom:2px #eee solid;
- padding-bottom:15px;
- margin-bottom:1.5em
-}
-.body .fngroup h3.fngroupitem {
- margin:0;
- padding-bottom:0;
- border:none
-}
-.body h3.fn .name,
-.body h3 span.type,
-.qmlname span.name {
- font-weight: 400
-}
-.qmlname {
- font-size:1.46em
-}
-.qmlproto table {
- border:none;
- border-bottom:2px #eee solid
-}
-.qmlproto table p {
- max-width:100%
-}
-.qmlproto table tr {
- background-color:#fff
-}
-.qmlname td, .qmlname th {
- border:none;
- text-align:left;
- padding:5px 0 0 0
-}
-.qmlreadonly,.qmldefault {
- padding:0 5px 0 5px;
- font-size:0.75em;
- background-color:#eee;
- float:right
-}
-.qmlreadonly {
- color:#414141
-}
-.qmldefault {
- color:#D14141
-}
-.rightAlign {
- padding:3px 5px 3px 10px;
- text-align:right
-}
-.centerAlign.functionIndex {
- text-align:center;
- font-size:150%;
- margin-bottom: 1em
-}
-article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
- display:block
-}
-body {
- line-height:1;
- font-family:'Titillium Web', Arial, Helvetica, sans-serif;
- font-weight:400;
- transition-duration:1s;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- font-size: 16px;
- background-color:#f3f3f4;
- color:#404244;
-}
-ol,ul {
- list-style-type: square;
- color: #17a81a;
-}
-.body ol,.body ul {
- margin-top:0.75em;
- margin-left:20px
-}
-.bodywrapper ol>li {
- list-style-type:decimal;
- margin-left:15px
-}
-.bodywrapper ol.a >li {
- list-style-type:lower-alpha;
-}
-.bodywrapper ol.A >li {
- list-style-type:upper-alpha;
-}
-.bodywrapper ol.i >li {
- list-style-type:lower-roman;
-}
-.bodywrapper ol.I >li {
- list-style-type:upper-roman;
-}
-.body li p {
- margin-top:1em
-}
-blockquote,q {
- quotes:none;
- border-left:10px solid #ddd;
- padding-left:10px
-}
-blockquote:before,blockquote:after,q:before,q:after {
- content:'';
- content:none;
- width:100%
-}
-table {
- border-collapse:collapse;
- border-spacing:0;
- margin-bottom:5px;
- width:100%
-}
-a {
- color:#17a81a;
- text-decoration:none;
- transition-duration:0.3s
-}
-a:hover {
- color:#17a81a
-}
-.main,#footerbar>div {
- max-width:1280px;
- width:95%;
- margin:0 auto
-}
-.main {
- margin-top:80px
-}
-@media (max-width: 1120px) {
- .main,.navbar-header,#footerbar>div {
- width: 100%;
- margin: 0;
- }
- .main .main-rounded {
- padding: 0 15px;
- }
-}
-.main_index {
- background-color:#fff
-}
-.sectionlist {
- margin-bottom:2em
-}
-[class*="col-"] {
- letter-spacing:normal
-}
-.landing,.main_index .row {
- letter-spacing:-0.31em
-}
-.main_index .row>div {
- letter-spacing:normal
-}
-.col-1 {
- clear: both;
- display:inline-block;
- background-color:#fff;
- padding: 25px 35px 20px 30px;
- -webkit-box-sizing:border-box;
- -moz-box-sizing:border-box;
- -ms-box-sizing:border-box;
- box-sizing:border-box;
-}
-.col-1 h2 {
- font-size:1.8em;
- font-weight:300;
- line-height:1.1;
- margin-bottom:0.83em;
- margin-top:1em
-}
-.icons1of3 img {
- display:inline-block;
- float:left;
- margin-right:0.75em;
- margin-top:-5px;
- width:2.75em
-}
-div.multi-column {
- position:relative
-}
-div.multi-column div {
- display:-moz-inline-box;
- display:inline-block;
- vertical-align:top;
- margin-top:1em;
- margin-right:2em;
- width:16em
-}
-.sidebar {
- display:block;
- position:relative;
- position:sticky;
- float:left;
- -webkit-box-sizing:border-box;
- -moz-box-sizing:border-box;
- -ms-box-sizing:border-box;
- box-sizing:border-box;
- width:20%;
- padding-right:20px
-}
-.sidebar li {
- text-overflow:ellipsis;
- overflow:hidden
-}
-.toc,.sectionlist {
- padding:25px;
- background-color:#fff;
- margin-bottom:1.25em
-}
-.sidebar .sectionlist p {
- margin-bottom:0
-}
-.sectionlist.promo {
- padding:0;
- background-color:#f3f3f4
-}
-.sidebar-content:empty {
- display:none;
- visibility:hidden
-}
-.col-2 h2,.toc h3,.sidebar-content h2,
-.sidebar-content h3,.sectionlist h2,
-.sphinxsidebar {
- position: -webkit-sticky;
- position: sticky;
- top: 64px;
- width: 200px;
- overflow: scroll;
- overflow-x: hidden;
- overflow-y: hidden;
-}
-.sphinxsidebar h3 {
- font-weight: bold;
- margin-bottom:1em;
-}
-
-/* On screens that are less than 700px wide, make the sidebar into a topbar */
-@media screen and (max-width: 700px) {
- .sphinxsidebar {
- top: 64px;
- /*overflow-x: hidden;
- overflow-y: hidden;*/
- width: 100%;
- height: auto;
- position: relative;
- }
- /*.sidebar a {float: left;}*/
- div.content {margin-left: 0;}
-}
-
-/* On screens that are less than 400px, display the bar vertically, instead of horizontally
-@media screen and (max-width: 400px) {
- .sphinxsidebar a {
- text-align: center;
- float: none;
- }
-}
-*/
-
-.toc h3 a {
- color:#404244
-}
-.title {
- font-size:2.25em;
- font-weight:300;
- letter-spacing:-1px;
- line-height:1.15em;
- margin-bottom:0.5em;
- word-wrap:break-word
-}
-.navigationbar,col-1 h2 {
- font-size:0.85em
-}
-.navigationbar h1 {
- font-size:2.5em;
- margin-bottom:0.85em;
- margin-top:0.85em
-}
-.navigationbar li {
- display:inline-block;
- margin-right:5px;
- position:relative;
- padding-right:10px;
- color:#585a5c
-}
-.navigationbar ul:last-of-type li a {
- color:#404244
-}
-.sectionlist li, .sphinxsidebar li {
- padding-bottom: 10px;
- line-height: 1.75em;
-}
-.col-1 ul {
- margin-bottom:1.56em
-}
-.bodywrapper li {
- margin-top:0.5em;
- line-height:1.25em
-}
-.bodywrapper li.level2 {
- margin-left:10px;
- margin-top:0.4em;
- font-size:0.9375em;
-}
-.bodywrapper p,
-.bodywrapper dd {
- line-height:1.25em;
- margin:1em 0 1em;
- color:#404244
-}
-.bodywrapper b {
- font-weight:600
-}
-.body ul,.body ol {
- /* margin-bottom:1.5em */
-}
-.bodywrapper ul ul {
- margin-top:0.5em
-}
-.bodywrapper .naviNextPrevious {
- margin-top:25px;
- max-width:100%;
- position: relative;
-}
-.naviNextPrevious.headerNavi,
-p.naviNextPrevious + p {
- display:none
-}
-.nextPage {
- float:right
-}
-.prevPage:before {
- content:"< "
-}
-.nextPage:after {
- content:" >"
-}
-.navigationbar li a {
- color:#404244
-}
-.navigationbar li:after {
- color:#404244;
- content:"›";
- display:inline-block;
- font-size:1.5em;
- line-height:1;
- position:absolute;
- right:-2px;
- top:-4px
-}
-.sub-navigation {
- margin-top:10px
-}
-.navigationbar li:last-child:after,.sub-navigation li:after {
- content:none
-}
-.navigationbar {
- margin-bottom:10px;
- line-height:1em
-}
-#buildversion {
- margin-bottom:10px;
- font-style:italic;
- font-size:small;
- float:right
-}
-.copy-notice {
- width:75%;
- font-size:0.75em;
- margin:20px 35px 0 10px;
- line-height:1.75em;
- float:right;
- color:#585a5c
-}
-.copy-notice.index {
- margin-top:10px;
- float:none
-}
-li a.active {
- color:#585a5c
-}
-.flowList {
- padding:25px
-}
-.flowListDiv dl {
- -webkit-column-count:1;
- -moz-column-count:1;
- column-count:1
-}
-.flowList dd {
- display:inline-block;
- margin-left:10px;
- width:90%;
- line-height:1.15em;
- overflow-x:hidden;
- text-overflow:ellipsis
-}
-.alphaChar {
- font-size:2em;
- position:absolute
-}
-.flowList.odd {
- background-color:#f9f9f9
-}
-.body ul>li,.doc-column ul>li {
- list-style-image:url("list_arrow.png");
- margin-left:15px;
- color:#404244;
- margin-top:0.65em;
- line-height:1em
-}
-.bodywrapper table p {
- margin:0px;
- padding:0px
-}
-.bodywrapper table p {
- margin:0px;
- padding:0px;
- min-height:1.25em
-}
-.bodywrapper .qmldoc {
- margin-top:0.75em;
-}
-.body h2 {
- margin-top: 1.5em;
- font-size:1.75em
-}
-.body h3 {
- font-size:1.35em
-}
-.body h4 {
- font-size:1.15em
-}
-.body p img {
- margin-top:0.75em;
- max-width:100%
-}
-.body .border img {
- box-shadow:3px 3px 8px 3px rgba(200,200,200,0.5)
-}
-.body .border .player {
- box-shadow:3px 3px 8px 3px rgba(200,200,200,0.5)
-}
-.body p.figCaption {
- transform:translateY(-30px);
- color:#606366;
- font-size:95%;
- margin-left:3px;
- font-style:italic
-}
-.body table {
- width:initial;
- vertical-align:initial
-}
-table .odd {
- background-color:#f9f9f9
-}
-table thead {
- text-align:left;
- padding-left:20px
-}
-table,table td,table th {
- border:1px solid #eee
-}
-table td,table th {
- padding:5px 20px;
- line-height:1.3
-}
-.body .fixed table td {
- min-width:50%;
- width:50%
-}
-table.alignedsummary,table.propsummary {
- width:initial
-}
-table.valuelist td.tblval {
- font-size:0.75em
-}
-div.main_index .row {
- border-bottom:10px solid #f3f3f4
-}
-div.main_index .row {
- position:relative
-}
-div.main_index .row>div {
- display:inline-block;
- width:50%;
- vertical-align:top;
- padding:2em 3em;
- -webkit-box-sizing:border-box;
- -moz-box-sizing:border-box;
- -ms-box-sizing:border-box;
- box-sizing:border-box
-}
-div.main_index h2 {
- font-size:2.1875em;
- margin-bottom:1em
-}
-#search_bar {
- width:40%;
- float:right
-}
-div.main_index .row:after {
- content:"";
- position:absolute;
- top:0;
- right:50%;
- height:100%;
- width:10px;
- background-color:#f3f3f4
-}
-div.table {
- overflow-x:auto
-}
-.body tr > td > pre {
- font-size:0.75em
-}
-p.qt_commercial {
- border:3px solid #5caa15;
- margin:0 auto;
- padding:15px;
- width:28%;
- text-align:center;
- clear:both
-}
-h1.qt_commercial {
- padding:20px;
- background-color:#5caa15;
- display:inline;
- float:right;
- font-size:1.25em;
- line-height:1.25em;
- height:1.25em;
- color:#fff
-}
-div.qt_commercial {
- border-top:5px solid #5caa15;
- margin-bottom:50px
-}
-div.pre {
- position:relative;
- height:auto
-}
-pre, .LegaleseLeft {
- background-color:#222840;
- color:#fff;
- display:block;
- font-family: 'Droid Sans Mono', monospace;
- line-height:1.5;
- overflow-x:auto;
- margin-bottom:25px;
- padding:25px;
- margin-top:0.75em;
- font-size: .8em;
-}
-.bodywrapper .LegaleseLeft p {
- color:#fff;
- white-space: pre-wrap;
-}
-pre .str,code .str {
- color:#aaaaaa
-}
-pre .kwd,code .kwd {
- color:#ffff55
-}
-pre .com,code .com {
- color:#55ffff
-}
-pre .typ,code .typ {
- color:#4f9d08
-}
-pre a .typ,code a .typ {
- color:#21be2b
-}
-pre .lit,code .lit {
- color:#ff55ff
-}
-pre .pun,code .pun {
- color:#fff
-}
-pre .pln,code .pln {
- color:#fff
-}
-@media print {
- pre {
- background-color:#eee !important
- }
- pre .str,code .str {
- color:#060
- }
- pre .kwd,code .kwd{
- color:#006;
- font-weight:bold
- }
- pre .com,code .com {
- color:#600
- }
- pre .typ,code .typ {
- color:#404;
- font-weight:bold
- }
- pre .lit,code .lit {
- color:#044
- }
- pre .pun,code .pun {
- color:#440
- }
- pre .pln,code .pln {
- color:#000
- }
-}
-pre.wrap {
- white-space:pre-wrap
-}
-pre span.wrap {
- display:none;
- background:url("wrap.png") no-repeat;
- right:0;
- top:2px;
- position:absolute;
- width:20px;
- height:14px;
- margin:4px;
- opacity:0.65
-}
-
-span.pre {
- color: black;
- font-family: monospace;
- font-weight: normal;
- background-color: #eaeaea;
- padding: 2px 4px;
- color: black;
- border-radius: 2px;
-}
-
-span.wrap:hover {
- opacity:1
-}
-span.wrap:active {
- opacity:0.75
-}
-.copy_text {
- background-color:#46a2da;
- color:#fff;
- border:2px solid #46a2da;
- padding:10px 16px;
- margin-left:-10px;
- margin-top:-50px;
- position:absolute;
- opacity:0;
- cursor:pointer;
- float:right
-}
-.copy_text:hover {
- background-color:#fff;
- color:#46a2da
-}
-code,.codelike {
- font-family: 'Droid Sans Mono', monospace;
-}
-#detailed-description .function dt > code,
-#detailed-description .function dt > em {
- font-weight:bold
-}
-h3.fn code {
- font-size:0.75em;
- float:right;
- background-color:#eee;
- padding:3px;
- margin: 3px 0 0 20px
-}
-pre:hover>.copy_text {
- display:inline-block;
- opacity:1;
- transition:0.5s ease
-}
-#main_title_bar {
- background:url("pyside-logo.png") no-repeat;
- background-size:100%;
- width:366px;
- height:86px;
- margin:15px 0 15px 0
-}
-#main_title_bar h1 {
- visibility:hidden
-}
-#main_title_bar .search_bar {
- letter-spacing:normal;
- width:50%;
- display:inline-block;
- -webkit-box-sizing:border-box;
- -moz-box-sizing:border-box;
- -ms-box-sizing:border-box;
- box-sizing:border-box;
- vertical-align:middle
-}
-#main_title_bar h1 {
- letter-spacing:normal;
- display:inline-block;
- -webkit-box-sizing:border-box;
- -moz-box-sizing:border-box;
- -ms-box-sizing:border-box;
- box-sizing:border-box;
- vertical-align:middle
-}
-#main_title_bar .search_bar * {
- letter-spacing:normal;
- padding:0;
- margin:0;
- border:none
-}
-#sidebar-toggle,#toc-toggle {
- display:none
-}
-@media (max-width: 980px) {
- body {
- font-size:calc-em(14px)
- }
- #main_title_bar>h1,#main_title_bar .search_bar {
- width:100%
- }
- #main_title_bar .search_bar {
- margin-bottom:15px
- }
- .main {
- margin-top:0px
- }
- .main_index .row {
- border:none !important
- }
- .title {
- font-size:1.5em;
- font-weight:400;
- word-wrap:break-word
- }
- .col-1,.body,.naviNextPrevious,.sidebar {
- padding:10px
- }
- .sidebar {
- position:relative;
- padding-top:0
- }
- .search .sidebar {
- display:none;
- visibility:hidden
- }
- .col-2 h2,.toc h3,.sidebar-content h2,.sidebar-content h3,.sectionlist h2 {
- text-align:center;
- margin-bottom:5px
- }
- div.main_index .row:after {
- content:none
- }
- div.main_index .row>div {
- display:block !important;
- width:100%;
- padding:15px;
- margin:0
- }
- .body,.sidebar,.col-1 {
- width:100%
- }
- .sidebar-content,.col-2,.toc {
- background-color:#fff;
- margin-bottom:1em;
- padding:20px
- }
- #sidebar-toggle,#toc-toggle {
- display:block
- }
- #sidebar-toggle.collapsed + h2 {
- display:block
- }
- .bodywrapper p {
- margin-bottom:1em;
- max-width:100%
- }
- table td,table th {
- padding:5px 5px
- }
- .sectionlist {
- padding:0
- }
- .sidebar > .sectionlist {
- padding:20px
- }
- .sectionlist.promo {
- max-width:46%;
- margin:0 auto 1em auto;
- float:left;
- padding:0 2%
- }
- .sidebar .sidebar-content {
- clear:both
- }
- .copy-notice {
- float:none;
- width:initial
- }
-}
-[id]:target > *:first-child,
-dt[id]:target {
- -webkit-animation:highlighter 3s;
- animation:highlighter 3s
-}
-@-webkit-keyframes highlighter {
- 25% {
- background-color:#d1e8f6;
- color:#444
- }
- 75% {
- background-color:#d1e8f6;
- color:#444
- }
-}
-@keyframes highlighter {
- 25% {
- background-color:#d1e8f6;
- color:#444
- }
- 75% {
- background-color:#d1e8f6;
- color:#444
- }
-}
-@-webkit-keyframes copypaste {
- 25% {
- opacity:1
- }
- 100% {
- border-radius:10px;
- margin-top:-50px;
- opacity:1
- }
-}
-@keyframes copypaste {
- 25% {
- opacity:1
- }
- 100% {
- border-radius:10px;
- margin-top:-50px;
- opacity:1
- }
-}
-#footer {
- clear:both
-}
-.footer-social i {
- font-family: "social-icons";
- font-style: normal;
- font-size:150%;
- margin: .55em;
- color: #cecfd5
-}
-.footer-social i:hover {
- color: #eee
-}
-.footer-social .icon-twitter:before {
- content: '\f099'
-}
-.footer-social .icon-facebook:before {
- content: '\f09a'
-}
-.footer-social .icon-youtube:before {
- content: '\f16a'
-}
-.menuextraslanguages {
- display:none;
- visibility:hidden
-}
-form.gsc-search-box {
- font-size: 25px !important;
- margin-top: 0 !important;
- margin-right: 0 !important;
- margin-bottom: 4px !important;
- margin-left: 0 !important;
- width: 102.5% !important;
-}
-table.gsc-search-box {
- border-style: none !important;
- border-width: 0 !important;
- border-spacing: 0 0 !important;
- width: 100% !important;
- margin-bottom: 2px !important;
-}
-
-table.gsc-search-box td {
- vertical-align: middle !important;
-}
-
-table.gsc-search-box td.gsc-input {
- padding-right: 0px !important;
-}
-table.gsc-search-box td.gsc-input input {
- background-position: 10px center !important;
-}
-
-td.gsc-search-button {
- width: 1% !important;
-}
-
-td.gsc-clear-button {
- width: 14px !important;
- visibility:hidden !important;
- display:none !important;
-}
-table.gsc-branding td,
-table.gsc-branding {
- margin: 0 0 0 0 !important;
- padding: 0 0 0 0 !important;
- border: none !important;
-}
-
-table.gsc-branding {
- border-style: none !important;
- border-width: 0 !important;
- border-spacing: 0 0 !important;
- width: 100% !important;
-}
-
-.gsc-branding-text {
- color: #676767 !important;
-}
-
-td.gsc-branding-text {
- vertical-align: top !important;
-}
-td.gsc-branding-text div.gsc-branding-text {
- padding-bottom: 2px !important;
- text-align: right !important;
- font-size: 11px !important;
- margin-right: 2px !important;
-}
-
-td.gsc-branding-img {
- width: 65px !important;
- vertical-align: bottom !important;
-}
-
-img.gsc-branding-img {
- padding-top: 1px !important;
- margin: 0 0 0 0 !important;
- padding-right: 0 !important;
- padding-left: 0 !important;
- padding-bottom: 0 !important;
- border: none !important;
- display: inline !important;
-}
-
-input.gsc-search-button {
- background-color: white !important;
- height: 35px !important;
- width: 25px !important;
- color: transparent !important;
- background-image: url("doc_search.png") !important;
- background-size: 25px auto;
- background-position: 0px 5px;
- background-repeat: no-repeat;
- margin-left: -43px !important;
- overflow: hidden;
- min-width: 20px !important;
-}
-
-input.gsc-search-button:hover {
- cursor: pointer;
-}
-
-input.gsc-search-button:focus {
- outline: none;
- box-shadow: none;
-}
-
-.gsc-search-box-tools .gsc-clear-button {
- display: none !important;
- visibility: none !important;
-}
-
-.gsc-overflow-hidden {
- overflow: hidden !important;
-}
-
-input.gsc-input {
- background-color: #fff !important;
- border: 1px solid #d6d6d6 !important;
- box-sizing: border-box !important;
- -moz-box-sizing: border-box !important;
- color: #868482 !important;
- outline: 0 none !important;
- padding: 9px 10px 10px !important;
- transition: color 0.5s ease 0s, box-shadow 0.5s ease 0s, background-color 0.5s ease 0s !important;
-}
-
-input {
- font-family: 'Titillium Web', Arial, Helvetica, sans-serif !important;
- line-height: 1.5 !important;
- font-weight: 300 !important;
- vertical-align:middle
-}
-
-input:focus {
- border-color: #46a2da;
- box-shadow: 0 0 5px #46a2da;
- color: #000;
-}
-
-.animation {
- width: 100%;
- border-style: none;
- border-width: 0
-}
-
-.player {
- width: auto;
- position: relative;
- display: table;
- margin-bottom:1.5em;
-}
-
-.playcontrol {
- display: none;
- background: url("play_icon.svg") no-repeat center,
- linear-gradient(
- rgba(0,0,0,0.15), rgba(0,0,0,0.15)
- );
- background-size: 25%;
- width: 100%;
- height: 100%;
- position: absolute;
- left: 0%;
- right: 0%;
- top: 0%;
- bottom: 0%;
- margin: auto
-}
-
-/* expand/collapse code sections */
-pre input {
- display:none;
- visibility:hidden
-}
-pre label {
- display:block;
- margin:-3px 3px 0 -16px;
- text-align:center;
- color:#21be2b;
- float:left;
-}
-pre label:hover {
- color:#fff
-}
-pre label::before {
- font-weight:600;
- font-size:16px;
- content:"+";
- display:inline-block;
- width:16px;
- height:16px
-}
-#ec_expand {
- height:16px;
- overflow:hidden;
- transition:height 0.35s;
-}
-#ec_expand::before {
- content:"...*/";
- color:#aaa;
- background-color:#3a4055;
- z-index:99 !important;
- right:25px;
- position:absolute
-}
-#ec_toggle:checked ~ #ec_expand {
- height:initial
-}
-#ec_toggle:checked ~ #ec_expand::before {
- content:""
-}
-#ec_toggle:checked ~ label::before {
- content:"-"
-}
-
-/* permalinks */
-h1:hover > .headerlink,
-h2:hover > .plink,
-h2:hover > .headerlink,
-h3:hover > .plink,
-h3:hover > .headerlink,
-h4:hover > .plink,
-h4:hover > .headerlink,
-h5:hover > .plink,
-h5:hover > .headerlink {
- opacity:1
-}
-a.plink, a.headerlink {
- opacity: 0;
- padding-left: 8px;
- font-size: 0.8em;
- font-weight: 600;
- transition: opacity 180ms ease-in-out
-}
-a.plink::before {
- content:'\00B6'
-}
-
-table.special {
- border: 3px;
- padding: 0px;
- border-collapse: separate;
- border-spacing: 20px;
- line-height: 1.5em;
- table-layout: fixed;
- width: 80%;
-}
-
-.special p {
- text-align: center;
- color: #3a4055;
-}
-
-.special a {
- display: block;
- border-bottom: 0;
- text-decoration: none;
-}
-
-.special a:hover {
- border-bottom: 0;
- text-decoration: none;
-}
-
-.special strong {
- color: #17a81a;
- font-size: 110%;
- font-weight: normal;
-}
-
-table.special th,
-table.special td {
- border: 1px solid #888;
- padding-top: 14px;
- padding-bottom: 14px;
- padding-left: 6px;
- padding-right: 5px;
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- -khtml-border-radius: 5px;
- overflow: hidden;
-}
-
-.special td:hover {
- padding-top: 14px;
- padding-bottom: 10px;
- border-bottom: 4px solid #41cd52;
- overflow: hidden;
-}
-
-.command {
- font-family: monospace;
- font-weight: normal;
- background-color: #9cd1a6;
- padding: 2px 4px;
- color: black;
- border-radius: 2px;
-}
-
-div.leftside {
- width: 50%;
- padding: 0px 50px 0px 0px;
- float: left;
-}
-
-div.rightside {
- margin-left: 50%;
-}
-
-.btn-qt:hover,
-.btn-qt:active,
-.btn-qt:focus,
-.btn-qt.active {
- background: #41cd52;
- color: #fff !important;
- border-color: #fff;
-}
-
-/* Using !important is not recommended, but out CSS is being added
- * to the pages before the bootstrap ones, so we cannot override them
- * without using it */
-.btn-qt {
- color: #41cd52 !important;
- border-color: #41cd52 !important;
- font-weight: bold !important;
-}
-
-.card {
- height: 250px;
- text-align: center;
-}
-
-.card-img-top {
- object-fit: cover;
- width: 50px;
- height: 120px;
-}
-
-.card-body {
- vertical-align: middle;
- padding: 5px !important;
- text-align: center;
-}
diff --git a/sources/pyside6/doc/_themes/pysidedocs/static/pysidelogo.png b/sources/pyside6/doc/_themes/pysidedocs/static/pysidelogo.png
deleted file mode 100644
index 3a2f2bd17..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/static/pysidelogo.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside6/doc/_themes/pysidedocs/static/relbar_bg.png b/sources/pyside6/doc/_themes/pysidedocs/static/relbar_bg.png
deleted file mode 100644
index 4036733a7..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/static/relbar_bg.png
+++ /dev/null
Binary files differ
diff --git a/sources/pyside6/doc/_themes/pysidedocs/theme.conf b/sources/pyside6/doc/_themes/pysidedocs/theme.conf
deleted file mode 100644
index 01a4dd4a1..000000000
--- a/sources/pyside6/doc/_themes/pysidedocs/theme.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-[theme]
-inherit = default
-stylesheet = pyside.css
-pygments_style = none
-
-[options]
-nosidebar = false
diff --git a/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/pyside.css b/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/pyside.css
index aee5e4420..94134cacf 100644
--- a/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/pyside.css
+++ b/sources/pyside6/doc/_themes/pysidedocs_qthelp/static/pyside.css
@@ -466,7 +466,7 @@ tt.descname {
position:relative
}
#menuextras li a:hover span {
- color: #41cd52;
+ color: #2cde85;
}
/* new header */
#mm-wrap, #mm-wrap #mm-helper,
@@ -557,14 +557,14 @@ tt.descname {
display:inline;
float:left;
width:31px;
- color:#41cd52
+ color:#2cde85
}
#navbar .navbar-oneQt:before {
content:attr(data-icon);
position:absolute;
top:14px;
left:0;
- color:#41cd52;
+ color:#2cde85;
font-family:'Qt Icons';
line-height:1;
font-size:40px;
@@ -1939,5 +1939,5 @@ table.special td {
.special td:hover {
padding-top: 2px;
padding-bottom: 2px;
- border-bottom: 4px solid #41cd52;
+ border-bottom: 4px solid #2cde85;
}
diff --git a/sources/pyside6/doc/additionaldocs.lst b/sources/pyside6/doc/additionaldocs.lst
index 037cb60f7..81da58370 100644
--- a/sources/pyside6/doc/additionaldocs.lst
+++ b/sources/pyside6/doc/additionaldocs.lst
@@ -1,55 +1,7 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-# This is a list of additional documentation files created by the below script
-# and some hand-editing.
-# for F in *.webxml
-# do
-# echo "$F" | egrep '(-index)|(-module)|(-qmlmodule)\.webxml$' > /dev/null
-# if [ $? -ne 0 ]
-# then
-# if fgrep '<para>' "$F" > /dev/null # Exclude reference only
-# then
-# egrep "(<class )|(<namespace )" $F > /dev/null || echo $F
-# fi
-# fi
-# done
+# see README.md
# A line enclosed in [] denotes a (relative) target directory
[overviews]
@@ -57,30 +9,28 @@ animation-overview.webxml
animation.webxml
application-windows.webxml
audiooverview.webxml
-bearer-management.webxml
+bindableproperties.webxml
+bluetooth-examples.webxml
cameraoverview.webxml
-# changes.webxml
-codec-big5.webxml
-codec-big5hkscs.webxml
-codec-eucjp.webxml
-codec-euckr.webxml
-codec-gbk.webxml
-codec-sjis.webxml
-codec-tscii.webxml
-codecs-jis.webxml
compatmap.webxml
-# containers.webxml
+concurrent-changes-qt6.webxml
+containers.webxml
coordsys.webxml
creating-a-sensor-plugin.webxml
custom-types.webxml
+database.webxml
datastreamformat.webxml
-datavisualization-examples.webxml
+dbus-changes-qt6.webxml
determining-the-default-sensor-for-a-type.webxml
dialogs.webxml
dnd.webxml
dynamic-sensor-backend-registration.webxml
+echoclient.webxml
+echoserver.webxml
events.webxml
eventsandfilters.webxml
+examples-dbus.webxml
+examples-designer.webxml
examples-desktop.webxml
examples-dialogs.webxml
examples-graphicsview.webxml
@@ -89,6 +39,8 @@ examples-mainwindow.webxml
examples-network.webxml
examples-painting.webxml
examples-qthelp.webxml
+examples-qtnetworkauth.webxml
+examples-qtscxml.webxml
examples-qtuitools.webxml
examples-richtext.webxml
examples-widgets-opengl.webxml
@@ -98,191 +50,233 @@ gallery.webxml
genericbackend.webxml
gestures-overview.webxml
graphicsview.webxml
-guibooks.webxml
+gui-changes-qt6.webxml
helpsystem.webxml
implicit-sharing.webxml
io-functions.webxml
io.webxml
+java-style-iterators.webxml
json.webxml
layout.webxml
-location-cpp-qml.webxml
-location-maps-cpp.webxml
-location-maps-qml.webxml
-location-places-backend.webxml
-location-places-cpp.webxml
-location-places-qml.webxml
-location-plugin-esri.webxml
-location-plugin-here.webxml
-location-plugin-itemsoverlay.webxml
-location-plugin-mapbox.webxml
-location-plugin-mapboxgl.webxml
-location-plugin-osm.webxml
-location-positioning-cpp.webxml
-location-positioning-qml.webxml
mainwindow.webxml
metaobjects.webxml
model-view-programming.webxml
modelview.webxml
multimedia-examples.webxml
-multimediabackend.webxml
multimediaoverview.webxml
+network-changes-qt6.webxml
+network.webxml
+nfc-android.webxml
+nfc-examples.webxml
object.webxml
objecttrees.webxml
+opengl-changes-qt6.webxml
+painting-3d.webxml
painting.webxml
paintsystem-devices.webxml
paintsystem-drawing.webxml
paintsystem-images.webxml
paintsystem.webxml
-pdf-licensing.webxml
plugins.webxml
+position-plugin-geoclue2.webxml
+position-plugin-gypsy.webxml
+position-plugin-nmea.webxml
positioning-cpp-qml.webxml
+printing.webxml
+printsupport-changes-qt6.webxml
properties.webxml
-qfloat16.webxml
+qabstracteventdispatcher-timerinfo.webxml
+qabstracttextdocumentlayout-paintcontext.webxml
+qabstracttextdocumentlayout-selection.webxml
+qaccessible-state.webxml
+qadoptshareddatatag.webxml
+qcborerror.webxml
+qcborparsererror.webxml
+qcborstreamreader-stringresult.webxml
+qdbusdeclaringsignals.webxml
+qdbusdeclaringslots.webxml
+qdbustypesystem.webxml
+qdbusviewer.webxml
+qdbusxml2cpp.webxml
+qdrawutil-h.webxml
+qdtlsclientverifier-generatorparameters.webxml
+qformlayout-takerowresult.webxml
+qglobalstatic.webxml
+qhashseed.webxml
+qhelplink.webxml
+qiconengine-scaledpixmapargument.webxml
+qiterator.webxml
+qjsonparseerror.webxml
+qmediatimerange-interval.webxml
qml-advtutorial.webxml
+qml-changes-qt6.webxml
qml-dynamicview-tutorial.webxml
-qml-location5-maps.webxml
-qml-multimedia.webxml
-qml-qtlocation5-maps.webxml
qml-tutorial.webxml
qml-tutorial1.webxml
qml-tutorial2.webxml
qml-tutorial3.webxml
-qmlexampletoggleswitch.webxml
-qt3d-advancedcustommaterial-example.webxml
-qt3d-audio-visualizer-qml-example.webxml
+qmldiskcache.webxml
+qmlreference.webxml
+qndeffilter-record.webxml
+qoutputrange.webxml
+qpageranges-range.webxml
+qprocess-createprocessarguments.webxml
+qqmlcontext-propertypair.webxml
+qquickitem-itemchangedata.webxml
+qscxmlc.webxml
+qsggeometry-attribute.webxml
+qsggeometry-coloredpoint2d.webxml
+qsggeometry-point2d.webxml
+qsggeometry-texturedpoint2d.webxml
+qsgmaterialshader-graphicspipelinestate.webxml
+qsgmaterialtype.webxml
+qstaticplugin.webxml
qt3d-basicshapes-cpp-example.webxml
+qt3d-changes-qt6.webxml
qt3d-cpp.webxml
qt3d-examples.webxml
qt3d-multiviewport-example.webxml
qt3d-overview.webxml
qt3d-pbr-materials-example.webxml
-qt3d-planets-qml-example.webxml
qt3d-qml.webxml
-qt3d-scene2d-example.webxml
-qt3d-scene3d-example.webxml
-qt3d-shadow-map-qml-example.webxml
-qt3d-simple-cpp-example.webxml
qt3d-simple-qml-example.webxml
qt3d-simplecustommaterial-example.webxml
-qt3d-wave-example.webxml
-qt3d-widgets-scene3d-example.webxml
qt3d-wireframe-example.webxml
qt3drender-framegraph.webxml
qt3drender-geometry.webxml
+qt3drender-porting-to-rhi.webxml
qt3drender-protips.webxml
qtalgorithms.webxml
+qtbluetooth-btchat-example.webxml
+qtbluetooth-changes-qt6.webxml
+qtbluetooth-le-overview.webxml
+qtbluetooth-lowenergyscanner-example.webxml
+qtbluetooth-overview.webxml
+qtcborcommon.webxml
+qtcharts-barmodelmapper-example.webxml
+qtcharts-boxplotchart-example.webxml
+qtcharts-candlestickchart-example.webxml
+qtcharts-changes-qt6.webxml
+qtcharts-customchart-example.webxml
+qtcharts-datetimeaxis-example.webxml
+qtcharts-examples.webxml
+qtcharts-horizontalbarchart-example.webxml
+qtcharts-horizontalpercentbarchart-example.webxml
+qtcharts-horizontalstackedbarchart-example.webxml
+qtcharts-legendmarkers-example.webxml
+qtcharts-multiaxis-example.webxml
+qtcharts-openglseries-example.webxml
+qtcharts-overview.webxml
+qtcharts-pointsselectionandmarkers-example.webxml
+qtcharts-polarchart-example.webxml
+qtcharts-qmlaxes-example.webxml
+qtcharts-qmlcustomizations-example.webxml
+qtcharts-qmlcustomlegend-example.webxml
+qtcharts-qmlf1legends-example.webxml
+qtcharts-qmloscilloscope-example.webxml
+qtcharts-qmlweather-example.webxml
+qtcharts-scatterchart-example.webxml
+qtcharts-selectedbar-example.webxml
+qtcharts-splinechart-example.webxml
+qtcharts-stackedbarchart-example.webxml
+qtcharts-zoomlinechart-example.webxml
qtconcurrent-imagescaling-example.webxml
-qtconcurrent-map-example.webxml
-qtconcurrent-progressdialog-example.webxml
-qtconcurrent-runfunction-example.webxml
qtconcurrent-wordcount-example.webxml
qtconcurrentfilter.webxml
qtconcurrentmap.webxml
qtconcurrentrun.webxml
+qtconcurrenttask.webxml
+qtcore-changes-qt6.webxml
qtcore-ipc-localfortuneclient-example.webxml
qtcore-ipc-localfortuneserver-example.webxml
-qtcore-ipc-sharedmemory-example.webxml
-qtcore-mimetypes-mimetypebrowser-example.webxml
+qtcore-platform-androidnotifier-example.webxml
qtcore-serialization-savegame-example.webxml
-qtcore-threads-mandelbrot-example.webxml
qtcore-threads-queuedcustomtype-example.webxml
qtcore-threads-semaphores-example.webxml
qtcore-threads-waitconditions-example.webxml
qtcore-tools-contiguouscache-example.webxml
-qtcore-tools-customtype-example.webxml
-qtdatavisualization-audiolevels-example.webxml
-qtdatavisualization-bars-example.webxml
-qtdatavisualization-custominput-example.webxml
-qtdatavisualization-customitems-example.webxml
-qtdatavisualization-customproxy-example.webxml
-qtdatavisualization-data-handling.webxml
-qtdatavisualization-draggableaxes-example.webxml
-qtdatavisualization-interacting-with-data.webxml
-qtdatavisualization-itemmodel-example.webxml
-qtdatavisualization-known-issues.webxml
-qtdatavisualization-overview.webxml
-qtdatavisualization-qmlaxisdrag-example.webxml
-qtdatavisualization-qmlaxisformatter-example.webxml
-qtdatavisualization-qmlbars-example.webxml
-qtdatavisualization-qmlcustominput-example.webxml
-qtdatavisualization-qmllegend-example.webxml
-qtdatavisualization-qmlmultigraph-example.webxml
-qtdatavisualization-qmloscilloscope-example.webxml
-qtdatavisualization-qmlscatter-example.webxml
-qtdatavisualization-qmlspectrogram-example.webxml
-qtdatavisualization-qmlsurface-example.webxml
-qtdatavisualization-qmlsurfacelayers-example.webxml
-qtdatavisualization-rotations-example.webxml
-qtdatavisualization-scatter-example.webxml
-qtdatavisualization-surface-example.webxml
-qtdatavisualization-texturesurface-example.webxml
-qtdatavisualization-volumetric-example.webxml
+qtdbus-chat-example.webxml
+qtdbus-cmake-qt-add-dbus-adaptor.webxml
+qtdbus-cmake-qt-add-dbus-interface.webxml
+qtdbus-cmake-qt-add-dbus-interfaces.webxml
+qtdbus-cmake-qt-generate-dbus-interface.webxml
+qtdbus-complexpingpong-example.webxml
+qtdbus-remotecontrolledcar-example.webxml
+qtdesigner-calculatorbuilder-example.webxml
+qtdesigner-calculatorform-example.webxml
+qtdesigner-components.webxml
+qtdesigner-containerextension-example.webxml
+qtdesigner-customwidgetplugin-example.webxml
+qtdesigner-manual.webxml
qtest-overview.webxml
qtest-tutorial.webxml
+qtextedit-extraselection.webxml
+qtextlayout-formatrange.webxml
+qtextoption-tab.webxml
qtglobal.webxml
-qtgui-analogclock-example.webxml
-qtgui-hellovulkancubes-example.webxml
-qtgui-hellovulkantexture-example.webxml
-qtgui-hellovulkantriangle-example.webxml
-qtgui-hellovulkanwidget-example.webxml
-qtgui-hellovulkanwindow-example.webxml
-qtgui-openglwindow-example.webxml
qtgui-rasterwindow-example.webxml
+qthelp-contextsensitivehelp-example.webxml
qthelp-framework.webxml
qthelpproject.webxml
-qtlocation-changes.webxml
-qtlocation-cpp.webxml
-qtlocation-examples.webxml
-qtlocation-geoservices.webxml
-qtlocation-mapviewer-example.webxml
-qtlocation-minimal-map-example.webxml
-qtlocation-places-example.webxml
-qtlocation-places-list-example.webxml
-qtlocation-places-map-example.webxml
-qtlocation-planespotter-example.webxml
+qtilerules.webxml
+qtimezone-offsetdata.webxml
+qtjavascript.webxml
qtmath.webxml
-qtmultimedia-ios.webxml
-qtmultimedia-multimedia-audiodevices-example.webxml
-qtmultimedia-multimedia-audioengine-example.webxml
-qtmultimedia-multimedia-audioinput-example.webxml
-qtmultimedia-multimedia-audiooutput-example.webxml
-qtmultimedia-multimedia-audiorecorder-example.webxml
-qtmultimedia-multimedia-declarative-camera-example.webxml
-qtmultimedia-multimedia-declarative-radio-example.webxml
-qtmultimedia-multimedia-spectrum-example.webxml
-qtmultimedia-multimedia-video-qmlvideo-example.webxml
-qtmultimedia-multimedia-video-qmlvideofx-example.webxml
-qtmultimedia-multimediawidgets-camera-example.webxml
-qtmultimedia-multimediawidgets-player-example.webxml
-qtmultimedia-multimediawidgets-videographicsitem-example.webxml
-qtmultimedia-multimediawidgets-videowidget-example.webxml
-qtmultimedia-windows.webxml
-qtnetwork-blockingfortuneclient-example.webxml
+qtmultimedia-apple.webxml
+qtmultimedia-changes-qt6.webxml
qtnetwork-broadcastreceiver-example.webxml
qtnetwork-broadcastsender-example.webxml
-qtnetwork-download-example.webxml
-qtnetwork-downloadmanager-example.webxml
-qtnetwork-fortuneclient-example.webxml
-qtnetwork-fortuneserver-example.webxml
-qtnetwork-googlesuggest-example.webxml
qtnetwork-http-example.webxml
-qtnetwork-loopback-example.webxml
qtnetwork-multicastreceiver-example.webxml
qtnetwork-multicastsender-example.webxml
qtnetwork-network-chat-example.webxml
qtnetwork-programming.webxml
qtnetwork-securesocketclient-example.webxml
-qtnetwork-threadedfortuneserver-example.webxml
+qtnetwork-secureudpclient-example.webxml
+qtnetwork-secureudpserver-example.webxml
qtnetwork-torrent-example.webxml
+qtnfc-annotatedurl-example.webxml
+qtnfc-changes-qt6.webxml
+qtnfc-ndefeditor-example.webxml
+qtnfc-overview.webxml
qtopengl-2dpainting-example.webxml
qtopengl-cube-example.webxml
-qtopengl-hellogl2-example.webxml
+qtopengl-hellogles3-example.webxml
+qtopengl-openglwindow-example.webxml
+qtplugin.webxml
+qtpositioning-android.webxml
+qtpositioning-changes-qt6.webxml
qtpositioning-examples.webxml
-qtpositioning-geoflickr-example.webxml
+qtpositioning-ios.webxml
qtpositioning-logfilepositionsource-example.webxml
qtpositioning-plugins.webxml
qtpositioning-satelliteinfo-example.webxml
qtpositioning-weatherinfo-example.webxml
+qtqml-documents-definetypes.webxml
+qtqml-documents-networktransparency.webxml
+qtqml-documents-scope.webxml
+qtqml-documents-structure.webxml
+qtqml-documents-topic.webxml
+qtqml-dynamicscene-example.webxml
+qtqml-javascript-dynamicobjectcreation.webxml
+qtqml-javascript-expressions.webxml
+qtqml-javascript-finetuning.webxml
+qtqml-javascript-functionlist.webxml
+qtqml-javascript-hostenvironment.webxml
+qtqml-javascript-imports.webxml
+qtqml-javascript-qmlglobalobject.webxml
+qtqml-javascript-resources.webxml
+qtqml-javascript-topic.webxml
+qtqml-qml-i18n-example.webxml
+qtqml-syntax-basics.webxml
+qtqml-syntax-directoryimports.webxml
+qtqml-syntax-imports.webxml
+qtqml-syntax-objectattributes.webxml
+qtqml-syntax-propertybinding.webxml
+qtqml-tutorials-extending-qml-example.webxml
+qtqml-typesystem-basictypes.webxml
+qtqml-typesystem-objecttypes.webxml
+qtqml-typesystem-topic.webxml
qtquick-animation-example.webxml
qtquick-bestpractices.webxml
qtquick-canvas-example.webxml
@@ -292,23 +286,11 @@ qtquick-cppextensionpoints.webxml
qtquick-customitems-dialcontrol-example.webxml
qtquick-customitems-flipable-example.webxml
qtquick-customitems-painteditem-example.webxml
-qtquick-customitems-scrollbar-example.webxml
-qtquick-customitems-tabwidget-example.webxml
-qtquick-demos-calqlatr-example.webxml
-qtquick-demos-clocks-example.webxml
-qtquick-demos-maroon-example.webxml
-qtquick-demos-photosurface-example.webxml
-qtquick-demos-photoviewer-example.webxml
-qtquick-demos-rssnews-example.webxml
-qtquick-demos-samegame-example.webxml
-qtquick-demos-stocqt-example.webxml
-qtquick-demos-tweetsearch-example.webxml
qtquick-draganddrop-example.webxml
qtquick-effects-particles.webxml
qtquick-effects-sprites.webxml
qtquick-effects-topic.webxml
qtquick-effects-transformations.webxml
-qtquick-externaldraganddrop-example.webxml
qtquick-imageelements-example.webxml
qtquick-imageprovider-example.webxml
qtquick-imageresponseprovider-example.webxml
@@ -319,12 +301,12 @@ qtquick-input-topic.webxml
qtquick-keyinteraction-example.webxml
qtquick-layouts-example.webxml
qtquick-localstorage-example.webxml
+qtquick-models-abstractitemmodel-example.webxml
qtquick-modelviewsdata-cppmodels.webxml
qtquick-modelviewsdata-modelview.webxml
qtquick-modelviewsdata-topic.webxml
qtquick-mousearea-example.webxml
qtquick-particles-affectors-example.webxml
-qtquick-particles-customparticle-example.webxml
qtquick-particles-emitters-example.webxml
qtquick-particles-imageparticle-example.webxml
qtquick-particles-performance.webxml
@@ -335,24 +317,28 @@ qtquick-positioning-layouts.webxml
qtquick-positioning-righttoleft.webxml
qtquick-positioning-topic.webxml
qtquick-quick-accessibility-example.webxml
-qtquick-righttoleft-example.webxml
-qtquick-scenegraph-customgeometry-example.webxml
+qtquick-quickwidgets-quickwidget-example.webxml
+qtquick-scenegraph-custommaterial-example.webxml
+qtquick-scenegraph-d3d11underqml-example.webxml
+qtquick-scenegraph-graph-example.webxml
qtquick-scenegraph-materials.webxml
+qtquick-scenegraph-metaltextureimport-example.webxml
+qtquick-scenegraph-metalunderqml-example.webxml
qtquick-scenegraph-nodes.webxml
-qtquick-scenegraph-openglunderqml-example.webxml
-qtquick-scenegraph-simplematerial-example.webxml
+qtquick-scenegraph-twotextureproviders-example.webxml
+qtquick-scenegraph-vulkantextureimport-example.webxml
+qtquick-scenegraph-vulkanunderqml-example.webxml
qtquick-shadereffects-example.webxml
qtquick-shapes-example.webxml
qtquick-statesanimations-animations.webxml
qtquick-statesanimations-behaviors.webxml
qtquick-statesanimations-states.webxml
qtquick-statesanimations-topic.webxml
+qtquick-tableview-gameoflife-example.webxml
+qtquick-tableview-pixelator-example.webxml
qtquick-text-example.webxml
-qtquick-text-validator.webxml
-qtquick-threading-example.webxml
-qtquick-threading-threadedlistmodel-example.webxml
+qtquick-tool-qmllint.webxml
qtquick-tools-and-utilities.webxml
-qtquick-touchinteraction-example.webxml
qtquick-tutorials-dynamicview-dynamicview1-example.webxml
qtquick-tutorials-dynamicview-dynamicview2-example.webxml
qtquick-tutorials-dynamicview-dynamicview3-example.webxml
@@ -362,7 +348,6 @@ qtquick-tutorials-samegame-samegame2-example.webxml
qtquick-tutorials-samegame-samegame3-example.webxml
qtquick-tutorials-samegame-samegame4-example.webxml
qtquick-views-example.webxml
-qtquick-visualcanvas-adaptations-d3d12.webxml
qtquick-visualcanvas-adaptations-openvg.webxml
qtquick-visualcanvas-adaptations-software.webxml
qtquick-visualcanvas-adaptations.webxml
@@ -372,130 +357,152 @@ qtquick-visualcanvas-scenegraph.webxml
qtquick-visualcanvas-topic.webxml
qtquick-visualcanvas-visualparent.webxml
qtquick-visualtypes-topic.webxml
-qtquick-window-example.webxml
+qtquickcontrols-changes-qt6.webxml
+qtquickcontrols-chattutorial-example.webxml
+qtquickcontrols-contactlist-example.webxml
+qtquickcontrols-eventcalendar-example.webxml
+qtquickcontrols-flatstyle-example.webxml
+qtquickcontrols-imagine-automotive-example.webxml
+qtquickcontrols-texteditor-example.webxml
+qtquickcontrols-wearable-example.webxml
+qtquickcontrols-basic.webxml
+qtquickcontrols-buttons.webxml
+qtquickcontrols-configuration.webxml
+qtquickcontrols-containers.webxml
+qtquickcontrols-customize.webxml
+qtquickcontrols-delegates.webxml
+qtquickcontrols-deployment.webxml
+qtquickcontrols-environment.webxml
+qtquickcontrols-examples.webxml
+qtquickcontrols-fileselectors.webxml
+qtquickcontrols-focus.webxml
+qtquickcontrols-fusion.webxml
+qtquickcontrols-gettingstarted.webxml
+qtquickcontrols-guidelines.webxml
+qtquickcontrols-icons.webxml
+qtquickcontrols-imagine.webxml
+qtquickcontrols-indicators.webxml
+qtquickcontrols-input.webxml
+qtquickcontrols-macos.webxml
+qtquickcontrols-material.webxml
+qtquickcontrols-menus.webxml
+qtquickcontrols-navigation.webxml
+qtquickcontrols-popups.webxml
+qtquickcontrols-separators.webxml
+qtquickcontrols-styles.webxml
+qtquickcontrols-universal.webxml
+qtquickcontrols-windows.webxml
qtquicklayouts-overview.webxml
-qtsensorgestures-cpp.webxml
-qtsensors-accelbubble-example.webxml
+qtremoteobjects-cmake-qt-add-repc-merged.webxml
+qtremoteobjects-cmake-qt-add-repc-replicas.webxml
+qtremoteobjects-cmake-qt-add-repc-sources.webxml
+qtremoteobjects-cmake-qt-rep-from-headers.webxml
+qtremoteobjects-compatibility.webxml
+qtremoteobjects-custom-transport.webxml
+qtremoteobjects-external-schemas.webxml
+qtremoteobjects-gettingstarted.webxml
+qtremoteobjects-interaction.webxml
+qtremoteobjects-node.webxml
+qtremoteobjects-registry.webxml
+qtremoteobjects-repc.webxml
+qtremoteobjects-replica.webxml
+qtremoteobjects-source.webxml
+qtremoteobjects-ssl-example.webxml
+qtremoteobjects-troubleshooting.webxml
+qtremoteobjects-websockets-example.webxml
+qtscxml-changes-qt6.webxml
+qtscxml-cmake-qt-add-statecharts.webxml
+qtscxml-ftpclient-example.webxml
+qtscxml-instantiating-state-machines.webxml
+qtscxml-overview.webxml
+qtscxml-scxml-compliance.webxml
+qtscxml-sudoku-example.webxml
+qtscxml-trafficlight-qml-dynamic-example.webxml
+qtscxml-trafficlight-qml-simple-example.webxml
+qtscxml-trafficlight-qml-static-example.webxml
+qtscxml-trafficlight-widgets-dynamic-example.webxml
+qtscxml-trafficlight-widgets-static-example.webxml
+qtsensors-changes-qt6.webxml
qtsensors-cpp.webxml
qtsensors-examples.webxml
-qtsensors-grue-example.webxml
-qtsensors-maze-example.webxml
-qtsensors-porting.webxml
-qtsensors-qmlqtsensors-example.webxml
-qtsensors-qmlsensorgestures-example.webxml
-qtsensors-sensor-explorer-example.webxml
-qtsensors-sensorgestures-example.webxml
-qtsensors-shakeit-example.webxml
-qtsql-books-example.webxml
+qtsensors-sensorsshowcase-example.webxml
+qtserialport-blockingreceiver-example.webxml
+qtserialport-blockingsender-example.webxml
+qtserialport-changes-qt6.webxml
+qtserialport-examples.webxml
+qtserialport-terminal-example.webxml
qtsql-cachedtable-example.webxml
+qtsql-changes-qt6.webxml
qtsql-drilldown-example.webxml
qtsql-masterdetail-example.webxml
+qtsql-querymodel-example.webxml
+qtsql-sqlbrowser-example.webxml
qtsql-sqlwidgetmapper-example.webxml
-qtsvg-richtext-textobject-example.webxml
-qtsvg-svggenerator-example.webxml
-qtsvg-svgviewer-example.webxml
+qtsql-tablemodel-example.webxml
+qtsvg-changes-qt6.webxml
+qttest-best-practices-qdoc.webxml
qttestlib-tutorial1-example.webxml
qttestlib-tutorial2-example.webxml
qttestlib-tutorial3-example.webxml
qttestlib-tutorial4-example.webxml
qttestlib-tutorial5-example.webxml
qttestlib-tutorial6.webxml
-qtuitools-multipleinheritance-example.webxml
qtuitools-textfinder-example.webxml
-qtwidgets-animation-easing-example.webxml
-qtwidgets-animation-moveblocks-example.webxml
-qtwidgets-animation-stickman-example.webxml
-qtwidgets-animation-sub-attaq-example.webxml
-qtwidgets-desktop-screenshot-example.webxml
-qtwidgets-desktop-systray-example.webxml
-qtwidgets-dialogs-classwizard-example.webxml
-qtwidgets-dialogs-extension-example.webxml
-qtwidgets-dialogs-findfiles-example.webxml
-qtwidgets-dialogs-licensewizard-example.webxml
-qtwidgets-dialogs-tabdialog-example.webxml
-qtwidgets-dialogs-trivialwizard-example.webxml
-qtwidgets-draganddrop-draggableicons-example.webxml
-qtwidgets-draganddrop-dropsite-example.webxml
-qtwidgets-draganddrop-fridgemagnets-example.webxml
-qtwidgets-draganddrop-puzzle-example.webxml
-qtwidgets-effects-blurpicker-example.webxml
-qtwidgets-effects-fademessage-example.webxml
+qtwebchannel-changes-qt6.webxml
+qtwebchannel-chatclient-html-example.webxml
+qtwebchannel-chatclient-qml-example.webxml
+qtwebchannel-chatserver-cpp-example.webxml
+qtwebchannel-examples.webxml
+qtwebchannel-javascript.webxml
+qtwebengine-changes-qt6.webxml
+qtwebengine-features.webxml
+qtwebengine-overview.webxml
+qtwebengine-platform-notes.webxml
+qtwebengine-webenginequick-lifecycle-example.webxml
+qtwebengine-webenginewidgets-contentmanipulation-example.webxml
+qtwebengine-webenginewidgets-cookiebrowser-example.webxml
+qtwebengine-webenginewidgets-html2pdf-example.webxml
+qtwebengine-webenginewidgets-maps-example.webxml
+qtwebengine-webenginewidgets-printme-example.webxml
+qtwebengine-webenginewidgets-spellchecker-example.webxml
+qtwebengine-webenginewidgets-videoplayer-example.webxml
+qtwebenginewidgets-qtwebkitportingguide.webxml
+qtwebsockets-changes-qt6.webxml
+qtwebsockets-echoclient-example.webxml
+qtwebsockets-echoserver-example.webxml
+qtwebsockets-examples.webxml
+qtwebsockets-qmlwebsocketclient-example.webxml
+qtwebsockets-qmlwebsocketserver-example.webxml
+qtwebsockets-simplechat-example.webxml
+qtwebsockets-sslechoclient-example.webxml
+qtwebsockets-sslechoserver-example.webxml
+qtwebsockets-testing.webxml
qtwidgets-gestures-imagegestures-example.webxml
-qtwidgets-graphicsview-anchorlayout-example.webxml
qtwidgets-graphicsview-basicgraphicslayouts-example.webxml
-qtwidgets-graphicsview-boxes-example.webxml
qtwidgets-graphicsview-chip-example.webxml
-qtwidgets-graphicsview-collidingmice-example.webxml
-qtwidgets-graphicsview-diagramscene-example.webxml
-qtwidgets-graphicsview-dragdroprobot-example.webxml
-qtwidgets-graphicsview-elasticnodes-example.webxml
-qtwidgets-graphicsview-embeddeddialogs-example.webxml
-qtwidgets-graphicsview-flowlayout-example.webxml
-qtwidgets-graphicsview-padnavigator-example.webxml
qtwidgets-graphicsview-simpleanchorlayout-example.webxml
-qtwidgets-graphicsview-weatheranchorlayout-example.webxml
-qtwidgets-itemviews-addressbook-example.webxml
-qtwidgets-itemviews-chart-example.webxml
qtwidgets-itemviews-coloreditorfactory-example.webxml
qtwidgets-itemviews-combowidgetmapper-example.webxml
qtwidgets-itemviews-customsortfiltermodel-example.webxml
-qtwidgets-itemviews-dirview-example.webxml
-qtwidgets-itemviews-editabletreemodel-example.webxml
-qtwidgets-itemviews-fetchmore-example.webxml
qtwidgets-itemviews-frozencolumn-example.webxml
-qtwidgets-itemviews-pixelator-example.webxml
-qtwidgets-itemviews-puzzle-example.webxml
-qtwidgets-itemviews-simpledommodel-example.webxml
qtwidgets-itemviews-simpletreemodel-example.webxml
-qtwidgets-itemviews-simplewidgetmapper-example.webxml
-qtwidgets-itemviews-spinboxdelegate-example.webxml
-qtwidgets-itemviews-stardelegate-example.webxml
-qtwidgets-layouts-basiclayouts-example.webxml
-qtwidgets-layouts-borderlayout-example.webxml
-qtwidgets-layouts-dynamiclayouts-example.webxml
-qtwidgets-layouts-flowlayout-example.webxml
-qtwidgets-mainwindows-application-example.webxml
-qtwidgets-mainwindows-dockwidgets-example.webxml
qtwidgets-mainwindows-menus-example.webxml
qtwidgets-painting-affine-example.webxml
-qtwidgets-painting-basicdrawing-example.webxml
qtwidgets-painting-composition-example.webxml
-qtwidgets-painting-concentriccircles-example.webxml
qtwidgets-painting-deform-example.webxml
-qtwidgets-painting-fontsampler-example.webxml
qtwidgets-painting-gradients-example.webxml
qtwidgets-painting-imagecomposition-example.webxml
qtwidgets-painting-painterpaths-example.webxml
qtwidgets-painting-pathstroke-example.webxml
qtwidgets-painting-transformations-example.webxml
-qtwidgets-richtext-calendar-example.webxml
-qtwidgets-richtext-orderform-example.webxml
-qtwidgets-richtext-syntaxhighlighter-example.webxml
-qtwidgets-statemachine-eventtransitions-example.webxml
-qtwidgets-statemachine-factorial-example.webxml
-qtwidgets-statemachine-pingpong-example.webxml
-qtwidgets-statemachine-rogue-example.webxml
-qtwidgets-statemachine-trafficlight-example.webxml
-qtwidgets-statemachine-twowaybutton-example.webxml
-qtwidgets-tools-codecs-example.webxml
qtwidgets-tools-completer-example.webxml
qtwidgets-tools-customcompleter-example.webxml
qtwidgets-tools-echoplugin-example.webxml
-qtwidgets-tools-plugandpaint-app-example.webxml
-qtwidgets-tools-plugandpaint-plugins-basictools-example.webxml
-qtwidgets-tools-plugandpaint-plugins-extrafilters-example.webxml
-qtwidgets-tools-regularexpression-example.webxml
+qtwidgets-tools-settingseditor-example.webxml
qtwidgets-tools-styleplugin-example.webxml
qtwidgets-tools-treemodelcompleter-example.webxml
-qtwidgets-tools-undo-example.webxml
qtwidgets-tools-undoframework-example.webxml
-qtwidgets-tutorials-addressbook-part1-example.webxml
-qtwidgets-tutorials-addressbook-part2-example.webxml
-qtwidgets-tutorials-addressbook-part3-example.webxml
-qtwidgets-tutorials-addressbook-part4-example.webxml
-qtwidgets-tutorials-addressbook-part5-example.webxml
-qtwidgets-tutorials-addressbook-part6-example.webxml
-qtwidgets-tutorials-addressbook-part7-example.webxml
+qtwidgets-touch-knobs-example.webxml
qtwidgets-tutorials-notepad-example.webxml
qtwidgets-tutorials-widgets-childwidget-example.webxml
qtwidgets-tutorials-widgets-nestedlayouts-example.webxml
@@ -504,48 +511,31 @@ qtwidgets-tutorials-widgets-windowlayout-example.webxml
qtwidgets-widgets-analogclock-example.webxml
qtwidgets-widgets-calculator-example.webxml
qtwidgets-widgets-calendarwidget-example.webxml
-qtwidgets-widgets-charactermap-example.webxml
-qtwidgets-widgets-codeeditor-example.webxml
-qtwidgets-widgets-digitalclock-example.webxml
-qtwidgets-widgets-elidedlabel-example.webxml
qtwidgets-widgets-groupbox-example.webxml
-qtwidgets-widgets-icons-example.webxml
-qtwidgets-widgets-imageviewer-example.webxml
qtwidgets-widgets-lineedits-example.webxml
-qtwidgets-widgets-mousebuttons-example.webxml
-qtwidgets-widgets-movie-example.webxml
qtwidgets-widgets-scribble-example.webxml
qtwidgets-widgets-shapedclock-example.webxml
qtwidgets-widgets-sliders-example.webxml
qtwidgets-widgets-spinboxes-example.webxml
-qtwidgets-widgets-styles-example.webxml
-qtwidgets-widgets-stylesheet-example.webxml
qtwidgets-widgets-tablet-example.webxml
-qtwidgets-widgets-tetrix-example.webxml
-qtwidgets-widgets-tooltips-example.webxml
-qtwidgets-widgets-wiggly-example.webxml
qtwidgets-widgets-windowflags-example.webxml
-qtxml-dombookmarks-example.webxml
-qtxml-saxbookmarks-example.webxml
-qtxml-streambookmarks-example.webxml
-qtxml-xmlstreamlint-example.webxml
-qtxmlpatterns-filetree-example.webxml
-qtxmlpatterns-recipes-example.webxml
-qtxmlpatterns-schema-example.webxml
-qtxmlpatterns-xquery-example.webxml
+quick-changes-qt6.webxml
+qwebenginecookiestore-filterrequest.webxml
qwidget-styling.webxml
-radiooverview.webxml
+remoteobjects-changes-qt6.webxml
+remoteobjects-example-dynamic-replica.webxml
+remoteobjects-example-registry.webxml
+remoteobjects-example-static-source.webxml
resources.webxml
richtext-advanced-processing.webxml
richtext-common-tasks.webxml
richtext-cursor.webxml
richtext-html-subset.webxml
richtext-layouts.webxml
+richtext-processing.webxml
richtext-structure.webxml
richtext.webxml
senorfwbackend.webxml
-sensorgesture-emulator-topics.webxml
-sensorgesture-plugins-topics.webxml
sensors-backend-topics.webxml
shared.webxml
signalsandslots.webxml
@@ -558,8 +548,7 @@ sql-programming.webxml
sql-sqlstatements.webxml
sql-types.webxml
ssl.webxml
-statemachine-api.webxml
-statemachine.webxml
+standard-dialogs.webxml
style-reference.webxml
stylesheet-customizing.webxml
stylesheet-designer.webxml
@@ -568,18 +557,68 @@ stylesheet-reference.webxml
stylesheet-syntax.webxml
stylesheet.webxml
svgrendering.webxml
-textedit-example.webxml
+testlib-changes-qt6.webxml
timers.webxml
-tutorials-addressbook.webxml
+usingadaptors.webxml
videooverview.webxml
+webengine-examples.webxml
+webengine-widgetexamples.webxml
+websockets-overview.webxml
widget-classes.webxml
+widgets-changes-qt6.webxml
widgets-tutorial.webxml
+xml-changes-qt6.webxml
xml-dom-tml.webxml
xml-namespaces.webxml
xml-processing.webxml
-xml-sax.webxml
xml-streaming.webxml
xml-tools.webxml
-xmlpattern-examples.webxml
-xmlprocessing.webxml
-xquery-introduction.webxml
+# qtdoc repository
+accessible.webxml
+appicon.webxml
+create-your-first-applications.webxml
+deployment.webxml
+desktop-integration.webxml
+exceptionsafety.webxml
+explore-qt.webxml
+get-and-install-qt.webxml
+gettingstarted.webxml
+highdpi.webxml
+install-qt-design-studio.webxml
+ipc.webxml
+known-issues.webxml
+overviews-main.webxml
+plugins-howto.webxml
+qml-codingconventions.webxml
+qml-glossary.webxml
+qmlapplications.webxml
+qmlfirststeps.webxml
+qt-intro.webxml
+qtquick-debugging.webxml
+qtquick-performance.webxml
+qtquick-qml-runtime.webxml
+qtquick-usecase-animations.webxml
+qtquick-usecase-integratingjs.webxml
+qtquick-usecase-layouts.webxml
+qtquick-usecase-styling.webxml
+qtquick-usecase-text.webxml
+qtquick-usecase-userinput.webxml
+qtquick-usecase-visual.webxml
+qundo.webxml
+rcc.webxml
+restoring-geometry.webxml
+scalability.webxml
+session.webxml
+sharedlibrary.webxml
+solutions-for-application-development.webxml
+solutions-for-ui-design.webxml
+thread-basics.webxml
+threads.webxml
+tools-for-qt-quick-uis.webxml
+tools-for-qt-widget-based-uis.webxml
+topics-app-development.webxml
+topics-data-io.webxml
+topics-ui.webxml
+uic.webxml
+unicode.webxml
+wayland-and-qt.webxml
diff --git a/sources/pyside6/doc/api.rst b/sources/pyside6/doc/api.rst
index f2eaf1f11..7bbe2ce1c 100644
--- a/sources/pyside6/doc/api.rst
+++ b/sources/pyside6/doc/api.rst
@@ -1,25 +1,30 @@
.. _pyside-api:
-|project| Modules
-=================
+Modules API
+===========
Basic modules
-------------
These are the main modules that help you build a Widget-based UI.
-+---------------------------------------+--------------------------------------------------------+
-| :mod:`QtCore <PySide6.QtCore>` | Provides core non-GUI functionality, like signal and |
-| | slots, properties, base classes of item models, |
-| | serialization, and more. |
-+---------------------------------------+--------------------------------------------------------+
-| :mod:`QtGui <PySide6.QtGui>` | Extends QtCore with GUI functionality: Events, windows |
-| | and screens, OpenGL and raster-based 2D painting, as |
-| | well as images. |
-+---------------------------------------+--------------------------------------------------------+
-| :mod:`QtWidgets <PySide6.QtWidgets>` | Provides ready to use Widgets for your application, |
-| | including graphical elements for your UI. |
-+---------------------------------------+--------------------------------------------------------+
+.. grid:: 1 3 3 3
+ :gutter: 2
+
+ .. grid-item-card:: :mod:`QtCore <PySide6.QtCore>`
+
+ Provides core non-GUI functionality, like signal and slots, properties,
+ base classes of item models, serialization, and more.
+
+ .. grid-item-card:: :mod:`QtGui <PySide6.QtGui>`
+
+ Extends QtCore with GUI functionality: Events, windows and screens,
+ OpenGL and raster-based 2D painting, as well as images.
+
+ .. grid-item-card:: :mod:`QtWidgets <PySide6.QtWidgets>`
+
+ Provides ready to use Widgets for your application, including graphical
+ elements for your UI.
QML and Qt Quick
----------------
@@ -27,16 +32,21 @@ QML and Qt Quick
Use these modules to interact with the `QML Language <https://doc.qt.io/qt-5.qmlapplications>`_,
from Python.
-+-------------------------------------------------+----------------------------------------------+
-| :mod:`QtQml <PySide6.QtQml>` | The base Python API to interact with the |
-| | module. |
-+-------------------------------------------------+----------------------------------------------+
-| :mod:`QtQuick <PySide6.QtQuick>` | Provides classes to embed Qt Quick in Qt |
-| | applications. |
-+-------------------------------------------------+----------------------------------------------+
-| :mod:`QtQuickWidgets <PySide6.QtQuickWidgets>` | Provides the QQuickWidget class to embed Qt |
-| | Quick in widget-based applications. |
-+-------------------------------------------------+----------------------------------------------+
+.. grid:: 1 3 3 3
+ :gutter: 2
+
+ .. grid-item-card:: :mod:`QtQml <PySide6.QtQml>`
+
+ The base Python API to interact with the module.
+
+ .. grid-item-card:: :mod:`QtQuick <PySide6.QtQuick>`
+
+ Provides classes to embed Qt Quick in Qt applications.
+
+ .. grid-item-card:: :mod:`QtQuickWidgets <PySide6.QtQuickWidgets>`
+
+ Provides the QQuickWidget class to embed Qt Quick in widget-based
+ applications.
All the modules
---------------
@@ -44,4 +54,6 @@ All the modules
There are many other modules currently supported by |pymodname|, here you can find a complete list
of them.
- :doc:`Check all the modules <modules>`
+.. toctree::
+
+ modules.rst
diff --git a/sources/pyside6/doc/commercial/index.rst b/sources/pyside6/doc/commercial/index.rst
new file mode 100644
index 000000000..e74419d6a
--- /dev/null
+++ b/sources/pyside6/doc/commercial/index.rst
@@ -0,0 +1,250 @@
+.. _commercial-page:
+
+Commercial Use
+==============
+
+|project| follows the same licensing that Qt has, which means that there are two
+distributions, the Community Edition (LGPLv3/GPLv3) and a Commercial Edition. For
+more information, check the `Qt Licensing`_ page.
+
+As a brief description, you can get the commercial |project| packages by having
+any of the following licenses:
+
+#. Qt for Application Development Professional (ADP)
+#. Qt for Application Development Enterprise (ADE)
+#. Qt for Device Creation Professional (DCP)
+#. Qt for Device Creation Enterprise (DCE)
+
+The only difference is that the ADP license **does not** include the extra
+``Qt OPC UA``, ``Qt MQTT`` and ``Qt CoAP`` modules, which are distributed in
+a special Python wheel.
+
+|project| follows the same approach as Qt, meaning that commercial
+users will have access to both our commercial packages for any
+given version, or the special commercial LTS releases.
+
+Commercial users **should not** install the Community Edition distribution via ``pip
+install pyside6`` to avoid licensing problems, and should refer to the
+packages that can be acquired from the `Qt Account`_, the Qt Installer, or
+via the `qtpip` tool.
+
+Installation
+------------
+
+We understand that the installation of the commercial wheels will depend
+on your use cases. For this, we currently offer three
+ways to install a commercial Qt for Python release: a command line tool,
+using the Maintenance Tool, or downloading packages by hand.
+
+qtpip - a commercial wheel installer
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+`qtpip`_ is a wrapper around `pip`_ (the package installer for Python) that provides an
+integration with the detection of commercial licenses.
+
+To set up the tool, we recommend creating a virtual environment for your
+project, and then installing the tool like any other module:
+
+.. code-block:: bash
+
+ # Create and activate a virtual environment first
+ # then install 'qtpip'
+ pip install qtpip
+
+ # Now install pyside6 (or any of the Qt for Python packages)
+ qtpip install pyside6
+
+Besides the ``install`` command, you can also ``uninstall`` (like in pip) but
+you can also perform a `fulluninstall`` to fully remove all the Qt for Python
+packages. You can find more information running ``qtpip -h``::
+
+ $ qtpip -h
+ Usage: qtpip [options] install <package> fulluninstall <PySide6/shiboken6/all>
+ Qt wrapper around pip.
+ These arguments override pip's. For more, refer to pip --help
+
+ Options:
+ -f, --force Force installation if OSS wheels were already
+ installed.
+ --no-input Disable prompting for input.
+ --no-cache-dir Disable the cache.
+ --disable-pip-version-check Don't periodically check PyPI to determine
+ whether a new version of pip is available for
+ download.
+ --no-color Suppress colored output.
+ --user Install to the Python user install directory for
+ your platform.
+ --force-reinstall Reinstall all packages even if they are already
+ up-to-date.
+ -h, --help Displays help on commandline options.
+ --help-all Displays help, including generic Qt options.
+ -v, --version Displays version information.
+
+ Arguments:
+ install Installs a package, this can be any of PySide6,
+ PySide6-Essentials, PySide6-Addons, shiboken6 or
+ shiboken6-generator for the respective commercial
+ wheel, or any other wheel from PyPi.
+ fulluninstall Fully uninstalls all packages related to
+ PySide6, shiboken6, or both.
+
+.. note:: The release cycle of ``qtpip`` will be independent from the Qt for
+ Python one.
+
+
+Maintenance Tool
+^^^^^^^^^^^^^^^^
+
+As a commercial user, you are able to download the commercial set of wheels
+from the `Qt Maintenance Tool`_. The same versions that are available for
+Qt/C++ are available for the Python bindings.
+
+The wheels will be downloaded, but not installed, mainly because they should
+be installed into a virtual environment rather than the default interpreter.
+A ``requirements.txt`` file will be provided alongside the wheels, in order to
+simplify the installation step::
+
+ pip install -r /path/to/Qt/QtForPython/6.6.0/requirements.txt
+
+Complementary to the wheels, you will be able to download the sources
+as well.
+
+.. note:: Wheels installed this way will be detectable by `*Qt Creator*`_, which
+ will offer you to install them for your current Python interpreter.
+
+Using account.qt.io
+^^^^^^^^^^^^^^^^^^^
+
+Head to your `Qt Account`_ page, and select the **Download** option on the side
+menu. You will find an option to select |project| from the **Products**
+section:
+
+.. image:: products.png
+ :alt: Products screenshot
+ :align: center
+
+There are two options that will list a different set of packages:
+
+* **Qt for Python Commercial wheels** which are the non-LTS releases under
+ commercial licensing, and include commercial only features and tools.
+ Additionally, here is where you can find the *Qt for automation (M2M
+ Protocols)* packages.
+
+* **Qt for Python (Commercial LTS)** where you will find the 5.15.x LTS and 6.2.x
+ LTS releases.
+
+Once you select any of those, you will be able to select the version of the
+packages you want to download for the **Qt for Python Commercial wheels** packages:
+
+.. image:: versions_commercial.png
+ :alt: Commercial versions screenshot
+ :align: center
+
+and the **Qt for Python (Commercial LTS)** packages:
+
+.. image:: versions_lts.png
+ :alt: LTS versions screenshot
+ :align: center
+
+For any of the versions, you can download many packages depending on your
+Operating System (macOS, Windows, or Linux). To learn more about what the
+packages contain, please check the :ref:`package_details` page.
+
+Once you download the packages, you are encouraged to create a Python virtual
+environment to install them - check the ref:`quick-start` page for how to do
+it.
+With your activated environment on a terminal, run the following command (for
+macOS/Linux)::
+
+ pip install *.whl
+
+to install them all, and leave ``pip`` to resolve the dependencies among the
+packages, or for Windows do it by hand selecting the proper combination::
+
+ pip install shiboken6-... PySide6_Essentials-... PySide6-Addons... ...
+
+Alternatively for Windows, you can specify the following command which includes
+the version, and assumes that you are running it on the same directory where
+the wheels are::
+
+ pip install --no-index --find-links=. PySide6==6.4.0.commercial
+
+.. note:: As described in the :ref:`package_details` page, the dependency
+ of the packages requires you to first install the ``shiboken6``
+ package, and then ``shiboken6-generator`` in case you are interested
+ on binding generation; or ``PySide6_Essentials`` in case you want
+ to use the essential modules. After the Essentials, you can optionally
+ install the ``PySide6_Addons`` and ``PySide6_M2M`` depending on your
+ needs.
+
+Qt Creator Integration
+----------------------
+
+*Qt Creator* offers the option to create new |project| projects from the main
+wizard.
+
+To execute the projects, make sure that the proper *Python Interpreter* is
+selected, so *Qt Creator* can use the commercial modules you just installed.
+Go to *Edit -> Preferences* where you can find the *Python* option
+that will show the following:
+
+.. image:: qtcreator_python.png
+ :alt: Qt Creator Python options
+ :align: center
+
+you can add, remove and modify environments. To include a new one, make sure to
+select the main Python executable from your environment. This can be found on
+``path_to_your_env/bin/python`` (macOS and Linux), or
+``path_to_your_env\python.exe`` (Windows).
+
+As an alternative, you can launch *Qt Creator* from within the virtual
+environment, detecting your installation automatically.
+
+Migrating from other versions
+-----------------------------
+
+In case you have a virtual environment with the Open Source distribution, you
+need to first uninstall those packages with the ``pip uninstall <package>``
+command.
+
+To check if packages are installed, run ``pip list`` and look for
+``shiboken`` or ``PySide`` packages.
+
+We always recommend creating a new virtual environment, so in doubt it is
+better to just remove the old ones if you have previous installations. The
+nature of virtual environments is volatile by design.
+
+
+Python Workflow
+---------------
+
+The Qt framework is a C++ framework that we expose to Python with the help of
+Shiboken (binding generator), which allows us to create the PySide Python module.
+
+|project| tries to find a middle ground between how C++ and Python projects
+work, so there are many decisions that need to be made, one of them being that
+the distributing of the packages needs to follow the same Python workflow,
+which means creating Python packages (wheels) and distributing them in a way
+people can use the ``pip`` tool to install them.
+
+PyPi is the main platform to distribute Open Source packages, but when
+commercial packages are required the situation is different. Among all the
+alternatives we had, we initially decided to provide the packages (wheels) on
+the `Qt Account`_ platform, so people can download and install on demand, but
+we are investigating simple ways to improve this process.
+
+There have also been discussions regarding including |project| in the *Qt
+Maintenance Tool* but this creates a new level of complexity. The reasoning is
+that the tool would require people to select or create a Python virtual
+environment on a separate location for this to be installed. Additionally,
+the Python workflow considers virtual environments as very volatile. This means
+they get removed and created often, so reinstalling or updating the |project|
+packages will likely happen.
+
+.. _`Qt Licensing`: https://www.qt.io/licensing/
+.. _`Qt Account`: https://account.qt.io
+.. _`Qt Maintenance Tool`: https://doc.qt.io/qt-6/qt-online-installation.html
+.. _`Qt Creator`: https://www.qt.io/product/development-tools
+.. _`qtpip`: https://pypi.org/project/qtpip/
+.. _`pip`: https://pypi.org/project/pip/
+
diff --git a/sources/pyside6/doc/commercial/products.png b/sources/pyside6/doc/commercial/products.png
new file mode 100644
index 000000000..d78a29e47
--- /dev/null
+++ b/sources/pyside6/doc/commercial/products.png
Binary files differ
diff --git a/sources/pyside6/doc/commercial/qtcreator_python.png b/sources/pyside6/doc/commercial/qtcreator_python.png
new file mode 100644
index 000000000..067497657
--- /dev/null
+++ b/sources/pyside6/doc/commercial/qtcreator_python.png
Binary files differ
diff --git a/sources/pyside6/doc/commercial/versions_commercial.png b/sources/pyside6/doc/commercial/versions_commercial.png
new file mode 100644
index 000000000..00b4b875a
--- /dev/null
+++ b/sources/pyside6/doc/commercial/versions_commercial.png
Binary files differ
diff --git a/sources/pyside6/doc/commercial/versions_lts.png b/sources/pyside6/doc/commercial/versions_lts.png
new file mode 100644
index 000000000..36adaadca
--- /dev/null
+++ b/sources/pyside6/doc/commercial/versions_lts.png
Binary files differ
diff --git a/sources/pyside6/doc/conf.py.in b/sources/pyside6/doc/conf.py.in
index 55726f21a..e195d227f 100644
--- a/sources/pyside6/doc/conf.py.in
+++ b/sources/pyside6/doc/conf.py.in
@@ -13,7 +13,6 @@
import sys
import os
-from pathlib import Path
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -27,13 +26,28 @@ if @HAS_WEBENGINE_WIDGETS@:
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-#extensions = ['sphinx.ext.todo', 'sphinx.ext.graphviz', 'inheritance_diagram', 'pysideinclude']
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.ifconfig',
'sphinx.ext.coverage', 'sphinx.ext.intersphinx', 'sphinx.ext.todo',
'sphinx.ext.graphviz', 'inheritance_diagram', 'pysideinclude',
'sphinx.ext.viewcode',
- 'sphinx_panels',
- ]
+ 'sphinx_design', 'sphinx_copybutton', 'myst_parser', 'sphinx_tags',
+ 'sphinx_toolbox.decorators']
+
+myst_enable_extensions = [
+ "amsmath",
+ "colon_fence",
+ "deflist",
+ "dollarmath",
+ "fieldlist",
+ "html_admonition",
+ "html_image",
+ "replacements",
+ "smartquotes",
+ "strikethrough",
+ "substitution",
+ "tasklist",
+]
+myst_heading_anchors = 6
output_format='@DOC_OUTPUT_FORMAT@'
@@ -49,17 +63,22 @@ rst_epilog = """
templates_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_templates']
# The suffix of source filenames.
-source_suffix = '.rst'
+source_suffix = {
+ '.rst': 'restructuredtext',
+ '.md': 'markdown',
+}
# The encoding of source files.
source_encoding = 'utf-8'
+graphviz_output_format = 'svg' # Enable URLs in inheritance diagrams
+
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'PySide'
-copyright = u'© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.'
+copyright = u'2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 (https://www.gnu.org/licenses/fdl.html) as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
@@ -86,9 +105,7 @@ release = '@BINDING_API_VERSION_FULL@'
# for source files.
exclude_patterns = ['_build',
'extras',
- 'tutorials/datavisualize', # not in 6.0.0
- 'tutorials/expenses', # not in 6.0.0
- ]
+ '**README.md']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
@@ -106,6 +123,7 @@ add_function_parentheses = True
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
+pygments_dark_style = "monokai"
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
@@ -115,38 +133,60 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
-html_theme = 'pysidedocs'
+html_theme = 'furo'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
-#html_theme_options = {
-#}
+html_theme_options = {
+ # FIXME: This option is currently enable because on the 'requirements-doc.txt'
+ # We are using a fork of the theme, to include this new option.
+ # This needs to be removed once the functionality is either upstreamed,
+ # or a similar option is provided.
+ "collapse_navbar": True,
+ "dark_css_variables": {
+ "color-brand-primary": "#2cde85",
+ "color-brand-content": "#2cde85",
+ "color-admonition-title--important": "#2cde85",
+ "color-admonition-title-background--important": "#474b53",
+ "font-stack": "'Titillium Web', sans-serif",
+ },
+ "light_css_variables": {
+ "color-brand-primary": "#27138b",
+ "color-brand-content": "#27138b",
+ "color-admonition-title--important": "#27138b",
+ "font-stack": "'Titillium Web', sans-serif",
+ },
+}
# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_themes']
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
-html_title = u'Qt for Python'
+html_title = 'Qt for Python'
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
-#html_logo = None
+html_logo = "@CMAKE_CURRENT_SOURCE_DIR@/_static/qtforpython.png"
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
-#html_favicon = None
+html_favicon = "_static/qtforpython.ico"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
-#html_static_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_static']
+html_static_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_static']
+html_css_files = [
+ 'css/qt_font.css',
+ 'css/qt_style.css',
+]
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
@@ -188,7 +228,7 @@ intersphinx_mapping = {'shiboken6': ('shiboken6','@SHIBOKEN_INTERSPHINX_FILE@')}
add_module_names = False
# Skip some warnings when building the documentation with
-# 'build_rst_docs' due to the lack of qdoc generated files, in charge
+# 'build_base_docs' due to the lack of qdoc generated files, in charge
# of sphinx modules (autodoc) and references.
if @SKIP_SPHINX_WARNINGS@:
suppress_warnings = ["autodoc", "autodoc.import_object", "ref.ref"]
@@ -196,3 +236,9 @@ if @SKIP_SPHINX_WARNINGS@:
# -- Options for qthelp output ---------------------------------------------------
qthelp_theme = 'pysidedocs_qthelp'
+# for example tagging based on supported platforms
+tags_create_tags = True
+tags_create_badges = True
+tags_badge_colors = {
+ "Android": "info",
+}
diff --git a/sources/pyside6/doc/considerations.rst b/sources/pyside6/doc/considerations.rst
index 08e53e329..dda1d8b0d 100644
--- a/sources/pyside6/doc/considerations.rst
+++ b/sources/pyside6/doc/considerations.rst
@@ -1,7 +1,7 @@
.. _pysideapi2:
-|project| Considerations
-========================
+Considerations
+==============
API Changes
-----------
@@ -10,7 +10,7 @@ One of the goals of |pymodname| is to be API compatible with PyQt,
with certain exceptions.
The latest considerations and known issues will be also reported
-in the `wiki <https://wiki.qt.io/Qt_for_Python/Considerations>`_.
+in the :ref:`developer-notes`.
__hash__() function return value
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -149,15 +149,15 @@ There was a long-standing bug in the ``tp_richcompare`` implementation of PySide
This oversight was fixed in version 5.15.1 .
-|project| Features
-==================
+Features
+--------
In |project|, we begin for the first time to support a more pythonic user interface.
With a special import statement, you can switch on features which replace certain aspects of
the Python interpreter. This is done by an import statement right after the PySide6 import.
snake_case
-----------
+~~~~~~~~~~
With the statement:
@@ -169,7 +169,7 @@ all methods in the current module are switched from ``camelCase`` to ``snake_cas
A single upper case letter is replaced by an underscore and the lower case letter.
true_property
--------------
+~~~~~~~~~~~~~
With the statement:
@@ -182,7 +182,7 @@ are replaced by Python property objects. Properties are also listed as such
in the according QMetaObject of a class.
Example for both features
--------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~
Some |project| snippet might read:
@@ -200,14 +200,14 @@ Additionally, properties can also be declared directly in Shiboken for
non Qt-libraries, see :ref:`property-declare`.
More about features
--------------------
+~~~~~~~~~~~~~~~~~~~
Detailed info about features can be found here: :ref:`feature-why`
Tools
------
+~~~~~
-|project| ships some Qt tools:
+|project| ships some Qt tools:
* ``pyside6-rcc``: Qt Resource Compiler. This is a command line tool
that compiles ``.qrc`` files containing binary data, for example images,
@@ -222,3 +222,220 @@ Tools
* ``pyside6-designer``: Qt User Interface Designer. This is a graphical tool
to create designs of Qt Widget-based forms and use custom widgets
(see :ref:`using_ui_files`, :ref:`designer_custom_widgets`).
+
+
+.. _NewEnumSystem:
+
+The New Python Enums
+--------------------
+
+The Motivation to use new Enums
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For a long time, there were just the Shiboken enums, which were modelled as exact as possible
+after the existing enums in Qt. These enums are small classes which also inherit from
+int.
+
+Meanwhile, Python enums have been developed over the years. They have become a natural
+part of modern Python. The implementation is perfectly modelled after the needs of Python
+users. It is therefore just consequent to stop having two different enum implementations
+in the same application and instead to use the new Python implementation everywhere.
+
+
+Existing Work
+~~~~~~~~~~~~~
+
+The new enums beginning with PySide 6.3, replace the Shiboken enums
+with Python variants, which harmonize the builtin enums with the already existing
+``QEnum`` "macro" shown in the :ref:`QEnum` section.
+
+
+Enums behavior in PySide
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+In ``PySide 6.3`` there was a double implementation of old and new enums, where the
+default was old enums.
+The new approach to enum is the default in ``PySide 6.4`` and becomes mandatory
+in ``PySide 6.6``. There exists the environment variable ``PYSIDE6_OPTION_PYTHON_ENUM``
+with the default value of "1". There can also variations be selected by specifying
+different flags, but the value of "0" (switching off) is no longer supported.
+
+The still available options for switching some enum features off can be found in the
+:ref:`enum-features` section.
+
+
+The Differences between old and new Enums
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Python enums and Shiboken enums are more or less compatible with each other.
+Tiny differences are in restrictions:
+
+* Python enums cannot inherit from each other, whereas Shiboken enums can
+* Python enums don't allow undefined values, Shiboken enums do
+* Python enums always need exactly one argument, Shiboken enums have a default zero value
+* Python enums rarely inherit from int, Shiboken enums always do
+
+More visible are the differences between flags, as shown in the following:
+
+The Shiboken flag constructor example has been in PySide prior to 6.3:
+
+::
+
+ flags = Qt.Alignment()
+ enum = Qt.AlignmentFlag
+
+with enum shortcuts like
+
+::
+
+ Qt.AlignLeft = Qt.AlignmentFlag.AlignLeft
+ Qt.AlignTop = Qt.AlignmentFlag.AlignTop
+
+In PySide 6.3, these shortcuts and flags no longer exist (officially).
+Instead, Python has an enum.Flags class which is a subclass of the enum.Enum class.
+But don't be too scared, here comes the good news...
+
+
+Doing a Smooth Transition from the Old Enums
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Changing all the enum code to suddenly use the new syntax is cumbersome and error-prone,
+because such necessary changes are not easy to find.
+Therefore a ``forgiveness mode`` was developed:
+
+The ``forgiveness mode`` allows you to continue using the old constructs but translates them
+silently into the new ones. If you for example write
+
+::
+
+ flags = Qt.Alignment()
+ enum = Qt.AlignLeft
+
+ item.setForeground(QColor(Qt.green))
+
+ flags_type = QPainter.RenderHints
+ flags = QPainter.RenderHints()
+
+ chart_view.setRenderHint(QPainter.Antialiasing)
+
+you get in reality a construct that mimics the following code which is the
+recommended way of writing Flags and Enums:
+
+::
+
+ flags = Qt.AlignmentFlag(0)
+ enum = Qt.AlignmentFlag.AlignLeft
+
+ item.setForeground(QColor(Qt.GlobalColor.green))
+
+ flags_type = QPainter.RenderHint
+ flags = QPainter.RenderHint(0)
+
+ chart_view.setRenderHint(QPainter.RenderHint.Antialiasing)
+
+This has the effect that you can initially ignore the difference between old and new enums,
+as long as the new enums are properties of classes. (This does not work on global enums
+which don't have a class, see ``Limitations`` below.)
+
+
+Forgiveness Mode and Type Hints
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+When you inspect for instance ``QtCore.pyi``, you will only find the new enums, although
+the old ones are still allowed. Also, line completion will only work with the new constructs
+and never propose the old ones.
+
+The reason to implement ``forgiveness mode`` this way was
+
+* to make the transition as smooth as possible, but
+* to encourage people to use the new enums whenever new code is written.
+
+So you can continue to write:
+
+::
+
+ self.text.setAlignment(Qt.AlignCenter)
+
+but this construct is used and recommended for the future:
+
+::
+
+ self.text.setAlignment(Qt.AlignmentFlag.AlignCenter)
+
+
+Limitations
+~~~~~~~~~~~
+
+The forgiveness mode works very well whenever the enum class is embedded in a normal
+PySide class. But there are a few global enums, where especially the ``QtMsgType``
+is a problem:
+
+::
+
+ t = QtMsgType.QtDebugMsg
+
+cannot be written in the shortcut form
+
+::
+
+ t = QtDebugMsg
+
+because there is no surrounding PySide class that provides the forgiving mode
+implementation. Typically, the needed changes are easily found because they often occur
+in an import statement.
+
+Permission API
+--------------
+
+The cross-platform permission APIs were introduced to Qt in version 6.5 which are currently relevant
+to platforms macOS, iOS, Android and WebAssembly. With this API, your Qt application can check and
+request permission for certain features like Camera, Microphone, Location, Bluetooth, Contacts,
+Calendar. More about permission API can be read in this `Blog post`_.
+
+When a PySide6 application that uses the permission API is run in interpreted mode, i.e.,
+``python <main_file>.py``, the code implementing the permission API *will not work*. The only way
+to make your PySide6 application using permission API work is to bundle the application. For Android,
+this means using the `pyside6-android-deploy`_ tool and for macOS, this means using the
+`pyside6-deploy`_ tool.
+
+When running in interpreted mode, you can skip over the permission check/request using the following
+*if* condition
+
+::
+
+ is_deployed = "__compiled__" in globals()
+ if not is_deployed and sys.platform == "darwin":
+ # code implementing permission check and request
+
+This can also be seen in the PySide6 `Camera example`_. * __compiled__ * is a Nuitka attribute to
+check if the application is run as a standalone application or run in interpreted mode with Python.
+
+Android
+~~~~~~~~
+
+For Android, `pyside6-android-deploy`_ takes care of identifying the necessary permissions needed by
+the application and adding those permissions to the *AndroidManifest.xml* using the
+*<uses-permission>* element.
+
+macOS
+~~~~~
+
+Since the Android platform does not automatically come bundled with a Python interpreter, it is
+evident that to make a PySide6 application run on Android you have to package the PySide6
+application. This is not the case for desktop platforms like macOS where a Python interpreter and
+its packages can be installed and run quite easily.
+
+The problem for macOS is that for the permission API to work you need a macOS bundle with an
+*Info.plist* file that lists all the permissions required using the *usage description* string for
+each permission used. When Python is run in interpreted mode, i.e., when you run Python, the Qt
+permission API fetches the *Info.plist* from the Python interpreter by default which does not
+contain the *usage description* strings for the permissions required. You can certainly modify the
+*Info.plist* of the Python framework installation to make the Qt permission API work when running
+a PySide6 application from the terminal. However, this is not recommended. Therefore, the only
+viable solution is to bundle the PySide6 application as a macOS application bundle using
+`pyside6-deploy`_. This macOS application bundle will have its own Info.plist file.
+
+.. _`Blog post`: https://www.qt.io/blog/permission-apis-in-qt-6.5
+.. _`Camera Example`: https://doc.qt.io/qtforpython-6/examples/example_multimedia_camera.html#camera-example
+.. _`pyside6-android-deploy`: https://doc.qt.io/qtforpython-6/gettingstarted/package_details.html#deployment
+.. _`pyside6-deploy`: https://doc.qt.io/qtforpython-6/gettingstarted/package_details.html#deployment
diff --git a/sources/pyside6/doc/contents.rst b/sources/pyside6/doc/contents.rst
index b11298016..4b6c7ffa9 100644
--- a/sources/pyside6/doc/contents.rst
+++ b/sources/pyside6/doc/contents.rst
@@ -1,20 +1,20 @@
-|project| Documentation
-***************************
+.. items for the main front page grid
.. toctree::
:maxdepth: 2
quickstart.rst
- gettingstarted.rst
- porting_from2.rst
+ commercial/index.rst
+ gettingstarted/index.rst
api.rst
+ tools/index.rst
tutorials/index.rst
examples/index.rst
videos.rst
- deployment.rst
- licenses.rst
- modules.rst
+ deployment/index.rst
considerations.rst
+ developer/index.rst
+
..
Intersphinx references in toctrees is not supported
https://github.com/sphinx-doc/sphinx/issues/1836
diff --git a/sources/pyside6/doc/deployment-briefcase.rst b/sources/pyside6/doc/deployment/deployment-briefcase.rst
index 95aee1432..e85e618a7 100644
--- a/sources/pyside6/doc/deployment-briefcase.rst
+++ b/sources/pyside6/doc/deployment/deployment-briefcase.rst
@@ -1,13 +1,16 @@
|project| & Briefcase
#######################
-`Briefcase <https://briefcase.readthedocs.io>`_ is a packaging tool that lets you create a standalone package for a Python application. It supports the following installer formats:
+`Briefcase <https://briefcase.readthedocs.io>`_ is a packaging tool that lets
+you create a standalone package for a Python application. It supports the
+following installer formats:
- * .app application bundle for macOS
- * MSI installer for Windows
- * AppImage for Linux
+* ``.app`` application bundle for macOS
+* MSI installer for Windows
+* AppImage for Linux
-For more details, see the `official documentation <https://briefcase.readthedocs.io/en/latest/index.html>`_.
+For more details, see the `official documentation
+<https://briefcase.readthedocs.io/en/latest/index.html>`_.
Status of Qt 6 Support
======================
@@ -17,15 +20,15 @@ As of March 2021, Qt 6 is not supported yet.
Preparation
===========
-Install `Briefcase` using the following **pip** command::
+Install ``Briefcase`` using the following **pip** command::
pip install briefcase
You also need : docker on linux, `WixToolset`_ on windows,
-If you're using a virtual environment, remember to activate it before installing `Briefcase`.
+If you're using a virtual environment, remember to activate it before installing ``Briefcase``.
-After installation, the `briefcase` binary is located in your virtual environment's `bin/`
+After installation, the ``briefcase`` binary is located in your virtual environment's ``bin/``
directory, or where your Python executable is located.
You can either create a brand new project using the briefcase assistant or setup your own.
@@ -39,8 +42,8 @@ Run the following command and answer the questions to get started::
briefcase new
-Ensure that `PySide6` is chosen as the `GUI toolkit choice`.
-Your PySide6 application is now configured. You can jump to `Build the package`_.
+Ensure that |pymodname| is chosen as the **GUI toolkit choice**.
+Your |pymodname| application is now configured. You can jump to `Build the package`_.
Set up your project
@@ -49,7 +52,7 @@ Set up your project
Create a pyproject.toml
-----------------------
-At the root level of your project, create a `pyproject.toml` file::
+At the root level of your project, create a ``pyproject.toml`` file::
[tool.briefcase]
project_name = "MyPySideApp"
@@ -85,7 +88,7 @@ At the root level of your project, create a `pyproject.toml` file::
Write some code
-----------------
+---------------
Let's say your project tree is like this::
@@ -103,7 +106,7 @@ Let's say your project tree is like this::
app.py
-Content of `__main__.py`::
+Content of ``__main__.py``::
import sys
from PySide6.QtWidgets import QApplication
@@ -119,7 +122,7 @@ Content of `__main__.py`::
sys.exit(app.exec())
-Content of `app.py`::
+Content of ``app.py``::
import random
from PySide6.QtWidgets import (QLabel, QPushButton,
@@ -151,10 +154,10 @@ Content of `app.py`::
Build the package
-==================
+=================
Initialize the package
-------------------------
+----------------------
Just run::
@@ -162,7 +165,8 @@ Just run::
Run the following command to initialize the building the packages for Windows, Linux, and macOS.
It creates a subdirectory each for the different platforms.
-This step takes longer as it adds the packages listed in `requires` sections in the `pyproject.toml` file.
+This step takes longer as it adds the packages listed in ``requires`` sections in the
+``pyproject.toml`` file.
Build the application
---------------------
@@ -185,20 +189,23 @@ Run the application
briefcase run
-.. note:: You can run your project in `dev` mode (your source code not packaged) with `briefcase dev`
+.. note:: You can run your project in ``dev`` mode (your source code not packaged) with
+ ``briefcase dev``
Build the installer (only Windows and macOS)
----------------------------------------------
+--------------------------------------------
macOS::
briefcase package --no-sign
-It's possible to sign, see the `documentation <https://briefcase.readthedocs.io/en/latest/how-to/code-signing/index.html>`_. You get `macOS/A Cool App-0.0.1.dmg`
+It's possible to sign, see the
+`documentation <https://briefcase.readthedocs.io/en/latest/how-to/code-signing/index.html>`_.
+You get ``macOS/A Cool App-0.0.1.dmg``
Windows::
briefcase package
-You get `windows\A_Cool_App-0.0.1.msi`
+You get ``windows\A_Cool_App-0.0.1.msi``
diff --git a/sources/pyside6/doc/deployment-cxfreeze.rst b/sources/pyside6/doc/deployment/deployment-cxfreeze.rst
index 681dcf315..46cbb142e 100644
--- a/sources/pyside6/doc/deployment-cxfreeze.rst
+++ b/sources/pyside6/doc/deployment/deployment-cxfreeze.rst
@@ -8,37 +8,38 @@ platforms are Linux, macOS, Windows, FreeBSD, among others.
You can read the `official documentation <https://cx-freeze.readthedocs.io/en/latest/index.html>`_
to clarify any further question, and remember to contribute to
-the project by `filing issues <https://sourceforge.net/projects/cx-freeze/>`_
-if you find any, or contributing to `their development <https://bitbucket.org/anthony_tuininga/cx_freeze/src>`_.
+the project by `filing issues
+<https://github.com/marcelotduarte/cx_Freeze/issues>`_
+if you find any, or contributing to `their development <https://github.com/marcelotduarte/cx_Freeze>`_.
Preparation
===========
-Installing `cx_Freeze` can be done using **pip**::
+Installing ``cx_Freeze`` can be done using **pip**::
pip install cx_freeze
If you are using a virtual environment, remember to activate it before
-installing `cx_Freeze` into it.
+installing ``cx_Freeze`` into it.
-After the installation, you will have the `cxfreeze` binary to deploy
+After the installation, you will have the ``cxfreeze`` binary to deploy
your application.
Freezing an application
=======================
-There are three options to work with `cx_Freeze`:
+There are three options to work with ``cx_Freeze``:
- 1. Using the `cxfreeze` script.
- 2. Creating `setup.py` script to build the project.
- 3. Using the module classes directly (for advanced purposes).
+1. Using the ``cxfreeze`` script.
+2. Creating ``setup.py`` script to build the project.
+3. Using the module classes directly (for advanced purposes).
The following sections cover the first two use cases.
Creating an example
-------------------
-Now, consider the following simple script, named `hello.py`::
+Now, consider the following simple script, named ``hello.py``::
import sys
import random
@@ -79,28 +80,28 @@ Now, consider the following simple script, named `hello.py`::
sys.exit(app.exec())
-Using `cxfreeze` executable
----------------------------
+Using ``cxfreeze`` executable
+-----------------------------
Now that we have an application, try freezing it with the following
command::
cxfreeze hello.py
-This command creates a `dist/` directory containing the executable.
-and a `lib/` directory containing all the shared libraries.
+This command creates a ``dist/`` directory containing the executable.
+and a ``lib/`` directory containing all the shared libraries.
-To launch the application, go to the `dist/` directory and execute
+To launch the application, go to the ``dist/`` directory and execute
the file::
cd dist/
./main
-Using a setuptools script
--------------------------
+Using a ``setuptools`` script
+-----------------------------
-For this process, you need an additional script called `setup.py`::
+For this process, you need an additional script called ``setup.py``::
import sys
from cx_Freeze import setup, Executable
@@ -114,15 +115,15 @@ Now, build the project using it::
python setup.py build
-This step creates a `build/` directory with the following structure::
+This step creates a ``build/`` directory with the following structure::
build
└── exe.linux-x86_64-3.7
└── lib
└── main
-The first directory inside `build/` depends on the platform
-you are using, in this case a `x86_64` Linux using Python 3.7.
+The first directory inside ``build/`` depends on the platform
+you are using, in this case a ``x86_64`` Linux using Python 3.7.
The structure is the same as previously described, and you can simply
enter the directory and execute the file::
diff --git a/sources/pyside6/doc/deployment-fbs.rst b/sources/pyside6/doc/deployment/deployment-fbs.rst
index c2a2397d2..459a225bf 100644
--- a/sources/pyside6/doc/deployment-fbs.rst
+++ b/sources/pyside6/doc/deployment/deployment-fbs.rst
@@ -2,7 +2,7 @@
####################
`fbs`_ provides a powerful environment for packaging, creating installers, and signing your
-application. It also lets you manage updates to your application. Since `fbs` is based on
+application. It also lets you manage updates to your application. Since `fbs`_ is based on
PyInstaller, it supports Linux, macOS, and Windows.
For more details, see the `fbs tutorial`_ and the `fbs manual`_.
@@ -32,12 +32,12 @@ command::
This command prompts you to answer a few questions to configure the details of your project, like:
- * Application name
- * Author name
- * Qt bindings (PySide6 or PyQt5)
- * Bundle indentified (for macOS)
+* Application name
+* Author name
+* Qt bindings (PySide6)
+* Bundle indentified (for macOS)
-Afterwards, you have a `src/` directory that contains the following structure::
+Afterwards, you have a ``src/`` directory that contains the following structure::
└── src
├── build
@@ -49,10 +49,10 @@ Afterwards, you have a `src/` directory that contains the following structure::
│ └── mac
└── python
-Inside the `settings` directory, there are a few JSON files that can be edited to include more
+Inside the ``settings`` directory, there are a few JSON files that can be edited to include more
information about your project.
-The `main` file is in the `python` directory, and its default content is::
+The ``main`` file is in the ``python`` directory, and its default content is::
from fbs_runtime.application_context import ApplicationContext
from PySide6.QtWidgets import QMainWindow
@@ -67,7 +67,7 @@ The `main` file is in the `python` directory, and its default content is::
exit_code = appctxt.app.exec() # 2. Invoke appctxt.app.exec()
sys.exit(exit_code)
-This example shows an empty `QMainWindow`. You can run it using the following command::
+This example shows an empty ``QMainWindow``. You can run it using the following command::
fbs run
@@ -83,15 +83,15 @@ After the process completes, you see a message stating the location of your exec
example::
Done. You can now run `target/MyApp/MyApp`. If that doesn't work, see
- https://build-system.fman.io/troubleshooting.
+ https://build-system.fman.io/troubleshooting
Now, you can try to run the application. The result is the same window as the one you saw with the
-`fbs run` command::
+``fbs run`` command::
cd target/MyApp/
./MyApp
.. note:: This is the case for Linux. For other platforms like macOS, you need to enter the
- directory: `target/MyApp.app/Contents/macOS`. For Windows, you need to find the `MyApp.exe`
+ directory: ``target/MyApp.app/Contents/macOS``. For Windows, you need to find the ``MyApp.exe``
executable.
diff --git a/sources/pyside6/doc/deployment/deployment-nuitka.rst b/sources/pyside6/doc/deployment/deployment-nuitka.rst
new file mode 100644
index 000000000..8b0afa56c
--- /dev/null
+++ b/sources/pyside6/doc/deployment/deployment-nuitka.rst
@@ -0,0 +1,132 @@
+|project| & Nuitka
+##################
+
+`Nuitka <https://nuitka.net/>`_ lets you compile your python application into a
+stand-alone executable. Besides being a Python compiler which provides a fair
+acceleration, it has the side-effect of acting as an installer as well.
+Nuitka supports Linux, macOS and Windows.
+
+For more details, see the `official documentation <https://nuitka.net/pages/overview.html>`_.
+
+Preparation
+===========
+
+Install ``Nuitka`` via **pip** with the following command::
+
+ pip install nuitka
+
+After installation, the ``nuitka3`` binary is located in your virtual environment's ``bin/``
+directory, or where your Python executable is located.
+Alternatively, you can also run::
+
+ python3 -m nuitka
+
+to achieve the same effect.
+
+Freeze an application
+=====================
+
+``Nuitka`` has many options that you can use. To list them all, run ``nuitka3 -h``.
+
+To simply compile a project, you can run::
+
+ nuitka3 <programname>
+
+There are two main features:
+
+* the option to place it in a directory containing the libraries
+ (``--standalone``)
+* the option to package the whole project (including shared libraries) into one executable file
+ (``--onefile``)
+
+If you use these options, you need to specify ``--plugin-enable=pyside6``.
+
+Run an example
+--------------
+
+Now, consider the following script, named ``hello.py``::
+
+ import sys
+ import random
+ from PySide6.QtWidgets import (QApplication, QLabel, QPushButton,
+ QVBoxLayout, QWidget)
+ from PySide6.QtCore import Slot, Qt
+
+ class MyWidget(QWidget):
+ def __init__(self):
+ QWidget.__init__(self)
+
+ self.hello = ["Hallo Welt", "你好,世界", "Hei maailma",
+ "Hola Mundo", "Привет мир"]
+
+ self.button = QPushButton("Click me!")
+ self.text = QLabel("Hello World")
+ self.text.setAlignment(Qt.AlignCenter)
+
+ self.layout = QVBoxLayout()
+ self.layout.addWidget(self.text)
+ self.layout.addWidget(self.button)
+ self.setLayout(self.layout)
+
+ # Connecting the signal
+ self.button.clicked.connect(self.magic)
+
+ @Slot()
+ def magic(self):
+ self.text.setText(random.choice(self.hello))
+
+ if __name__ == "__main__":
+ app = QApplication(sys.argv)
+
+ widget = MyWidget()
+ widget.resize(800, 600)
+ widget.show()
+
+ sys.exit(app.exec())
+
+You don't have to copy this script. You find it as ``examples/installer_test/hello.py``.
+
+The command line to proceed looks like this::
+
+ nuitka3 examples/installer_test/hello.py
+
+This process creates an executable ``hello.bin`` and a directory hello.build that you
+don't need. You can execute the binary directly.
+
+In order to create a bundle which can be copied onto a machine without any pre-existing
+installation, run::
+
+ nuitka3 --standalone --plugin-enable=pyside6 examples/installer_test/hello.py
+
+This creates an application ``hello.dist/hello`` that contains everything needed to run.
+
+To run the application, go to ``hello.dist/`` and run the program::
+
+ cd hello.dist
+ ./hello
+
+Use the ``--onefile`` option if you prefer to have everything bundled into one executable, without
+the shared libraries next to it. First you need to install::
+
+ pip install zstandard
+
+for data compression. Then you can run::
+
+ nuitka3 --onefile --plugin-enable=pyside6 examples/installer_test/hello.py
+
+This process takes a bit longer, but in the end you have one executable ``hello.bin``::
+
+ ./hello.bin
+
+
+Some Caveats
+============
+
+
+Nuitka issue on macOS
+---------------------
+
+Nuitka currently has a problem with the macOS bundle files on current macOS versions.
+That has the effect that ``--standalone`` and ``--onefile`` create a crashing application.
+Older versions which don't have the recent macOS API changes from 2020 will work.
+We are currently trying to fix that problem.
diff --git a/sources/pyside6/doc/deployment-py2exe.rst b/sources/pyside6/doc/deployment/deployment-py2exe.rst
index 24d260d71..6ca09a826 100644
--- a/sources/pyside6/doc/deployment-py2exe.rst
+++ b/sources/pyside6/doc/deployment/deployment-py2exe.rst
@@ -1,16 +1,16 @@
|project| & py2exe
##################
-Deploying an application using py2exe requires writing a small `setup.py` file.
+Deploying an application using py2exe requires writing a small ``setup.py`` file.
It is explained in the `Tutorial <http://www.py2exe.org/index.cgi/Tutorial>`_.
py2exe is not generally aware of Qt. It merely copies the dependent libraries
-of the application to the `dist` directory, so, the plugins, QML imports
+of the application to the ``dist`` directory, so, the plugins, QML imports
and translations of Qt are missing.
The latter need to be copied manually after running py2exe.
-This can be achieved by running the `windeployqt` tool
-from the Qt SDK on the Qt libraries present in the `dist` directory,
-for example:
+This can be achieved by running the ``windeployqt`` tool
+from the Qt SDK on the Qt libraries present in the ``dist`` directory,
+for example::
windeployqt dist\\Qt6Widgets.dll
diff --git a/sources/pyside6/doc/deployment-pyinstaller.rst b/sources/pyside6/doc/deployment/deployment-pyinstaller.rst
index eb900bd74..feb257162 100644
--- a/sources/pyside6/doc/deployment-pyinstaller.rst
+++ b/sources/pyside6/doc/deployment/deployment-pyinstaller.rst
@@ -5,21 +5,21 @@
stand-alone executable. This installer supports Linux, macOS, Windows, and more; and is also
compatible with 3rd-party Python modules, such as |pymodname|.
-For more details, see the `official documentation <https://www.pyinstaller.org/documentation.html>`_.
+For more details, see the `official documentation <https://www.pyinstaller.org>`_.
Status of Qt 6 Support
======================
As of March 2021, Qt 6 is not supported yet. PyInstaller is unable to properly
-deploy Qt; the Qt plugins are not copied. With that, using `--onefile` is not
+deploy Qt; the Qt plugins are not copied. With that, using ``--onefile`` is not
possible.
-It is possible to use PyInstaller for the non `--onefile` case though by
+It is possible to use PyInstaller for the non ``--onefile`` case though by
manually copying the Qt plugins, QML imports and translations into
the dist directory after running PyInstaller.
-On Windows, this can be achieved by running the `windeployqt` tool
-from the Qt SDK on the Qt libraries present in the `dist` directory, for
+On Windows, this can be achieved by running the ``windeployqt`` tool
+from the Qt SDK on the Qt libraries present in the ``dist`` directory, for
example:
windeployqt dist\\app\\Qt6Widgets.dll
@@ -28,15 +28,15 @@ example:
Preparation
===========
-Install the `PyInstaller` via **pip** with the following command::
+Install the ``PyInstaller`` via **pip** with the following command::
pip install pyinstaller
-If you're using a virtual environment, remember to activate it before installing `PyInstaller`.
+If you're using a virtual environment, remember to activate it before installing ``PyInstaller``.
-After installation, the `pyinstaller` binary is located in your virtual environment's `bin/`
-directory, or where your Python executable is located. If that directory isn't in your `PATH`,
-include the whole path when you run `pyinstaller`.
+After installation, the ``pyinstaller`` binary is located in your virtual environment's ``bin/``
+directory, or where your Python executable is located. If that directory isn't in your ``PATH``,
+include the whole path when you run ``pyinstaller``.
.. warning:: If you already have a PySide6 or Shiboken6 version installed in your
system path, PyInstaller uses them instead of your virtual environment version.
@@ -44,24 +44,24 @@ include the whole path when you run `pyinstaller`.
Freeze an application
=======================
-`PyInstaller` has many options that you can use. To list them all, run `pyinstaller -h`.
+``PyInstaller`` has many options that you can use. To list them all, run ``pyinstaller -h``.
There are two main features:
* the option to package the whole project (including shared libraries) into one executable file
- (`--onefile`)
+ (``--onefile``)
* the option to place it in a directory containing the libraries
-Additionally, on Windows when the command is running, you can open a console with the `-c` option
-(or `--console` or `--nowindowed` equivalent).
+Additionally, on Windows when the command is running, you can open a console with the ``-c`` option
+(or ``--console`` or ``--nowindowed`` equivalent).
-Otherwise, you can specify to not open such a console window on macOS and Windows with the `-w`
-option (or `--windowed` or `--noconsole` equivalent).
+Otherwise, you can specify to not open such a console window on macOS and Windows with the ``-w``
+option (or ``--windowed`` or ``--noconsole`` equivalent).
Create an example
-----------------
-Now, consider the following script, named `hello.py`::
+Now, consider the following script, named ``hello.py``::
import sys
import random
@@ -102,28 +102,29 @@ Now, consider the following script, named `hello.py`::
sys.exit(app.exec())
-Since it has a UI, you use the `--windowed` option.
+Since it has a UI, you use the ``--windowed`` option.
The command line to proceed looks like this::
pyinstaller --name="MyApplication" --windowed hello.py
-This process creates two directories: `dist/` and `build/`. The application executable and the
-required shared libraries are placed in `dist/MyApplication`.
+This process creates two directories: ``dist/`` and ``build/``. The application executable and the
+required shared libraries are placed in ``dist/MyApplication``.
-To run the application, go to `dist/MyApplication` and run the program::
+To run the application, go to ``dist/MyApplication`` and run the program::
cd dist/MyApplication/
./MyApplication
-.. note:: The directory inside `dist/` and the executable have the same name.
+.. note:: The directory inside ``dist/`` and the executable have the same name.
-Use the `--onefile` option if you prefer to have everything bundled into one executable, without
+Use the ``--onefile`` option if you prefer to have everything bundled into one executable, without
the shared libraries next to it::
pyinstaller --name="MyApplication" --windowed --onefile hello.py
-This process takes a bit longer, but in the end you have one executable in the `dist/` directory::
+This process takes a bit longer, but in the end you have one executable in the
+``dist/`` directory::
cd dist/
./MyApplication
@@ -136,26 +137,26 @@ Some Caveats
PyInstaller Issue
-----------------
-As mentioned before, if available, `PyInstaller` picks a system installation of PySide6 or
-Shiboken6 instead of your `virtualenv` version without notice. This is negligible if those
+As mentioned before, if available, ``PyInstaller`` picks a system installation of |pymodname| or
+Shiboken6 instead of your ``virtualenv`` version without notice. This is negligible if those
two versions are the same.
If you're working with different versions, this can result in frustrating debugging sessions
-when you think you are testing the latest version, but `PyInstaller` is working with an older
+when you think you are testing the latest version, but ``PyInstaller`` is working with an older
version.
Safety Instructions
-------------------
-- When using `PyInstaller` with `virtualenv`, make sure that there is no system
+- When using ``PyInstaller`` with ``virtualenv``, make sure that there is no system
installation of PySide6 or shiboken6.
-- Before compiling, use `pip -uninstall pyside6 shiboken6 -y` multiple times, until
- none of the programs are found anymore.
+- Before compiling, use ``pip -uninstall pyside6 pyside6_essentials pyside6_addons shiboken6 -y``
+ multiple times, until none of the programs are found anymore.
- Pip is usually a good tool. But to be 100 % sure, you should directly remove
- the PySide6 and shiboken6 folders from site-packages.
+ the PySide6 and shiboken6 folders from ``site-packages``.
- Be sure to use the right version of pip. The safest way to really run the right
pip, is to use the Python that you mean: Instead of the pip command, better use::
diff --git a/sources/pyside6/doc/deployment/deployment-pyside6-android-deploy.rst b/sources/pyside6/doc/deployment/deployment-pyside6-android-deploy.rst
new file mode 100644
index 000000000..53944f6ea
--- /dev/null
+++ b/sources/pyside6/doc/deployment/deployment-pyside6-android-deploy.rst
@@ -0,0 +1,211 @@
+.. _pyside6-android-deploy:
+
+pyside6-android-deploy: the Android deployment tool for Qt for Python
+#####################################################################
+
+``pyside6-android-deploy`` is an easy-to-use tool for deploying PySide6 applications to different
+Android architectures, namely *arm64-v8a, x86_64, x86 and armeabi-v7a*. This tool works similarly to
+the ``pyside6-deploy`` tool and uses the same configuration file ``pysidedeploy.spec`` as
+``pyside6-deploy`` to configure the deployment process. Using the deployment configuration
+options either from the command line or from ``pysidedeploy.spec``, ``pyside6-android-deploy``
+configures the deployment to be initiated and invokes `buildozer`_, a tool used for packaging Python
+applications to Android.
+
+The final output is a `.apk` or a `.aab` file created within the project's source directory. The
+`mode` option specified under the :ref:`buildozer <buildozer_key>` key in ``pysidedeploy.spec``
+determines whether a `.apk` or a `.aab` is created.
+
+.. warning:: Currently, users are required to cross-compile Qt for Python to generate the wheels
+ required for a specific Android target architecture. This requirement will disappear when
+ there are official Qt for Python Android wheels (*in progress*). Because of this
+ requirement ``pyside6-android-deploy`` will be considered in **Technical Preview**.
+ Instructions on cross-compiling Qt for Python for Android can be found
+ :ref:`here <cross_compile_android>`.
+
+.. note:: ``pyside6-android-deploy`` only works on a Linux host at the moment. This constraint
+ is also because Qt for Python cross-compilation for Android currently only works on Linux
+ systems.
+
+How to use it?
+==============
+
+Like ``pyside6-deploy``, there are :ref:`two different ways <how_pysidedeploy>` with which
+you can deploy your PySide6 application using ``pyside6-android-deploy``. The only difference is
+that for ``pyside6-android-deploy`` to work, the main Python entry point file should be named
+``main.py``.
+
+.. _pysideandroiddeploy:
+
+pysidedeploy.spec
+=================
+
+Like ``pyside6-deploy``, you can use the ``pysidedeploy.spec`` file to control the various
+parameters of the deployment process. The file has multiple sections, with each section containing
+multiple keys (parameters being controlled) assigned to a value. The advantages of such a file are
+mentioned :ref:`here <pysidedeployspec_advantages>`. The benefit of using the same
+``pysidedeploy.spec`` for both ``pyside6-deploy`` and ``pyside6-android-deploy`` is that you can
+have one single file to control deployment to all platforms.
+
+The relevant parameters for ``pyside6-android-deploy`` are:
+
+**app**
+ * ``title``: The name of the application.
+ * ``project_dir``: Project directory. The general assumption made is that the project directory
+ is the parent directory of the main Python entry point file.
+ * ``input_file``: Path to the main Python entry point file. For ``pyside6-android-deploy`` this
+ file should be named `main.py`.
+ * ``project_file``: If it exists, this points to the path to the `Qt Creator Python Project File
+ .pyproject <https://doc.qt.io/qtforpython-6/faq/typesoffiles.html
+ #qt-creator-python-project-file-pyproject>`_ file. Such a file in the project directory ensures
+ that deployment does not consider unnecessary files when bundling the executable.
+ * ``exec_directory``: The directory where the final executable is generated.
+
+**python**
+ * ``python_path``: Path to the Python executable. It is recommended to run
+ ``pyside6-android-deploy`` from a virtual environment as certain Python packages will be
+ installed onto the Python environment. However, note to keep the created virtual environment
+ outside the project directory so that ``pyside6-android-deploy`` does not try to package it
+ as well.
+ * ``android_packages``: The Python packages installed into the Python environment for deployment
+ to work. By default, the Python packages `buildozer`_ and `cpython`_ are installed.
+
+.. _qt_key:
+
+**qt**
+ * ``modules``: Comma-separated list of all the Qt modules used by the application. Just like the
+ other configuration options in ``pysidedeploy.spec``, this option is also computed automatically
+ by ``pyside6-android-deploy``. However, if you want to explicitly include certain Qt modules,
+ the module names can be appended to this list without the `Qt` prefix.
+ e.g. Network instead of QtNetwork
+ * ``plugins``: This field is *not relevant* for ``pyside6-android-deploy`` and is only specific to
+ ``pyside6-deploy``. The plugins relevant for ``pyside6-android-deploy`` are specified through
+ the ``plugins`` option under the :ref:`android <android_key>` key.
+
+.. _android_key:
+
+**android**
+ * ``wheel_pyside``: Specifies the path to the PySide6 Android wheel for a specific target
+ architecture.
+ * ``wheel_pyside``: Specifies the path to the Shiboken6 Android wheel for a specific target
+ architecture.
+ * ``plugins``: Comma-separated list of all the Qt plugins used by the application. Just like the
+ other configuration options in ``pysidedeploy.spec``, this option is also computed automatically
+ by ``pyside6-android-deploy``. However, if you want to to explicitly include certain Qt plugins,
+ the plugin names can be appended to this list. To see all the plugins bundled with PySide6, see
+ the `plugins` folder in the ``site-packages`` on your Python where PySide6 is installed. The
+ plugin name corresponds to their folder name. This field can be confused with the ``plugins``
+ option under :ref:`qt <qt_key>` key. In the future, they will be merged into one single option.
+
+.. _buildozer_key:
+
+**buildozer**
+ * ``mode``: Specifies one of the two modes - `release` and `debug`, to run `buildozer`_. The
+ `release` mode creates an *aab* while the `debug` mode creates an apk. The default mode is
+ `debug`.
+ * ``recipe_dir``: Specifies the path to the directory containing `python-for-android`_ recipes.
+ This option is automatically computed by ``pyside6-android-deploy`` during deployment. Without
+ the :ref:`--keep-deployment-files <keep_deployment_files>` option of ``pyside6-android-deploy``,
+ the `recipe_dir` will point to a temporary directory that is deleted after the final Android
+ application package is created.
+ * ``jars_dir``: Specifies the path to the Qt Android `.jar` files that are relevant for
+ creating the Android application package. This option is automatically computed by
+ ``pyside6-android-deploy`` during deployment. Just like ``recipe_dir``, this field is also
+ *not relevant* unless used with the :ref:`--keep-deployment-files <keep_deployment_files>`
+ option of ``pyside6-android-deploy``.
+ * ``ndk_path``: Specifies the path to the Android NDK used for packaging the application.
+ * ``sdk_path``: Specifies the path to the Android SDK used for packaging the application.
+ * ``local_libs``: Specifies non-Qt plugins or other libraries compatible with the Android target
+ to be loaded by the Android runtime on startup.
+ * ``sdk_path``: Specifies the path to the Android SDK used for packaging the application.
+ * ``arch``: Specifies the target architecture's instruction set. This option take one of the four
+ values - *aarch64, armv7a, i686, x86_64*.
+
+Command Line Options
+====================
+
+Here are all the command line options of ``pyside6-android-deploy``:
+
+* **-c/--config-file**: This option is used to specify the path to ``pysidedeploy.spec`` explicitly.
+
+* **--init**: Used to only create the ``pysidedeploy.spec`` file.
+ Usage::
+
+ pyside6-android-deploy --init
+
+* **-v/--verbose**: Runs ``pyside6-android-deploy`` in verbose mode.
+
+* **--dry-run**: Displays the commands being run to produce the Android application package.
+
+.. _keep_deployment_files:
+
+* **--keep-deployment-files**: When this option is added, it retains the build folders created by
+ `buildozer`_ during the deployment process. This includes the folder storing the
+ `python-for-android`_ recipes, relevant `.jar` files and even the Android Gradle project for the
+ application.
+
+* **-f/--force**: When this option is used, it assumes ``yes`` to all prompts and runs
+ ``pyside6-android-deploy`` non-interactively. ``pyside6-android-deploy`` prompts the user to
+ create a Python virtual environment, if not already in one. With this option, the current Python
+ environment is used irrespective of whether the current Python environment is a virtual
+ environment or not.
+
+* **--name**: Application name.
+
+* **--wheel-pyside**: Path to the PySide6 Android wheel for a specific target architecture.
+
+* **--wheel-shiboken**: Path to the Shiboken6 Android wheel for a specific target architecture.
+
+* **--ndk-path**: Path to the Android NDK used for packaging the application.
+
+* **--sdk-path**: Path to the Android SDK used for packaging the application.
+
+* **--extra-ignore-dirs**: Comma-separated directory names inside the project directory. These
+ directories will be skipped when searching for Python files relevant to the project.
+
+* **--extra-modules**: Comma-separated list of Qt modules to be added to the application,
+ in case they are not found automatically. The module name can either be specified
+ by omitting the prefix of Qt or including it eg: both Network and QtNetwork works.
+
+.. _cross_compile_android:
+
+Cross-compile Qt for Python wheels for Android
+==============================================
+
+The cross-compilation of Qt for Python wheel for a specific Android target architecture needs to be
+done only once per Qt version, irrespective of the number of applications you are deploying.
+Currently, cross-compiling Qt for Python wheels only works with a Linux host. Follow these steps
+to cross-compile Qt for Python Android wheels.
+
+#. `Download <qt_download>`_ and install Qt version for which you would like to create Qt for Python
+ wheels.
+
+#. Cloning the Qt for Python repository::
+
+ git clone https://code.qt.io/pyside/pyside-setup
+
+#. Check out the version that you want to build, for example 6.7. The version checked out has
+ to correspond to the Qt version downloaded in Step 1::
+
+ cd pyside-setup && git checkout 6.7
+
+#. Installing the dependencies::
+
+ pip install -r requirements.txt
+ pip install -r tools/cross_compile_android/requirements.txt
+
+#. Run the cross-compilation Python script.::
+
+ python tools/cross_compile_android/main.py --plat-name=aarch64 --qt-install-path=/opt/Qt/6.7.0
+ --auto-accept-license --skip-update
+
+ *--qt-install-path* refers to the path where Qt 6.7.0 is installed. *--auto-accept-license* and
+ *--skip-update* are required for downloading and installing Android NDK and SDK if not already
+ specified through command line options or if they don't already exist in the
+ ``pyside6-android-deploy`` cache. Use --help to see all the other available options::
+
+ python tools/cross_compile_android/main.py --help
+
+.. _`buildozer`: https://buildozer.readthedocs.io/en/latest/
+.. _`python-for-android`: https://python-for-android.readthedocs.io/en/latest/
+.. _`qt_download`: https://www.qt.io/download
+.. _`cpython`: https://pypi.org/project/Cython/
diff --git a/sources/pyside6/doc/deployment/deployment-pyside6-deploy.rst b/sources/pyside6/doc/deployment/deployment-pyside6-deploy.rst
new file mode 100644
index 000000000..980fe2dd1
--- /dev/null
+++ b/sources/pyside6/doc/deployment/deployment-pyside6-deploy.rst
@@ -0,0 +1,217 @@
+.. _pyside6-deploy:
+
+pyside6-deploy: the deployment tool for Qt for Python
+#####################################################
+
+``pyside6-deploy`` is an easy to use tool for deploying PySide6 applications to different
+platforms. It is a wrapper around `Nuitka <https://nuitka.net/>`_, a Python compiler that
+compiles your Python code to C code, and links with libpython to produce the final executable.
+
+The final executable produced has a ``.exe`` suffix on Windows, ``.bin`` on Linux and ``.app`` on
+macOS.
+
+.. note:: Although using a virtual environment for Python is recommended for ``pyside6-deploy``, do
+ not add the virtual environment to the application directory you are trying to deploy.
+ ``pyside6-deploy`` will try to package this venv folder and will eventually fail.
+
+.. _how_pysidedeploy:
+
+How to use it?
+==============
+
+There are 2 different ways with which you can deploy your PySide6 application using
+``pyside6-deploy``:
+
+Approach 1: Using the main python entry point file
+--------------------------------------------------
+
+In this approach, you point ``pyside6-deploy`` to the file containing the main Python entry point
+file of the project i.e. the file containing ``if __name__ == "__main__":``.
+The command looks like this::
+
+ pyside6-deploy /path/to/main_file.py
+
+On running the command, ``pyside6-deploy`` installs all the dependencies required for deployment
+into the Python environment.
+
+If your main Python entry point file is named ``main.py``, then you don't have to point it to the
+filename. You can run ``pyside6-deploy`` without any options, and it will work.
+
+.. note:: If your project contains a ``pysidedeploy.spec`` file, which is generated on the first
+ run of ``pyside6-deploy`` on the project directory, then for any subsequent runs of
+ ``pyside6-deploy`` you can run ``pyside6-deploy`` without specifying the main Python entry
+ point file. It would take the path to the main file from the ``pysidedeploy.spec`` file.
+ To know more about what deployment parameters are controlled by ``pysidedeploy.spec`` file,
+ read `pysidedeploy`_.
+
+.. _approach_two:
+
+Approach 2: Using pysidedeploy.spec config file
+------------------------------------------------
+
+When you run ``pyside6-deploy`` for the first time, it creates a file called ``pysidedeploy.spec``
+in the project directory. This file controls various :ref:`parameters <pysidedeploy>` that influence
+the deployment process. Any subsequent runs of ``pyside6-deploy`` on the project directory, would
+not require additional parameters like the main Python entry point file. You can also point
+``pyside6-deploy`` to the path of the ``pysidedeploy.spec`` file (in case it is not in the same
+directory), to take the parameters from that file. This can be done with the following command::
+
+ pyside6-deploy -c /path/to/pysidedeploy.spec
+
+.. _pysidedeploy:
+
+pysidedeploy.spec
+=================
+
+As mentioned in the `Approach 2 <approach_two>`_ above, you can use this file to control the various
+parameters of the deployment process. The file has multiple sections, with each section containing
+multiple keys (parameters being controlled) assigned to a value. The advantages of such a file are
+two folds:
+
+.. _pysidedeployspec_advantages:
+
+#. Using the command line, you can control the deployment parameters without specifying them each
+ time. It is saved permanently in a file, and any subsequent runs much later in time
+ would enable the user to be aware of their last deployment parameters.
+
+#. Since these parameters are saved into a file, they can be checked into version control. This
+ gives the user more control of the deployment process. For example, when you decide to exclude
+ more QML plugins, or want to include more Nuitka options into your executable.
+
+This file is also used by the ``pyside6-android-deploy`` tool as a configuration file. The advantage
+here is that you can have one single file to control deployment to all platforms.
+
+The relevant parameters for ``pyside6-deploy`` are:
+
+**app**
+ * ``title``: The name of the application
+ * ``project_dir``: Project directory. The general assumption made is that the project directory
+ is the parent directory of the main Python entry point file
+ * ``input_file``: Path to the main Python entry point file
+ * ``project_file``: If it exists, this points to the path to the `Qt Creator Python Project File
+ .pyproject <https://doc.qt.io/qtforpython-6/faq/typesoffiles.html
+ #qt-creator-python-project-file-pyproject>`_ file. Such a file makes sure that the deployment
+ process never considers unnecessary files when bundling the executable.
+ * ``exec_directory``: The directory where the final executable is generated.
+ * ``icon``: The icon used for the application. For Windows, the icon image should be of ``.ico``
+ format, for macOS it should be of ``.icns`` format, and for linux all standard image formats
+ are accepted.
+
+**python**
+ * ``python_path``: Path to the Python executable. It is recommended to run the deployment
+ process inside a virtual environment as certain python packages will be installed onto the
+ Python environment.
+ * ``packages``: The Python packages installed into the Python environment for deployment to
+ work. By default, the Python packages `nuitka <https://pypi.org/project/Nuitka/>`__,
+ `ordered_set <https://pypi.org/project/ordered-set/>`_ and `zstandard
+ <https://pypi.org/project/zstandard/>`_ are installed. If the deployment platform is
+ Linux-based, then `patchelf <https://pypi.org/project/patchelf/>`_ is also installed
+
+**qt**
+ * ``qml_files``: Comma-separated paths to all the QML files bundled with the executable
+ * ``excluded_qml_plugins``: The problem with using Nuitka for QML deployment is that all the QML
+ plugins are also bundled with the executable. When the plugins are bundled, the binaries of
+ the plugin's Qt module are also packaged. For example, size heavy module like QtWebEngine
+ also gets added to your executable, even when you do not use it in your code. The
+ ``excluded_qml_plugins`` parameter helps you to explicitly specify which all QML plugins are
+ excluded. ``pyside6-deploy`` automatically checks the QML files against the various QML
+ plugins and excludes the following Qt modules if they don't exist::
+
+ QtQuick, QtQuick3D, QtCharts, QtWebEngine, QtTest, QtSensors
+
+ The reason why only the presence of the above 6 Qt modules is searched for is because they
+ have the most size heavy binaries among all the Qt modules. With this, you can drastically
+ reduce the size of your executables.
+ * ``modules``: Comma-separated list of all the Qt modules used by the application. Just like the
+ other configuration options in `pysidedeploy.spec`, this option is also computed automatically
+ by ``pyside6-deploy``. However, if the user wants to explicitly include certain Qt modules, the
+ module names can be appended to this list without the `Qt` prefix.
+ e.g. Network instead of QtNetwork
+ * ``plugins``: Comma-separated list of all the Qt plugins used by the application. Just like the
+ other configuration options in `pysidedeploy.spec`, this option is also computed automatically
+ by ``pyside6-deploy``. However, if the user wants to explicitly include certain Qt plugins,
+ the plugin names can be appended to this list. To see all the plugins bundled with PySide6,
+ see the `plugins` folder in the `site-packages` on your Python where PySide6 is installed. The
+ plugin name correspond to their folder name.
+
+**nuitka**
+ * ``macos.permissions``: Only relevant for macOS. This option lists the permissions used by the
+ macOS application, as found in the ``Info.plist`` file of the macOS application bundle, using
+ the so-called UsageDescription strings. The permissions are normally automatically found by
+ ``pyside6-deploy``. However the user can also explicitly specify them using the format
+ `<UsageDescriptionKey>:<Short Description>`. For example, the Camera permission is specified
+ as::
+
+ NSCameraUsageDescription:CameraAccess
+
+ * ``extra_args``: Any extra Nuitka arguments specified. It is specified as space-separated
+ command line arguments i.e. just like how you would specify it when you use Nuitka through
+ the command line. By default, it contains the following arguments::
+
+ --quiet --noinclude-qt-translations=True
+
+Command Line Options
+====================
+
+The most important command line options are the path to the main Python entry point file and the
+``pysidedeploy.spec`` file. If neither of these files exists or their command line options are
+given, then ``pyside6-deploy`` assumes that your current working directory does not contain a
+PySide6 project.
+
+Here are all the command line options of ``pyside6-deploy``:
+
+* **main entry point file**: This option does not have a name or a flag and is not restricted by it.
+ This enables ``pyside6-deploy`` to be used like::
+
+ pyside6-deploy /path/to/main_file.py
+
+* **-c/--config-file**: This option is used to specify the path to ``pysidedeploy.spec`` explicitly
+
+* **--init**: Used to only create the ``pysidedeploy.spec`` file
+ Usage::
+
+ pyside6-deploy /path/to/main --init
+
+
+* **-v/--verbose**: Runs ``pyside6-deploy`` in verbose mode.
+
+* **--dry-run**: Displays the final Nuitka command being run.
+
+* **--keep-deployment-files**: When this option is added, it retains the build folders created by
+ Nuitka during the deployment process.
+
+* **-f/--force**: When this option is used, it forces through all the input prompts.
+ ``pyside6-deploy`` prompts the user to create a Python virtual environment, if not already in one.
+ With this option, the current Python environment is used irrespective of whether the current
+ Python environment is a virtual environment or not.
+
+* **--name**: Application name.
+
+* **--extra-ignore-dirs**: Comma-separated directory names inside the project directory. These
+ directories will be skipped when searching for Python files relevant to the project.
+
+* **--extra-modules**: Comma-separated list of Qt modules to be added to the application,
+ in case they are not found automatically. The module name can either be specified
+ by omitting the prefix of Qt or including it eg: both Network and QtNetwork works.
+
+Considerations
+===============
+
+For deployment to work efficiently by bundling only the necessary plugins, the following utilities
+are required to be installed on the system:
+
+.. list-table::
+ :header-rows: 1
+
+ * - OS
+ - Dependencies
+ - Installation
+ * - Windows
+ - dumpbin
+ - Shipped with MSVC. Run `vcvarsall.bat` to add it to PATH
+ * - Linux
+ - readelf
+ - Available by default
+ * - macOS
+ - dyld_info
+ - Available by default from macOS 12 and upwards
diff --git a/sources/pyside6/doc/deployment.rst b/sources/pyside6/doc/deployment/index.rst
index a294905a0..36e677566 100644
--- a/sources/pyside6/doc/deployment.rst
+++ b/sources/pyside6/doc/deployment/index.rst
@@ -1,7 +1,7 @@
.. _deployment-guides:
-|project| Deployment
-====================
+Deployment
+==========
Deploying or freezing an application is an important part of a Python project,
this means to bundle all required resources so that the application finds everything it needs to
@@ -15,13 +15,18 @@ Here are a few distribution options that you can use:
3. Freeze the application into a single binary file or directory.
4. Provide native installer (msi, dmg)
-If you choose Option 3, consider using one of these tools:
- * `fbs`_
- * `PyInstaller`_
- * `cx_Freeze`_
- * `py2exe`_
- * `py2app`_
- * `briefcase`_
+If you are considering Option 3, then starting with 6.4, we ship a new tool called `pyside6-deploy`
+that deploys your PySide6 application to all desktop platforms - Windows, Linux, and macOS. To know
+more about how to use the tool see :ref:`pyside6-deploy`. For Android deployment, see
+:ref:`pyside6-android-deploy`. Additionally, you can also use other popular deployment tools shown
+below:
+
+* `fbs`_
+* `PyInstaller`_
+* `cx_Freeze`_
+* `py2exe`_
+* `py2app`_
+* `briefcase`_
.. _fbs: https://build-system.fman.io/
.. _PyInstaller: https://www.pyinstaller.org/
@@ -30,8 +35,10 @@ If you choose Option 3, consider using one of these tools:
.. _py2app: https://py2app.readthedocs.io/en/latest/
.. _briefcase: https://briefcase.readthedocs.io
-Since |project| is a cross-platform framework, we focus on solutions for the three major
-platforms that Qt supports: Windows, Linux, and macOS.
+Although you can deploy PySide6 application using these tools, it is recommended to use
+`pyside6-deploy` as it is easier to use and also to get the most optimized executable. Since
+|project| is a cross-platform framework, we focus on solutions for the three major platforms that
+Qt supports: Windows, Linux, and macOS.
The following table summarizes the platform support for those packaging tools:
@@ -98,7 +105,16 @@ The following table summarizes the platform support for those packaging tools:
<tr>
<td><p>briefcase</p></td>
<td><p>BSD3</p></td>
- <td><p style="color: red;">no</p></td>
+ <td><p style="color: green;">partial</p></td>
+ <td><p style="color: green;">yes</p></td>
+ <td><p style="color: green;">yes</p></td>
+ <td><p style="color: green;">yes</p></td>
+ <td><p style="color: green;">yes</p></td>
+ </tr>
+ <tr>
+ <td><p>Nuitka</p></td>
+ <td><p>MIT</p></td>
+ <td><p style="color: green;">yes</p></td>
<td><p style="color: green;">yes</p></td>
<td><p style="color: green;">yes</p></td>
<td><p style="color: green;">yes</p></td>
@@ -129,8 +145,11 @@ Here's a set of tutorials on how to use these tools:
:name: mastertoc
:maxdepth: 2
+ deployment-pyside6-deploy.rst
+ deployment-pyside6-android-deploy.rst
deployment-fbs.rst
deployment-pyinstaller.rst
deployment-cxfreeze.rst
deployment-briefcase.rst
deployment-py2exe.rst
+ deployment-nuitka.rst
diff --git a/sources/pyside6/doc/developer/adapt_qt.rst b/sources/pyside6/doc/developer/adapt_qt.rst
new file mode 100644
index 000000000..aec81fb0f
--- /dev/null
+++ b/sources/pyside6/doc/developer/adapt_qt.rst
@@ -0,0 +1,54 @@
+.. _developer-adapt-qt:
+
+Adapt to new Qt versions
+========================
+
+Adapting to source changes
+--------------------------
+
+The dev branch of PySide is switched to a new Qt minor version
+after its API review is finished and the API is stable.
+
+Until that happens, a patch should be continuously developed
+to adapt to this version.
+
+The `new classes page <https://doc-snapshots.qt.io/qt6-6.7/newclasses67.html>`_
+is a good source of information for new API.
+
+New classes and should be added to the type system file (using
+a ``since`` attribute) and ``CMakeList.txt`` file of the respective module.
+
+Should the class not be available on all platforms, the respective
+``QT_CONFIG`` macro needs to be specified in the type system file and
+feature checks need to be added to ``CMakeList.txt`` (see for example
+``QPermission``).
+
+The process consists of running a build and evaluating the log file.
+The script
+`shiboken2tasks.py <https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/scripts/shiboken2tasks.py>`_
+from the *Qt Creator* repository can be used to convert the shiboken warnings
+into a `task file <https://doc.qt.io/qtcreator/creator-task-lists.html>`_
+for display in the build issues pane of *Qt Creator*.
+
+Warnings about new enumerations will be shown there; they should be added
+to type system file using a ``since`` attribute.
+
+Warnings about not finding a function signature for modification
+also need to be handled; mostly this is a sign of a function parameter
+being changed from ``int`` to ``qsizetype`` or similar.
+
+If the build succeeds, a test run should be done.
+
+The Qt source code should be checked for new overloads
+(indicated by ``QT6_DECL_NEW_OVERLOAD_TAIL`` starting from 6.7).
+The resolution needs to be decided for each individual case,
+mostly by removing old functions and using ``<declare-function>``
+to declare new API.
+
+Bumping the version
+-------------------
+
+To instruct ``COIN`` to use the next version of Qt, adapt the files
+``coin/dependencies.yaml`` and/or ``product_dependencies.yaml`` accordingly.
+Next, the wheel names should be changed by adapting
+``sources/shiboken6/.cmake.conf`` and ``sources/pyside6/.cmake.conf``.
diff --git a/sources/pyside6/doc/developer/add_module.rst b/sources/pyside6/doc/developer/add_module.rst
new file mode 100644
index 000000000..2eb962207
--- /dev/null
+++ b/sources/pyside6/doc/developer/add_module.rst
@@ -0,0 +1,61 @@
+.. _developer-add-module:
+
+Add a new module
+================
+
+New modules can be added for many reasons, the most important
+one is when Qt enables or includes a new one for a new release.
+
+Adding the bindings, and documentation are the essentials
+to include new modules, but adding tests and examples is ideal.
+
+Add bindings
+------------
+
+- Find the correct name (look at the include path of Qt).
+- Add the module to the ``coin/dependencies.yaml`` file.
+- Add it to ``sources/pyside6/cmake/PySideHelpers.cmake``.
+- Add it to ``build_scripts/wheel_files.py`` (plugins, translations).
+- Copy an existing module to ``sources/pyside6/PySide6/<name>``.
+- Adapt the ``typesystem.xml`` and ``CMakeList.txt`` (using for example
+ *Qt Creator*'s case-preserving replace function).
+- Make sure the dependencies are correct.
+- Find the exported public classes, add them to the ``typesystem.xml`` file,
+ checking whether they are ``value-type`` or ``object-type``. Add their enums
+ and flags.
+- Add the wrapper files to ``CMakeList.txt``.
+- Create a test dir under ``sources/pyside6/tests`` with an empty
+ ``CMakeList.txt``.
+- Try to build with the module added to the ``--module-subset`` option of
+ ``setup.py``.
+- Watch out for shiboken warnings in the log.
+- Be aware that ``ninja`` mixes stdout and stderr, so, the first warning is
+ typically hidden behind a progress message.
+- A convenient way of doing this is using
+ ``qt-creator/scripts/shiboken2tasks.py`` from the
+ `*Qt Creator* repository <https://code.qt.io/cgit/qt-creator/qt-creator.git>`_
+ converting them to a ``.tasks`` file which can be loaded into *Qt Creator*'s
+ issue pane.
+- Link errors may manifest when ``generate_pyi`` imports the module trying
+ to create signatures. They indicate a missing source file entry
+ or a bug in the module itself.
+
+.. note:: For the build to succeed, the module must follow the Qt convention
+ of using ``#include <QtModule/header.h>`` since module include paths
+ are not passed in PySide.
+
+Distribution
+------------
+
+- Determine to which wheel the module belongs according to
+ `Qt Modules <https://doc.qt.io/qt-6/qtmodules.html>`_.
+- Add the module to ``build_scripts/wheel_files.py`` for use by
+ ``create_wheels.py``.
+- Add the module to one of the ``README.pyside6_*.md`` files.
+
+Add documentation
+-----------------
+
+- Add entry to ``sources/pyside6/doc/modules.rst``.
+- Add a .qdocconf.in file in ``sources/pyside6/doc/qtmodules``.
+- Add module description ``.rst`` file in ``sources/pyside6/doc/extras``.
diff --git a/sources/pyside6/doc/developer/add_port_example.rst b/sources/pyside6/doc/developer/add_port_example.rst
new file mode 100644
index 000000000..b99641f45
--- /dev/null
+++ b/sources/pyside6/doc/developer/add_port_example.rst
@@ -0,0 +1,67 @@
+.. _developer-add-port-example:
+
+Add a new example or port one
+=============================
+
+Adding examples is a good exercise for people wanting to become familiar with
+the modules and its functionality.
+
+You can either design an example from scratch or inspired in another
+application, or simply you can port an existing Qt example that does not have
+a Python counterpart.
+
+Example code should be free of `flake8 <https://pypi.org/project/flake8/>`_
+warnings; this is enforced by a bot. A configuration file is provided
+at the root of the repository. Offending lines can be excluded by a
+``noqa`` directive if there is a good reason to do so.
+
+Keep in mind we do allow 100 columns for line length.
+
+Additionally, please use `isort <https://pypi.org/project/isort/>`_ to keep the
+imports ordered and consistent with other examples.
+
+For example:
+
+.. code-block:: bash
+
+ $ flake8 --config pyside-setup/.flake8 your_file.py
+ $ isort your_file.py
+
+
+
+Add a new example
+-----------------
+
+- Check if the topic your example covers is not in an existing example already.
+- Create a new directory inside the ``examples/<module>`` you think
+ is more relevant.
+- Inside, place the code of the example, and also a ``.pyproject``
+ file listing the files the example needs.
+- If you want the example to be automatically displayed on the
+ example gallery, include a ``doc`` directory that contains a ``rst``
+ file and a screenshot. Check other examples for formatting questions.
+- When writing the ``rst`` file, you can include code snippets using
+ the ``literalinclude`` directive specifying the relative path
+ as listed in the ``.pyproject`` file. The `example_gallery` tool will
+ expand this (see the `pointconfiguration` example).
+- For the code displayed in the tabs, you can create ``rstinc`` files
+ in the ``doc`` directory containing some description explaining them
+ (see the `samplebinding` example).
+
+Port a Qt example
+-----------------
+
+- Quickly check the C++ example, fix outdated code.
+- Port the sources using ``tools/tools/qtcpp2py.py`` (front-end for
+ ``snippets-translate``).
+- Note that our examples need to have unique names due to the doc build.
+- Verify that all slots are decorated using ``@Slot``.
+- Add a ``.pyproject`` file (verify later on that docs build).
+- Add a ``doc`` directory and descriptive ``.rst`` file,
+ and a screenshot if suitable (use ``optipng`` to reduce file size).
+- Add the ``"""Port of the ... example from Qt 6"""`` doc string.
+- Try to port variable and function names to snake case convention.
+- Remove C++ documentation from ``sources/pyside6/doc/additionaldocs.lst``.
+
+.. note:: Example screenshots in ``.png`` should be optimized by
+ running ``optipng -o 7 -strip all``. Alternatively, the ``.webp`` format can be used.
diff --git a/sources/pyside6/doc/developer/add_tool.rst b/sources/pyside6/doc/developer/add_tool.rst
new file mode 100644
index 000000000..732e6b915
--- /dev/null
+++ b/sources/pyside6/doc/developer/add_tool.rst
@@ -0,0 +1,51 @@
+.. _developer-add-tool:
+
+Add a new tool or a Qt tool wrapper
+===================================
+
+Tooling is essential to |project|, for that reason you can find many ad-hoc
+tools in the repository, which include wrappers of Qt tools or newly developed
+tools to solve issues, or improve some project workflows.
+
+Add a new tool
+--------------
+
+Tools not available to end users
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This depicts the tools that are not shipped with Qt for Python wheels and are used to aid
+Qt for Python development
+
+- Place your tool in the ``tools`` directory.
+- If your project has more than one file, create a directory.
+- Create a ``.pyproject`` file including all the relevant files
+ for your tool.
+
+Tools available to end users
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Place your tool in the ``sources/pyside-tools`` directory.
+- If your project has more than one file, create a directory.
+- Create a ``.pyproject`` file including all the relevant files
+ for your tool.
+- Add the relevant files in ``sources/pyside-tools/CMakeLists.txt``.
+- Add the tool in ``sources/pyside-tools/pyside_tool.py``.
+- Add the tool in ``build_scripts/__init__.py`` to create the setuptools entry points
+ i.e. this enable using the tool from the console as "pyside6-<tool_name>"
+- Add an entry to ``sources/pyside6/doc/gettingstarted/package_details.rst``.
+- Include the necessary Qt binaries explicitly on ``build_scripts/wheel_files.py``
+- Build with ``--standalone``, verify it is working.
+
+
+Add a Qt tool wrapper
+---------------------
+
+- Add the relevant files in ``sources/pyside-tools/CMakeLists.txt``.
+- Add the tool in ``sources/pyside-tools/pyside_tool.py``.
+- Add the tool in ``build_scripts/__init__.py`` to create the setuptools entry points
+ i.e. this enable using the tool from the console as "pyside6-<tool_name>"
+- Add an entry to ``sources/pyside6/doc/tools/index.rst`` and the detailed
+ documentation to ``sources/pyside6/doc/tools/<tool_name>.rst``.
+- Include the necessary Qt binaries explicitly on ``build_scripts/wheel_files.py``
+- Add the necessary files to ``build_scripts/wheel_files.py``.
+- Build with ``--standalone``, verify it is working. Also, check if the wheel bundles the tool.
diff --git a/sources/pyside6/doc/developer/documentation.rst b/sources/pyside6/doc/developer/documentation.rst
new file mode 100644
index 000000000..517bd46f1
--- /dev/null
+++ b/sources/pyside6/doc/developer/documentation.rst
@@ -0,0 +1,73 @@
+.. _developer-documentation:
+
+Fixing Documentation issues
+===========================
+
+Fixing texts
+------------
+
+Shiboken's ``<inject-documentation>`` element can be used to add texts.
+It's ``"replace"`` mode is currently not implemented, though.
+
+Fixing snippets
+---------------
+
+Snippets can replaced by placing a Python equivalent under ``sources/pyside6/doc/snippets``.
+The directory structure matches that of Qt. To replace a snippet with the id `0` in
+``qtbase/examples/foo/snippet.cpp``, place a file ``qtbase/examples/foo/snippet_0.cpp.py``
+under that directory (one snippet per file with the snippet id appended to the base name).
+
+More complicated mappings can be added to ``tools/snippets_translate/override.py``.
+
+# Recreating the module descriptions after a Qt major version change
+
+The source tree contains .rst files containing the module description in
+doc/extras (named for example "QtCore.rst"). They are extracted/adapted from
+the C++ module descriptions. If there is no module description file, shiboken
+will extract the module description from the webxml files generated by qdoc.
+This ends up in the build directory under doc/rst/PySide6/&lt;module&gt;/index.rst.
+It can be used as a starting point for a module description file. C++
+specific information like build instructions should be removed.
+
+The descriptions may link to tutorials which can be added to additionaldocs.lst
+for webxml extraction.
+
+Maintaining additionaldocs.lst
+------------------------------
+
+The file is a list of additional documentation files. These are basically Qt
+tutorials referenced by the documentation. They will receive some Python
+adaption by shiboken/sphinx.
+
+The list can be created by the below script and some hand-editing. It will find
+almost all documents. Quite a number of them might be unreferenced, but there
+is no good way of filtering for this.
+Pages of examples that exist in Python should be removed.
+
+.. code-block:: bash
+
+ for F in *.webxml
+ do
+ echo "$F" | egrep '(-index)|(-module)|(-qmlmodule)\.webxml$' > /dev/null
+ if [ $? -ne 0 ]
+ then
+ if fgrep '<para>' "$F" > /dev/null # Exclude reference only
+ then
+ egrep "(<class )|(<namespace )" $F > /dev/null || echo $F
+ fi
+ fi
+ done
+
+Inheritance graphs
+------------------
+
+``inheritance_diagram.pyproject`` lists the script involved in inheritance
+graph generation, ``inheritance_diagram.py`` being the main one used by sphinx.
+The others have main-test drivers for checking.
+
+There are 2 scripts used for determining the inheritance:
+* ``json_inheritance.py`` (env var ``INHERITANCE_FILE``) reads a
+ inheritance.json file containing the class hierarchy generated by
+ shiboken's doc generator.
+
+* ``import_inheritance.py`` actually tries to import the class (legacy)
diff --git a/sources/pyside6/doc/developer/enumfeatures_doc.rst b/sources/pyside6/doc/developer/enumfeatures_doc.rst
new file mode 100644
index 000000000..91b7b6346
--- /dev/null
+++ b/sources/pyside6/doc/developer/enumfeatures_doc.rst
@@ -0,0 +1,160 @@
+.. _enum-features:
+
+The Set of Enum Features
+========================
+
+The development of the new Python enums took the form of a series of patches.
+While we put a lot of effort into supporting the old Enums (without promoting
+them), it is still possible that someone has a case where they cannot use
+the Python enums as they are now. To avoid people setting the environment
+flag to disable this completely, we implemented a way to select each
+combination of enum functions step by step with a specific set of flags.
+
+
+The Possible Enum Flags
+-----------------------
+
+This is the table of all flags used to control the creation of Python enums.
+
+====================== ===== ======================================================
+Flag Name Value
+====================== ===== ======================================================
+ENOPT_OLD_ENUM 0x00 (False) No longer possible since PySide 6.6
+ENOPT_NEW_ENUM 0x01 (True) The default for PySide 6.4, full implementation
+ENOPT_INHERIT_INT 0x02 Turn all Enum into IntEnum and Flag into IntFlag
+ENOPT_GLOBAL_SHORTCUT 0x04 Re-add shortcuts for global enums
+ENOPT_SCOPED_SHORTCUT 0x08 Re-add shortcuts for scoped enums
+ENOPT_NO_FAKESHORTCUT 0x10 Don't fake rename (forgiveness mode)
+ENOPT_NO_FAKERENAMES 0x20 Don't fake shortcuts (forgiveness mode)
+ENOPT_NO_ZERODEFAULT 0x40 Don't use zero default (forgiveness mode)
+ENOPT_NO_MISSING 0x80 Don't allow missing values in Enum
+====================== ===== ======================================================
+
+Such a set of flags can be defined either by the environment variable
+``PYSIDE6_OPTION_PYTHON_ENUM`` or set by the Python variable
+``sys.pyside6_option_python_enum`` before PySide6 is imported.
+The environment variable also supports arbitrary integer expressions
+by using ``ast.literal_eval``.
+
+
+ENOPT_OLD_ENUM (0x00)
+~~~~~~~~~~~~~~~~~~~~~
+
+This option completely disables the new enum implementation.
+Even though this is a valid option, we want to avoid it if possible.
+The goal is to eventually remove the old implementation. To make this
+possible, we have made the individual features of the enum implementation
+accessible as flags. This way, if users report problems, we may be able
+to provide a temporary solution before extending enum support accordingly.
+
+
+ENOPT_NEW_ENUM (0x01)
+~~~~~~~~~~~~~~~~~~~~~
+
+In a perfect world, no one would choose anything other than this default
+setting. Unfortunately, reality is not always like that. That is why
+there are the following flags.
+
+
+The most likely flags needed
+----------------------------
+
+If there are errors, they are likely to be the following: Either implicit
+assumptions are there that require IntEnum, or global enums are used that
+unfortunately cannot be replaced with tricks.
+
+
+ENOPT_INHERIT_INT (0x02)
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+When this flag is set, all ``enum.Enum/enum.Flag`` classes are converted to
+``enum.IntEnum/enum.IntFlag``. This solves the most likely compatibility
+problem when switching to Python enums. The old Shiboken enums always
+inherit from int, but most Python enums do not.
+
+It was a decision of Python developers not to let enums inherit from int by
+default, since no order should be implied. In most cases, inheritance from
+int can be avoided, either by using the value property or better by
+uplifting: instead of using ``AnEnum.AnInstance.value`` in a function that
+expects an int argument, you can also convert the integer to an enumeration
+instance after the call by ``AnEnum(int_arg)`` and use that in comparisons.
+
+However, there are cases where this is not possible, and explicit support in
+PySide is simply not available. In those cases, you can use this flag as a
+workaround until we have implemented alternatives.
+
+
+ENOPT_GLOBAL_SHORTCUT (0x04)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+At the beginning of the Python enum implementation, we continued to support
+the shortcut behavior of Shiboken enums: the enum constants were mirrored
+into the enclosing scope.
+This was later emulated in the course of forgiveness mode. For enum classes
+in a PySide class this works fine, but for enum classes directly on the module
+level there is no good way to implement forgiveness.
+
+It is unlikely that errors are hidden for global enums, because they should
+already produce an error during import. But for cases without access to
+the source code, you can help yourself with this flag.
+
+A flag value of 0x6 is likely to solve the majority of problems.
+
+
+Flags for completeness
+----------------------
+
+The following flags complement the description of Python Enums.
+They essentially serve the better understanding of the
+implementation and make it fully transparent and customizable.
+
+
+ENOPT_SCOPED_SHORTCUT (0x08)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For completeness, we also supported mirroring scoped enums, although this
+has since been replaced by forgiveness mode. If you want to try this,
+please also use the ENOPT_NO_FAKESHORTCUT flag (0x10), otherwise the
+effect of this flag will remain invisible.
+
+
+ENOPT_NO_FAKERENAMES (0x10)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Forgiveness mode emulates renaming ``Enum.Flag`` classes back to Shiboken
+QFlags structures, which have slightly different names.
+So when such a defunct name is used, the system replaces it internally
+with the new ``enum.Flag`` structure. Unless special boundary problems
+are provoked, this replacement should work.
+
+To see the effect of this renaming, you can turn it off with this flag.
+
+
+ENOPT_NO_ZERODEFAULT (0x40)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+As part of the forgiveness mode, Python enums can be created by a
+parameterless call, although Python enums actually force a parameter
+when called.
+
+The effect can be examined if this flag is set to disable it.
+
+
+ENOPT_NO_MISSING (0x80)
+~~~~~~~~~~~~~~~~~~~~~~~
+
+There are a few cases where Shiboken enums use missing values. In
+``enum.Flag`` structures, this is allowed anyway because we have set the
+``FlagBoundary.KEEP`` flag (see ``enum.py``).
+
+Normal ``enum.Enum`` structures don't have this provision, but the
+``enum`` module allows to pass a ``_missing_`` function for customization.
+
+Our way of dealing with this situation is to create a new fake
+``enum.Enum`` class with the same name and a nameless instance, and
+pretend with an attribute setting that it has the same type.
+The additional instances created in this way are recorded in a class dict
+``_sbk_missing_`` in order to preserve their identity.
+
+You will see the effect of not defining a ``_missing_`` function if you
+set this flag.
diff --git a/sources/pyside6/doc/developer/extras.rst b/sources/pyside6/doc/developer/extras.rst
new file mode 100644
index 000000000..9788b539d
--- /dev/null
+++ b/sources/pyside6/doc/developer/extras.rst
@@ -0,0 +1,55 @@
+Test a wheel
+============
+
+There is a tool that you can use to test a set of wheels called 'testwheel' but
+it's currently in a different repository (``qt/qtqa``):
+
+- Use ``scripts/packagetesting/testwheel.py`` from the
+ `qtqa repository <https://code.qt.io/cgit/qt/qtqa.git>`_.
+
+To test the wheels:
+
+- Create a virtual environment and activate it.
+- Install the dependencies listed on the ``requirements.txt`` file.
+- Install all the wheels: ``shiboken6``, ``shiboken6-generator``,
+ and ``PySide6-Essentials``.
+- Run the ``testwheel`` tool.
+- Install ``PySide6-Addons`` wheels.
+- Run again the ``testwheel`` tool.
+- In case you have access to commercial wheels, don't forget the
+ ``PySide6-M2M`` as well, and re-run the ``testwheel`` tool.
+
+Build on the command line
+=========================
+
+- Consider using ``build_scripts/qp5_tool.py``.
+
+Build with address sanitizer (Linux)
+====================================
+
+ASAN needs to be told to not exit on memory leaks and its library
+needs to be pre-loaded. Assuming the library is found
+at ``/usr/lib/gcc/x86_64-linux-gnu/11``:
+
+.. code-block:: bash
+
+ export ASAN_OPTIONS=detect_leaks=0
+ export LD_PRELOAD=/usr/lib/gcc/x86_64-linux-gnu/11/libasan.so
+ python setup.py build [...] --sanitize-address
+
+De-Virtualize the Python Files
+==============================
+
+The Python files in the Shiboken module are completely virtual, i.E.
+they are nowhere existent in the file system for security reasons.
+
+For debugging purposes or to change something, it might be desirable
+to move these files into the normal file system, again.
+
+- Setting the environment variable "SBK_EMBED" once to false unpacks these
+ files when PySide6 or shiboken6 are imported. The files are written
+ into "side-packages/shiboken6/files.dir" and are used from then on.
+
+- Setting the variable to true removes "files.dir".
+
+- Without the "SBK_EMBED" variable, the embedding status remains sticky.
diff --git a/sources/pyside6/doc/feature-why.rst b/sources/pyside6/doc/developer/feature-motivation.rst
index b95cb77ac..1509ea724 100644
--- a/sources/pyside6/doc/feature-why.rst
+++ b/sources/pyside6/doc/developer/feature-motivation.rst
@@ -1,4 +1,4 @@
-.. _features-why:
+.. _feature-why:
Why do we have a __feature__?
=============================
@@ -84,12 +84,11 @@ all methods of all classes used in this module are changing their name.
The algorithm to change names is this:
- * if the name has less than 3 chars, or
- * if two upper chars are adjacent, or
- * if the name starts with ``gl`` (which marks OpenGL),
- * the name is returned unchanged. Otherwise
-
- * a single upper char ``C`` is replaced by ``_c``
+* if the name has less than 3 chars, or
+* if two upper chars are adjacent, or
+* if the name starts with ``gl`` (which marks OpenGL),
+* the name is returned unchanged. Otherwise
+* a single upper char ``C`` is replaced by ``_c``
The true_property feature
@@ -220,6 +219,37 @@ the Qt documentation, it would be easier to add all properties that
should be properties and are obviously missing.
+Name Clashes and Solution
+-------------------------
+
+There are some rare cases where a property already exists as a function,
+either with multiple signatures or having parameters.
+This is not very nice in C++ as well, but for Python this is forbidden.
+Example:
+
+.. code-block:: python
+
+ >>> from PySide6 import *
+ >>> from PySide6.support.signature import get_signature
+ >>> import pprint
+ >>> pprint.pprint(get_signature(QtCore.QTimer.singleShot))
+ [<Signature (arg__1: int, arg__2: Callable) -> None>,
+ <Signature (msec: int, receiver: PySide6.QtCore.QObject, member: bytes) -> None>,
+ <Signature (msec: int, timerType: PySide6.QtCore.Qt.TimerType,
+ receiver: PySide6.QtCore.QObject, member: bytes) -> None>]
+
+When creating this property, we respect the existing function and use a slightly
+different name for the property by appending an underscore.
+
+.. code-block:: python
+
+ >>> from __feature__ import true_property
+ >>> QtCore.QTimer.singleShot_
+ <property object at 0x118e5f8b0>
+
+We hope that these clashes can be removed in future Qt versions.
+
+
The __feature__ import
======================
@@ -254,11 +284,20 @@ a ``QtCore.pyi`` file next to ``QtCore.abi3.so`` or ``QtCore.pyd`` on Windows.
When using ``__feature__`` often with common IDEs, you may want to provide
a feature-aware version of ``.pyi`` files to get a correct display. The simplest
-way to change them all in-place is the command
+way to change them all in-place is the command:
-.. code-block:: python
+.. code-block:: bash
pyside6-genpyi all --feature snake_case true_property
+Using __feature__ with UIC files
+--------------------------------
+
+Features can be freely used together with generated UIC files. The UIC files
+are _not_ converted, intentionally. Mixing them with feature selections in other
+Python modules should always work, because switching will happen as needed, selected
+by the currently active module. (Please report to us if this fails for an example)
+
+
.. _`Import-Hooks`: https://docs.python.org/3/reference/import.html#import-hooks
diff --git a/sources/pyside6/doc/developer/index.rst b/sources/pyside6/doc/developer/index.rst
new file mode 100644
index 000000000..92c84259d
--- /dev/null
+++ b/sources/pyside6/doc/developer/index.rst
@@ -0,0 +1,35 @@
+.. _developer-notes:
+
+Developer Notes
+===============
+
+Developing |project| requires people to understand different processes
+and steps that need to be taken into account when dealing with topics
+related to modules, bindings, examples, and more.
+
+Development Topics
+------------------
+
+.. toctree::
+ :maxdepth: 2
+
+ add_module.rst
+ add_port_example.rst
+ add_tool.rst
+ documentation.rst
+ adapt_qt.rst
+ extras.rst
+
+Implementation details
+----------------------
+
+Complementary, here you can find the reasoning and motivation for the
+many features and implementation details that the project has:
+
+.. toctree::
+ :maxdepth: 2
+
+ enumfeatures_doc.rst
+ limited_api.rst
+ signature_doc.rst
+ feature-motivation.rst
diff --git a/sources/pyside6/doc/developer/limited_api.rst b/sources/pyside6/doc/developer/limited_api.rst
new file mode 100644
index 000000000..44d3faad2
--- /dev/null
+++ b/sources/pyside6/doc/developer/limited_api.rst
@@ -0,0 +1,703 @@
+The Transition To The Limited Python API (PEP384)
+=================================================
+
+
+Foreword
+--------
+
+Python supports a limited API that restricts access to certain structures.
+Besides eliminating whole modules and all functions and macros which names
+start with an
+underscore, the most drastic restriction is the removal of normal type object
+declarations.
+
+For details about the eliminated modules and functions, please see the
+`PEP 384`_ page for reference.
+
+
+.. _`PEP 384`: https://www.python.org/dev/peps/pep-0384/
+
+
+
+Changed Modules
+---------------
+
+All changed module's include files are listed with the changed functions here.
+As a general rule, it was tried to keep the changes to a minimum diff.
+Macros which are not available were changed to functions with the same name
+if possible. Completely removed names ``Py{name}`` were re-implemented as ``Pep{name}``.
+
+
+memoryobject.h
+~~~~~~~~~~~~~~
+
+The buffer protocol was completely removed. We redefined all the structures
+and methods, because PySide uses that. This is an exception to the limited API
+that we have to check ourselves. The code is extracted in bufferprocs_py37.h .
+This is related to the following:
+
+
+abstract.h
+~~~~~~~~~~
+
+This belongs to the buffer protocol like memoryobject.h .
+As replacement for ``Py_buffer`` we defined ``Pep_buffer`` and several other
+internal macros.
+
+The version is checked by hand, and the version number must be updated only
+if the implementation does not change. Otherwise, we need to write version
+dependent code paths.
+
+It is questionable if it is worthwhile to continue using the buffer protocol
+or if we should try to get rid of ``Pep_buffer``, completely.
+
+
+pydebug.h
+~~~~~~~~~
+
+We have no direct access to ``Py_VerboseFlag`` because debugging is not
+supported. We redefined it as macro ``Py_VerboseFlag`` which calls ``Pep_VerboseFlag``.
+
+
+unicodeobject.h
+~~~~~~~~~~~~~~~
+
+The macro ``PyUnicode_GET_SIZE`` was removed and replaced by ``PepUnicode_GetLength``
+which evaluates to ``PyUnicode_GetSize`` for Python 2 and ``PyUnicode_GetLength`` for Python 3.
+Since Python 3.3, ``PyUnicode_GetSize`` would have the bad side effect of requiring the GIL!
+
+Function ``_PyUnicode_AsString`` is unavailable and was replaced by a macro
+that calls ``_PepUnicode_AsString``. The implementation was a bit involved,
+and it would be better to change the code and replace this function.
+
+
+bytesobject.h
+~~~~~~~~~~~~~
+
+The macros ``PyBytes_AS_STRING`` and ``PyBytes_GET_SIZE`` were redefined to call
+the according functions.
+
+
+floatobject.h
+~~~~~~~~~~~~~
+
+``PyFloat_AS_DOUBLE`` now calls ``PyFloat_AsDouble``.
+
+
+tupleobject.h
+~~~~~~~~~~~~~
+
+``PyTuple_GET_ITEM``, ``PyTuple_SET_ITEM`` and ``PyTuple_GET_SIZE`` were redefined as
+function calls.
+
+
+listobject.h
+~~~~~~~~~~~~
+
+``PyList_GET_ITEM``, ``PyList_SET_ITEM`` and ``PyList_GET_SIZE`` were redefined as
+function calls.
+
+
+dictobject.h
+~~~~~~~~~~~~
+
+``PyDict_GetItem`` also exists in a ``PyDict_GetItemWithError`` version that does
+not suppress errors. This suppression has the side effect of touching global
+structures. This function exists in Python 2 only since Python 2.7.12 and has
+a different name. We simply implemented the function.
+Needed to avoid the GIL when accessing dictionaries.
+
+
+methodobject.h
+~~~~~~~~~~~~~~
+
+``PyCFunction_GET_FUNCTION``, ``PyCFunction_GET_SELF`` and ``PyCFunction_GET_FLAGS``
+were redefined as function calls.
+
+Direct access to the methoddef structure is not available, and we defined
+``PepCFunction_GET_NAMESTR`` as accessor for name strings.
+
+
+pythonrun.h
+~~~~~~~~~~~
+
+The simple function ``PyRun_String`` is not available. It was re-implemented
+in a simplified version for the signature module.
+
+
+funcobject.h
+~~~~~~~~~~~~
+
+The definitions of funcobject.h are completely missing, although there
+are extra ``#ifdef`` conditional defines inside, too. This suggests that the exclusion
+was unintended.
+
+We therefore redefined ``PyFunctionObject`` as an opaque type.
+
+The missing macro ``PyFunction_Check`` was defined, and the macro
+``PyFunction_GET_CODE`` calls the according function.
+
+There is no equivalent for function name access, therefore we introduced
+``PepFunction_GetName`` either as a function or as a macro.
+
+*TODO: We should fix funcobject.h*
+
+
+classobject.h
+~~~~~~~~~~~~~
+
+Classobject is also completely not imported, instead of defining an opaque type.
+
+We defined the missing functions ``PyMethod_New``, ``PyMethod_Function`` and
+``PyMethod_Self`` and also redefined ``PyMethod_GET_SELF`` and
+``PyMethod_GET_FUNCTION`` as calls to these functions.
+
+*TODO: We should fix classobject.h*
+
+
+code.h
+~~~~~~
+
+The whole code.c code is gone, although it may make sense to
+define some minimum accessibility. This will be clarified on
+`Python-Dev`_. We needed access to code objects and defined the missing
+PepCode_GET_FLAGS and PepCode_GET_ARGCOUNT either as function or macro.
+We further added the missing flags, although few are used:
+
+``CO_OPTIMIZED`` ``CO_NEWLOCALS`` ``CO_VARARGS`` ``CO_VARKEYWORDS`` ``CO_NESTED``
+``CO_GENERATOR``
+
+*TODO: We should maybe fix code.h*
+
+.. _`Python-Dev`: https://mail.python.org/mailman/listinfo/python-dev
+
+datetime.h
+~~~~~~~~~~
+
+The DateTime module is explicitly not included in the limited API.
+We defined all the needed functions but called them via Python instead
+of direct call macros. This has a slight performance impact.
+
+The performance could be easily improved by providing an interface
+that fetches all attributes at once, instead of going through the object
+protocol every time.
+
+The re-defined macros and methods are::
+
+ PyDateTime_GET_YEAR
+ PyDateTime_GET_MONTH
+ PyDateTime_GET_DAY
+ PyDateTime_DATE_GET_HOUR
+ PyDateTime_DATE_GET_MINUTE
+ PyDateTime_DATE_GET_SECOND
+ PyDateTime_DATE_GET_MICROSECOND
+ PyDateTime_DATE_GET_FOLD
+ PyDateTime_TIME_GET_HOUR
+ PyDateTime_TIME_GET_MINUTE
+ PyDateTime_TIME_GET_SECOND
+ PyDateTime_TIME_GET_MICROSECOND
+ PyDateTime_TIME_GET_FOLD
+
+ PyDate_Check
+ PyDateTime_Check
+ PyTime_Check
+
+ PyDate_FromDate
+ PyDateTime_FromDateAndTime
+ PyTime_FromTime
+
+*XXX: We should maybe provide an optimized interface to datetime*
+
+
+object.h
+~~~~~~~~
+
+The file object.h contains the ``PyTypeObject`` structure, which is supposed
+to be completely opaque. All access to types should be done through
+``PyType_GetSlot`` calls. Due to bugs and deficiencies in the limited API
+implementation, it was not possible to do that. Instead, we have defined
+a simplified structure for ``PyTypeObject`` that has only the fields that
+are used in PySide.
+
+We will explain later why and how this was done. Here is the reduced
+structure::
+
+ typedef struct _typeobject {
+ PyVarObject ob_base;
+ const char *tp_name;
+ Py_ssize_t tp_basicsize;
+ void *X03; // Py_ssize_t tp_itemsize;
+ void *X04; // destructor tp_dealloc;
+ void *X05; // printfunc tp_print;
+ void *X06; // getattrfunc tp_getattr;
+ void *X07; // setattrfunc tp_setattr;
+ void *X08; // PyAsyncMethods *tp_as_async;
+ void *X09; // reprfunc tp_repr;
+ void *X10; // PyNumberMethods *tp_as_number;
+ void *X11; // PySequenceMethods *tp_as_sequence;
+ void *X12; // PyMappingMethods *tp_as_mapping;
+ void *X13; // hashfunc tp_hash;
+ ternaryfunc tp_call;
+ reprfunc tp_str;
+ void *X16; // getattrofunc tp_getattro;
+ void *X17; // setattrofunc tp_setattro;
+ void *X18; // PyBufferProcs *tp_as_buffer;
+ void *X19; // unsigned long tp_flags;
+ void *X20; // const char *tp_doc;
+ traverseproc tp_traverse;
+ inquiry tp_clear;
+ void *X23; // richcmpfunc tp_richcompare;
+ Py_ssize_t tp_weaklistoffset;
+ void *X25; // getiterfunc tp_iter;
+ void *X26; // iternextfunc tp_iternext;
+ struct PyMethodDef *tp_methods;
+ void *X28; // struct PyMemberDef *tp_members;
+ void *X29; // struct PyGetSetDef *tp_getset;
+ struct _typeobject *tp_base;
+ PyObject *tp_dict;
+ descrgetfunc tp_descr_get;
+ void *X33; // descrsetfunc tp_descr_set;
+ Py_ssize_t tp_dictoffset;
+ initproc tp_init;
+ allocfunc tp_alloc;
+ newfunc tp_new;
+ freefunc tp_free;
+ inquiry tp_is_gc; /* For PyObject_IS_GC */
+ PyObject *tp_bases;
+ PyObject *tp_mro; /* method resolution order */
+ } PyTypeObject;
+
+Function ``PyIndex_Check`` had to be defined in an unwanted way due to
+a Python issue. See file pep384_issue33738.cpp .
+
+There are extension structures which have been isolated as special macros that
+dynamically compute the right offsets of the extended type structures:
+
+* ``PepType_SOTP`` for ``SbkObjectTypePrivate``
+* ``PepType_SETP`` for ``SbkEnumTypePrivate``
+* ``PepType_PFTP`` for ``PySideQFlagsTypePrivate``
+
+How these extension structures are used can best be seen by searching
+``PepType_{four}`` in the source.
+
+Due to the new heaptype interface, the names of certain types contain
+now the module name in the ``tp_name`` field. To have a compatible way
+to access simple type names as C string, ``PepType_GetNameStr`` has been
+written that skips over dotted name parts.
+
+Finally, the function ``_PyObject_Dump`` was excluded from the limited API.
+This is a useful debugging aid that we always want to have available,
+so it is added back, again. Anyway, we did not reimplement it, and so
+Windows is not supported.
+Therefore, a forgotten debugging call of this functions will break COIN. :-)
+
+
+Using The New Type API
+----------------------
+
+After converting everything but the object.h file, we were a little
+bit shocked: it suddenly was clear that we would have no more
+access to type objects, and even more scary that all types which we
+use have to be heap types, only!
+
+For PySide with its intense use of heap type extensions in various
+flavors, the situation looked quite unsolvable. In the end, it was
+nicely solved, but it took almost 3.5 months to get that right.
+
+Before we see how this is done, we will explain the differences
+between the APIs and their consequences.
+
+
+The Interface
+~~~~~~~~~~~~~
+
+The old type API of Python knows static types and heap types.
+Static types are written down as a declaration of a ``PyTypeObject``
+structure with all its fields filled in. Here is for example
+the definition of the Python type ``object`` (Python 3.6)::
+
+ PyTypeObject PyBaseObject_Type = {
+ PyVarObject_HEAD_INIT(&PyType_Type, 0)
+ "object", /* tp_name */
+ sizeof(PyObject), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ object_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_reserved */
+ object_repr, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ (hashfunc)_Py_HashPointer, /* tp_hash */
+ 0, /* tp_call */
+ object_str, /* tp_str */
+ PyObject_GenericGetAttr, /* tp_getattro */
+ PyObject_GenericSetAttr, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ PyDoc_STR("object()\n--\n\nThe most base type"), /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ object_richcompare, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ object_methods, /* tp_methods */
+ 0, /* tp_members */
+ object_getsets, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ object_init, /* tp_init */
+ PyType_GenericAlloc, /* tp_alloc */
+ object_new, /* tp_new */
+ PyObject_Del, /* tp_free */
+ };
+
+We can write the same structure in form of a ``PyType_Spec`` structure,
+and there is even an incomplete tool *abitype.py* that does this conversion
+for us. With a few corrections, the result looks like this::
+
+ static PyType_Slot PyBaseObject_Type_slots[] = {
+ {Py_tp_dealloc, (void *)object_dealloc},
+ {Py_tp_repr, (void *)object_repr},
+ {Py_tp_hash, (void *)_Py_HashPointer},
+ {Py_tp_str, (void *)object_str},
+ {Py_tp_getattro, (void *)PyObject_GenericGetAttr},
+ {Py_tp_setattro, (void *)PyObject_GenericSetAttr},
+ {Py_tp_richcompare, (void *)object_richcompare},
+ {Py_tp_methods, (void *)object_methods},
+ {Py_tp_getset, (void *)object_getsets},
+ {Py_tp_init, (void *)object_init},
+ {Py_tp_alloc, (void *)PyType_GenericAlloc},
+ {Py_tp_new, (void *)object_new},
+ {Py_tp_free, (void *)PyObject_Del},
+ {0, 0},
+ };
+ static PyType_Spec PyBaseObject_Type_spec = {
+ "object",
+ sizeof(PyObject),
+ 0,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ PyBaseObject_Type_slots,
+ };
+
+This new structure is almost compatible with the old one, but there
+are some subtle differences.
+
+* The new types are generated in one step
+
+This seems to be no problem, but it was very much, due to the way the
+types were built in PySide. Types were assembled piece by piece, and
+finally the ``PyType_Ready`` function was called.
+
+With the new API, ``PyType_Ready`` is called already at the end of
+``PyType_FromSpec``, and that meant that the logic of type creation became
+completely turned upside down.
+
+* The new types are always heaptypes
+
+With the new type creation functions, it is no longer possible to
+create "normal" types. Instead, they all have to be allocated on the
+heap and garbage collected. The user should normally not recognize this.
+But type creation is more constrained, and you cannot create a subtype
+if the ``Py_TPFLAGS_BASETYPE`` is not set. This constraint was already
+violated by PySide and needed a quite profound fix.
+
+* The new types always need a module
+
+While this is not a problem per se, the above new type spec will not create
+a usable new type, but complain with::
+
+ DeprecationWarning: builtin type object has no __module__ attribute
+
+But there are more problems:
+
+* The new types have unexpected defaults
+
+When fields are empty, you would usually assume that they stay empty.
+There are just a few corrections that ``PyType_Ready`` will do to a type.
+
+But there is the following clause in ``PyType_FromSpec`` that can give you
+many headaches::
+
+ if (type->tp_dealloc == NULL) {
+ /* It's a heap type, so needs the heap types' dealloc.
+ subtype_dealloc will call the base type's tp_dealloc, if
+ necessary. */
+ type->tp_dealloc = subtype_dealloc;
+ }
+
+In fact, before the move to the new API, the ``PyType_Ready`` function
+filled empty ``tp_dealloc`` fields with ``object_dealloc``. And the code
+that has been written with that in mind now becomes pretty wrong if suddenly
+``subtype_dealloc`` is used.
+
+The way out was to explicitly provide an ``object_dealloc`` function.
+This would then again impose a problem, because ``object_dealloc`` is not
+public. Writing our own version is easy, but it again needs access to
+type objects. But fortunately, we have broken this rule, already...
+
+
+* The new types are only partially allocated
+
+The structures used in ``PyType_FromSpec`` are almost all allocated,
+only the name field is static. This is no problem for types which are
+statically created once. But if you want to parameterize things and
+create multiple types with a single slots and spec definition, the name
+field that is used for tp_name must be allocated dynamically.
+This is misleading, since all the slots already are copies.
+
+* The new types don't support special offsets
+
+The special fields ``tp_weaklistoffset`` and ``tp_dictoffset`` are not supported
+by ``PyType_FromSpec``. Unfortunately the documentation does not tell you
+if you are allowed to set these fields manually after creating the type or not.
+We finally did it and it worked, but we are not sure about correctness.
+
+See basewrapper.cpp function ``SbkObject_TypeF()`` as the only reference to
+these fields in PySide. This single reference is absolutely necessary and
+very important, since all derived types invisibly inherit these two fields.
+
+
+Future Versions Of The Limited API
+----------------------------------
+
+As we have seen, the current version of the limited API does a bit of
+cheating, because it uses parts of the data structure that should be
+an opaque type. At the moment, this works fine because the data is
+still way more compatible as it could be.
+
+But what if this is changed in the future?
+
+We know that the data structures are stable until Python 3.8 comes out.
+Until then, the small bugs and omissions will hopefully all be solved.
+Then it will be possible to replace the current small tricks by calls
+to ``PyType_GetSlot`` in the way things should be.
+
+At the very moment when the current assumptions about the data structure
+are no longer true, we will rewrite the direct attribute access with
+calls to ``PyType_GetSlot``. After that, no more changes will be necessary.
+
+
+Appendix A: The Transition To Simpler Types
+-------------------------------------------
+
+After all code had been converted to the limited API, there was a
+remaining problem with the ``PyHeapTypeObject``.
+
+Why a problem? Well, all the type structures in shiboken use
+special extra fields at the end of the heap type object. This
+currently enforces extra knowledge at compile time about how large the
+heap type object is. In a clean implementation, we would only use
+the ``PyTypeObject`` itself and access the fields *behind* the type
+by a pointer that is computed at runtime.
+
+
+Restricted PyTypeObject
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Before we are going into details, let us motivate the existence of
+the restricted ``PyTypeObject``:
+
+Originally, we wanted to use ``PyTypeObject`` as an opaque type and
+restrict ourselves to only use the access function ``PyType_GetSlot``.
+This function allows access to all fields which are supported by
+the limited API.
+
+But this is a restriction, because we get no access to ``tp_dict``,
+which we need to support the signature extension. But we can work
+around that.
+
+The real restriction is that ``PyType_GetSlot`` only works for heap
+types. This makes the function quite useless, because we have
+no access to ``PyType_Type``, which is the most important type ``type``
+in Python. We need that for instance to compute the size of
+``PyHeapTypeObject`` dynamically.
+
+With much effort, it is possible to clone ``PyType_Type`` as a heap
+type. But due to a bug in the Pep 384 support, we need
+access to the ``nb_index`` field of a normal type. Cloning does not
+help because ``PyNumberMethods`` fields are *not* inherited.
+
+After we realized this dead end, we changed concept and did not
+use ``PyType_GetSlot`` at all (except in function ``copyNumberMethods``),
+but created a restricted ``PyTypeObject`` with only those fields
+defined that are needed in PySide.
+
+Is this breakage of the limited API? I don't think so. A special
+function runs on program startup that checks the correct position
+of the fields of ``PyTypeObject``, although a change in those fields is
+more than unlikely.
+The really crucial thing is to no longer use ``PyHeapTypeObject``
+explicitly because that *does* change its layout over time.
+
+
+Diversification
+~~~~~~~~~~~~~~~
+
+There were multiple ``Sbk{something}`` structures which all used a "d" field
+for their private data. This made it not easy to find the right
+fields when switching between objects and types::
+
+ struct LIBSHIBOKEN_API SbkObject
+ {
+ PyObject_HEAD
+ PyObject *ob_dict;
+ PyObject *weakreflist;
+ SbkObjectPrivate *d;
+ };
+
+ struct LIBSHIBOKEN_API SbkObjectType
+ {
+ PyHeapTypeObject super;
+ SbkObjectTypePrivate *d;
+ };
+
+The first step was to rename the SbkObjectTypePrivate part from "d" to
+"sotp". It was chosen to be short but easy to remember as abbreviation
+of "SbkObjectTypePrivate", leading to::
+
+ struct LIBSHIBOKEN_API SbkObjectType
+ {
+ PyHeapTypeObject super;
+ SbkObjectTypePrivate *sotp;
+ };
+
+After renaming, it was easier to do the following transformations.
+
+
+Abstraction
+~~~~~~~~~~~
+
+After renaming the type extension pointers to ``sotp``, I replaced
+them by function-like macros which did the special access *behind*
+the types, instead of those explicit fields. For instance, the
+expression::
+
+ type->sotp->converter
+
+became::
+
+ PepType_SOTP(type)->converter
+
+The macro expansion can be seen here::
+
+ #define PepHeapType_SIZE \
+ (reinterpret_cast<PyTypeObject *>(&PyType_Type)->tp_basicsize)
+
+ #define _genericTypeExtender(etype) \
+ (reinterpret_cast<char *>(etype) + PepHeapType_SIZE)
+
+ #define PepType_SOTP(etype) \
+ (*reinterpret_cast<SbkObjectTypePrivate **>(_genericTypeExtender(etype)))
+
+This looks complicated, but in the end there is only a single new
+indirection via ``PyType_Type``, which happens at runtime. This is the
+key to fulfil what Pep 384 wants to achieve: *No more version-dependent fields*.
+
+
+Simplification
+~~~~~~~~~~~~~~
+
+After all type extension fields were replaced by macro calls, we
+could remove the following version dependent re-definition of ``PyHeapTypeObject``
+::
+
+ typedef struct _pyheaptypeobject {
+ union {
+ PyTypeObject ht_type;
+ void *opaque[PY_HEAPTYPE_SIZE];
+ };
+ } PyHeapTypeObject;
+
+, and the version dependent structure::
+
+ struct LIBSHIBOKEN_API SbkObjectType
+ {
+ PyHeapTypeObject super;
+ SbkObjectTypePrivate *sotp;
+ };
+
+could be removed. SbkObjectType remains as a (deprecated)
+type alias to PyTypeObject.
+
+
+Appendix B: Verification Of PyTypeObject
+----------------------------------------
+
+We have introduced a limited PyTypeObject in the same place
+as the original PyTypeObject, and now we need to prove that
+we are allowed to do so.
+
+When using the limited API as intended, then types are completely
+opaque, and access is only through ``PyType_FromSpec`` and (from
+version 3.5 upwards) through ``PyType_GetSlot``.
+
+Python then uses all the slot definitions in the type description
+and produces a regular heap type object.
+
+
+Unused Information
+~~~~~~~~~~~~~~~~~~
+
+We know many things about types that are not explicitly said,
+but they are inherently clear:
+
+(a) The basic structure of a type is always the same, regardless
+ if it is a static type or a heap type.
+
+(b) types are evolving very slowly, and a field is never replaced
+ by another field with different semantics.
+
+Inherent rule (a) gives us the following information: If we calculate
+the offsets of the basic fields, then this info is also usable for non-heap
+types.
+
+The validation checks if rule (b) is still valid.
+
+
+How it Works
+~~~~~~~~~~~~
+
+The basic idea of the validation is to produce a new type using
+``PyType_FromSpec`` and to see where in the type structure these fields
+show up. So we build a ``PyType_Slot`` structure with all the fields we
+are using and make sure that these values are all unique in the
+type.
+
+Most fields are not interrogated by ``PyType_FromSpec``, and so we
+simply used some numeric value. Some fields are interpreted, like
+``tp_members``. This field must really be a ``PyMemberDef``. And there are
+``tp_base`` and ``tp_bases`` which have to be type objects and lists
+thereof. It was easiest to not produce these fields from scratch
+but use them from the ``type`` object ``PyType_Type``.
+
+Then one would think to write a function that searches the known
+values in the opaque type structure.
+
+But we can do better and use optimistically the observation (b):
+We simply use the restricted ``PyTypeObject`` structure and assume that
+every field lands exactly where we are awaiting it.
+
+And that is the whole proof: If we find all the disjoint values at
+the places where we expect them, then verification is done.
+
+
+About ``tp_dict``
+~~~~~~~~~~~~~~~~~
+
+One word about the ``tp_dict`` field: This field is a bit special in
+the proof, since it does not appear in the spec and cannot easily
+be checked by ``type.__dict__`` because that creates a *dictproxy*
+object. So how do we prove that is really the right dict?
+
+We have to create that ``PyMethodDef`` structure anyway, and instead of
+leaving it empty, we insert a dummy function. Then we ask the
+``tp_dict`` field if it has the awaited object in it, and that's it!
+
+#EOT
diff --git a/sources/pyside6/doc/developer/signature_doc.rst b/sources/pyside6/doc/developer/signature_doc.rst
new file mode 100644
index 000000000..a6c703dab
--- /dev/null
+++ b/sources/pyside6/doc/developer/signature_doc.rst
@@ -0,0 +1,361 @@
+.. _signature-extension:
+
+The signature C extension
+=========================
+
+This module is a C extension for CPython 3.5 and up, and CPython 2.7.
+Its purpose is to provide support for the ``__signature__`` attribute
+of builtin PyCFunction objects.
+
+
+Short Introduction to the Topic
+-------------------------------
+
+Beginning with CPython 3.5, Python functions began to grow a ``__signature__``
+attribute for normal Python functions. This is totally optional and just
+a nice-to-have feature in Python.
+
+PySide, on the other hand, could use ``__signature__`` very much, because the
+typing info for the 15000+ PySide functions is really missing, and it
+would be nice to have this info directly available.
+
+
+The Idea to Support Signatures
+------------------------------
+
+We want to have an additional ``__signature__`` attribute in all PySide
+methods, without changing lots of generated code.
+Therefore, we did not change any of the existing data structures,
+but supported the new attribute by a global dictionary.
+
+When the ``__signature__`` property is requested, a method is called that
+does a lookup in the global dict. This is a flexible approach with little impact
+to the rest of the project. It has very limited overhead compared to direct
+attribute access, but for the need of a signature access from time to time,
+this is an adequate compromise.
+
+
+How this Code Works
+~~~~~~~~~~~~~~~~~~~
+
+Signatures are supported for regular Python functions, only. Creating signatures
+for ``PyCFunction`` objects would require quite some extra effort in Python.
+
+Fortunately, we found this special *stealth* technique, that saves us most of the
+needed effort:
+
+The basic idea is to create a dummy Python function with **varnames**, **defaults**
+and **annotations** properties, and then to use the inspect
+module to create a signature object. This object is returned as the computed
+result of the ``__signature__`` attribute of the real ``PyCFunction`` object.
+
+There is one thing that really changes Python a bit:
+
+* We added the ``__signature__`` attribute to every function.
+
+That is a little change to Python that does not harm, but it saves us
+tons of code, that was needed in the early versions of the module.
+
+The internal work is done in two steps:
+
+* All functions of a class get the *signature text* when the module is imported.
+ This is only a very small overhead added to the startup time. It is a single
+ string for each whole class.
+* The actual signature object is created later, when the attribute is really
+ requested. Signatures are cached and only created on first access.
+
+Example:
+
+The ``PyCFunction`` ``QtWidgets.QApplication.palette`` is interrogated for its
+signature. That means ``pyside_sm_get___signature__()`` is called.
+It calls ``GetSignature_Function`` which returns the signature if it is found.
+
+
+Why this Code is Fast
+~~~~~~~~~~~~~~~~~~~~~
+
+It costs a little time (maybe 6 seconds) to run through every single signature
+object, since these are more than 25000 Python objects. But all the signature
+objects will be rarely accessed but in special applications.
+The normal case are only a few accesses, and these are working pretty fast.
+
+The key to make this signature module fast is to avoid computation as much as
+possible. When no signature objects are used, then almost no time is lost in
+initialization. Only the above mentioned strings and some support modules are
+additionally loaded on ``import PySide6``.
+When it comes to signature usage, then late initialization is used and cached.
+This technique is also known as *full laziness* in haskell.
+
+There are actually two locations where late initialization occurs:
+
+* ``dict`` can be no dict but a tuple. That is the initial argument tuple that
+ was saved by ``PySide_BuildSignatureArgs`` at module load time.
+ If so, then ``pyside_type_init`` in parser.py will be called,
+ which parses the string and creates the dict.
+* ``props`` can be empty. Then ``create_signature`` in loader.py
+ is called, which uses a dummy function to produce a signature instance
+ with the inspect module.
+
+The initialization that is always done is just two dictionary writes
+per class, and we have about 1000 classes.
+To measure the additional overhead, we have simulated what happens
+when ``from PySide6 import *`` is performed.
+It turned out that the overhead is below 0.5 ms.
+
+
+The Signature Package Structure
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The C++ code involved with the signature module is completely in the file
+shiboken6/libshiboken/signature.cpp . All other functionality is implemented in
+the ``signature`` Python package. It has the following structure::
+
+ sources/shiboken6/shibokenmodule/files.dir/shibokensupport
+ ├── __init__.py
+ ├── feature.py
+ ├── fix-complaints.py
+ ├── shibokensupport.pyproject
+ └── signature
+ ├── PSF-3.7.0.txt
+ ├── __init__.py
+ ├── errorhandler.py
+ ├── importhandler.py
+ ├── layout.py
+ ├── lib
+ │   ├── __init__.py
+ │   ├── enum_sig.py
+ │   ├── pyi_generator.py
+ │   └── tool.py
+ ├── loader.py
+ ├── mapping.py
+ ├── parser.py
+ └── qt_attribution.json
+
+Really important are the **parser**, **mapping**, **errorhandler**, **enum_sig**,
+**layout** and **loader** modules. The rest is needed to create Python 2 compatibility
+or be compatible with embedding and installers.
+
+
+**loader.py**
+ This module assembles and imports the ``inspect`` module, and then exports the
+ ``create_signature`` function. This function takes a fake function and some
+ attributes and builds a ``__signature__`` object with the inspect module.
+
+
+**parser.py**
+ This module takes a class signatures string from C++ and parses it into the
+ needed properties for the ``create_signature`` function. Its entry point is the
+ ``pyside_type_init`` function, which is called from the C module via ``loader.py``.
+
+
+**mapping.py**
+ The purpose of the mapping module is maintaining a list of replacement strings
+ that map from the *signature text* in C to the property strings that Python
+ needs. A lot of mappings are resolved by rather complex expressions in ``parser.py``,
+ but a few hundred cases are better to spell explicitly, here.
+
+**errorhandler.py**
+ Since ``Qt For Python 5.12``, we no longer use the builtin type error messages from C++.
+ Instead, we get much better results with the signature module. At the same time,
+ this enforced supporting shiboken as well, and the signature module was no longer
+ optional.
+
+**enum_sig.py**
+ The diverse applications of the signature module all needed to iterate over modules,
+ classes and functions. In order to centralize this enumeration, the process has
+ been factored out as a context manager. The user has only to supply functions
+ that do the actual formatting.
+
+ See for example the .pyi generator ``pyside6/PySide6/support/generate_pyi.py``.
+
+**layout.py**
+ As more applications used the signature module, different formatting of signatures
+ was needed. To support that, we created the function ``create_signature``, which
+ has a parameter to choose from some predefined layouts.
+
+
+**typing27.py**
+ Python 2 has no typing module at all. This is a backport of the minimum that is needed.
+
+
+**backport_inspect.py**
+ Python 2 has an inspect module, but lacks the signature functions, completely.
+ This module adds the missing functionality, which is merged at runtime into
+ the inspect module.
+
+
+Multiple Arities
+~~~~~~~~~~~~~~~~
+
+One aspect that was ignored so far was *multiple arities*: How to handle it when
+a function has more than one signature?
+
+I did not find any note on how multiple signatures should be treated in Python,
+but this simple rules seem to work well:
+
+* If there is a list, then it is a multi-signature.
+* Otherwise, it is a simple signature.
+
+
+Impacts of The Signature Module
+-------------------------------
+
+The signature module has a number of impacts to other PySide modules, which were
+created as a consequence of its existence, and there will be a few more in the
+future:
+
+
+existence_test.py
+~~~~~~~~~~~~~~~~~
+
+The file ``pyside6/tests/registry/existence_test.py`` was written using the
+signatures from the signatures module. The idea is that there are some 15000
+functions with a certain signature.
+
+These functions should not get lost by some bad check-in. Therefore, a list
+of all existing signatures is kept as a module that assembles a
+dictionary. The function existence is checked, and also the exact arity.
+
+This module exists for every PySide release and every platform. The initial
+module is generated once and saved as ``exists_{plat}_{version}.py``.
+
+An error is normally only reported as a warning, but:
+
+
+Interaction With The Coin Module
+++++++++++++++++++++++++++++++++
+
+When this test program is run in COIN, then the warnings are turned into
+errors. The reason is that only in COIN, we have a stable configuration
+of PySide modules that can reliably be compared.
+
+These modules have the name ``exists_{platf}_{version}_ci.py``, and as a big
+exception for generated code, these files are *intentionally* checked in.
+
+
+What Happens When a List is Missing?
+++++++++++++++++++++++++++++++++++++
+
+When a new version of PySide gets created, then the existence test files
+initially do not exist.
+
+When a COIN test is run, then it will complain about the error and create
+the missing module on standard output.
+But since COIN tests are run multiple times, the output that was generated
+by the first test will still exist at the subsequent runs.
+(If COIN was properly implemented, we could not take that advantage and
+would need to implement that as an extra exception.)
+
+As a result, a missing module will be reported as a test which partially
+succeeded (called "FLAKY"). To avoid further flaky tests and to activate as a real test,
+we can now capture the error output of COIN and check the generated module
+in.
+
+
+Explicitly Enforcing Recreation
++++++++++++++++++++++++++++++++
+
+The former way to regenerate the registry files was to remove the files
+and check that in. This has the desired effect, but creates huge deltas.
+As a more efficient way, we have prepared a comment in the first line
+that contains the word "recreate".
+By uncommenting this line, a NameError is triggered, which has the same
+effect.
+
+
+init_platform.py
+++++++++++++++++
+
+For generating the ``exists_{platf}_{version}`` modules, the module
+``pyside6/tests/registry/init_platform.py`` was written. It can be used
+standalone from the commandline, to check the compatibility of some
+changes, directly.
+
+
+scrape_testresults.py
+~~~~~~~~~~~~~~~~~~~~~
+
+To simplify and automate the process of extracting the ``exists_{platf}_{version}_ci.py``
+files, the script ``pyside6/tests/registry/scrape_testresults.py`` has been written.
+
+This script scans the whole testresults website for PySide, that is::
+
+ https://testresults.qt.io/coin/api/results/pyside/pyside-setup/
+
+On the first scan, the script runs less than 30 minutes. After that, a cache
+is generated and the scan works *much* faster. The test results are placed
+into the folder ``pyside6/tests/registry/testresults/embedded/`` with a
+unique name that allows for easy sorting. Example::
+
+ testresults/embedded/2018_09_10_10_40_34-test_1536891759-exists_linux_5_11_2_ci.py
+
+These files are created only once. If they already exist, they are not touched, again.
+The file `pyside6/tests/registry/known_urls.json`` holds all scanned URLs after
+a successful scan. The ``testresults/embedded`` folder can be kept for reference
+or can be removed. Important is only the json file.
+
+The result of a scan is then directly placed into the ``pyside6/tests/registry/``
+folder. It should be reviewed and then eventually checked in.
+
+
+generate_pyi.py
+~~~~~~~~~~~~~~~
+
+``pyside6/PySide6/support/generate_pyi.py`` is still under development.
+This module generates so-called hinting stubs for integration of PySide
+with diverse *Python IDEs*.
+
+Although this module creates the stubs as an add-on, the
+impact on the quality of the signature module is considerable:
+
+The module must create syntactically correct ``.pyi`` files which contain
+not only signatures but also constants and enums of all PySide modules.
+This serves as an extra challenge that has a very positive effect on
+the completeness and correctness of signatures.
+
+The module has a ``--feature`` option to generate modified .pyi files.
+A shortcut for this command is ``pyside6-genpyi``.
+
+A useful command to change all .pyi files to use all features is
+
+.. code-block:: bash
+
+ pyside6-genpyi all --feature snake_case true_property
+
+
+pyi_generator.py
+~~~~~~~~~~~~~~~~
+
+``shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/pyi_generator.py``
+has been extracted from ``generate_pyi.py``. It allows the generation of ``.pyi``
+files from arbitrary extension modules created with shiboken.
+
+A shortcut for this command is ``shiboken6-genpyi``.
+
+
+Current Extensions
+~~~~~~~~~~~~~~~~~~
+
+Before the signature module was written, there already existed the concept of
+signatures, but in a more C++ - centric way. From that time, there existed
+the error messages, which are created when a function gets wrong argument types.
+
+These error messages were replaced by text generated on demand by
+the signature module, in order to be more consistent and correct.
+This was implemented in ``Qt For Python 5.12.0``.
+
+Additionally, the ``__doc__`` attribute of PySide methods was not set.
+It was easy to get a nice ``help()`` feature by creating signatures
+as default content for docstrings.
+This was implemented in ``Qt For Python 5.12.1``.
+
+
+Literature
+----------
+
+* `PEP 362 – Function Signature Object <https://www.python.org/dev/peps/pep-0362/>`__
+* `PEP 484 – Type Hints <https://www.python.org/dev/peps/pep-0484/>`__
+* `PEP 3107 – Function Annotations <https://www.python.org/dev/peps/pep-3107/>`__
+
+
+*Personal Remark: This module is dedicated to our lovebird "Püppi", who died on 2017-09-15.*
diff --git a/sources/pyside6/doc/extras/QtBluetooth.rst b/sources/pyside6/doc/extras/QtBluetooth.rst
new file mode 100644
index 000000000..965896752
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtBluetooth.rst
@@ -0,0 +1,102 @@
+Qt Bluetooth enables connectivity between Bluetooth enabled devices.
+
+The Bluetooth API provides connectivity between Bluetooth enabled devices.
+
+Currently, the API is supported on the following platforms:
+
+ +-------------------------------------+-------+---+-----------------+-----------------------------------------+--------------+
+ |API Feature |Android|iOS|Linux (BlueZ 5.x)|:ref:`macOS<Qt-WebEngine-Platform-Notes>`|Qt for Windows|
+ +-------------------------------------+-------+---+-----------------+-----------------------------------------+--------------+
+ |Classic Bluetooth |x | |x |x |x |
+ +-------------------------------------+-------+---+-----------------+-----------------------------------------+--------------+
+ |Bluetooth LE Central |x |x |x |x |x |
+ +-------------------------------------+-------+---+-----------------+-----------------------------------------+--------------+
+ |Bluetooth LE Peripheral |x |x |x |x | |
+ +-------------------------------------+-------+---+-----------------+-----------------------------------------+--------------+
+ |Bluetooth LE Advertisement & Scanning| | | | | |
+ +-------------------------------------+-------+---+-----------------+-----------------------------------------+--------------+
+
+Qt 5.14 adds a native Win32 port supporting Classic Bluetooth on Windows 7 or
+newer, and Bluetooth LE on Windows 8 or newer. It must be enabled at build time
+by configuration option -native-win32-bluetooth. The UWP backend is used by
+default if this option is not set and the Win32 target platform supports the
+required UWP APIs (minimal requirement is Windows 10 version 1507, with
+slightly improved service discovery since Windows 10 version 1607).
+
+Overview
+^^^^^^^^
+
+Bluetooth is a short-range (less than 100 meters) wireless technology. It has a
+reasonably high data transfer rate of 2.1 Mbit/s, which makes it ideal for
+transferring data between devices. Bluetooth connectivity is based on basic
+device management, such as scanning for devices, gathering information about
+them, and exchanging data between them.
+
+Qt Bluetooth supports Bluetooth Low Energy development for client/central role
+use cases. Further details can be found in the :ref:`Bluetooth Low Energy
+Overview<Bluetooth-Low-Energy-Overview>` section.
+
+Using the Module
+^^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtBluetooth
+
+macOS Specific
+^^^^^^^^^^^^^^
+
+The Bluetooth API on macOS requires a certain type of event dispatcher that in
+Qt causes a dependency to
+:class:`QGuiApplication<PySide6.QtGui.QGuiApplication>` . However, you can set
+the environment variable ``QT_EVENT_DISPATCHER_CORE_FOUNDATION=1`` to
+circumvent this issue.
+
+Applications that don't use Classic Bluetooth will find a subset of
+`QtBluetooth`_ is available,
+as CoreBluetooth (Bluetooth LE) do not require either of
+:class:`QApplication<PySide6.QtWidgets.QApplication>` or
+:class:`QGuiApplication<PySide6.QtGui.QGuiApplication>` .
+
+Guides
+^^^^^^
+
+ * :ref:`Classic Bluetooth Overview<Qt-Bluetooth-Overview>`
+ * :ref:`Bluetooth Low Energy Overview<Bluetooth-Low-Energy-Overview>`
+
+
+Logging Categories
+^^^^^^^^^^^^^^^^^^
+
+The `QtBluetooth`_ module
+exports the following :class:`logging categories<~.Configuring Categories>` :
+
+ +--------------------+-------------------------------------------------------------+
+ |Logging Category |Description |
+ +--------------------+-------------------------------------------------------------+
+ |qt.bluetooth |Enables logging of cross platform code path in `QtBluetooth`_|
+ +--------------------+-------------------------------------------------------------+
+ |qt.bluetooth.android|Enables logging of the Android implementation |
+ +--------------------+-------------------------------------------------------------+
+ |qt.bluetooth.bluez |Enables logging of the BLuez/Linux implementation |
+ +--------------------+-------------------------------------------------------------+
+ |qt.bluetooth.ios |Enables logging of the iOS implementation |
+ +--------------------+-------------------------------------------------------------+
+ |qt.bluetooth.osx |Enables logging of the macOS implementation |
+ +--------------------+-------------------------------------------------------------+
+ |qt.bluetooth.windows|Enables logging of the Qt for Windows implementation |
+ +--------------------+-------------------------------------------------------------+
+
+Logging categories can be used to enable additional warning and debug output
+for `QtBluetooth`_ . More detailed information about logging can be found in
+:class:`QLoggingCategory<~.QLoggingCategory>` . A quick way to enable all
+`QtBluetooth`_ logging is to add the following line to the ``main()``
+function::
+
+ QLoggingCategory.setFilterRules("qt.bluetooth* = true")
+
+
+.. _QtBluetooth: https://doc.qt.io/qt-6/qtbluetooth-module.html
diff --git a/sources/pyside6/doc/extras/QtCharts.rst b/sources/pyside6/doc/extras/QtCharts.rst
new file mode 100644
index 000000000..8f2d768bf
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtCharts.rst
@@ -0,0 +1,21 @@
+The Qt Charts module provides a set of easy-to-use chart components. It uses
+the Qt Graphics View Framework to integrate charts with modern user interfaces.
+Qt Charts can be used as QWidgets,
+:class:`QGraphicsWidget<PySide6.QtWidgets.QGraphicsWidget>` , or QML types.
+Users can easily create impressive charts by selecting one of the themes.
+
+Getting Started
+^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+ ::
+
+ from PySide6 import QtCharts
+
+The module also provides `QML types <https://doc.qt.io/qt-6/qtcharts-qmlmodule.html>`_ .
+
+.. note:: An instance of QApplication is required for the QML types as the
+ module depends on Qt's \l{Graphics View Framework} for rendering.
+ QGuiApplication is not sufficient.
diff --git a/sources/pyside6/doc/extras/QtConcurrent.rst b/sources/pyside6/doc/extras/QtConcurrent.rst
new file mode 100644
index 000000000..33c5b3bfb
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtConcurrent.rst
@@ -0,0 +1,37 @@
+The Qt Concurrent module contains functionality to support concurrent execution
+of program code.
+
+The Qt Concurrent module provides high-level APIs that make it possible to
+write multi-threaded programs without using low-level threading primitives such
+as mutexes, read-write locks, wait conditions, or semaphores. Programs written
+with Qt Concurrent automatically adjust the number of threads used according to
+the number of processor cores available. This means that applications written
+today will continue to scale when deployed on multi-core systems in the future.
+
+Qt Concurrent includes functional programming style APIs for parallel list
+processing, including a MapReduce and FilterReduce implementation for
+shared-memory (non-distributed) systems, and classes for managing asynchronous
+computations in GUI applications:
+
+ * :class:`QFuture<PySide6.QtCore.QFuture>` represents the result of an
+ asynchronous computation.
+ * :class:`QFutureIterator<~.QFutureIterator>` allows iterating through results
+ available via :class:`QFuture<PySide6.QtCore.QFuture>` .
+ * :class:`QFutureWatcher<PySide6.QtCore.QFutureWatcher>` allows monitoring a
+ :class:`QFuture<PySide6.QtCore.QFuture>` using signals-and-slots.
+ * :class:`QFutureSynchronizer<~.QFutureSynchronizer>` is a convenience class
+ that automatically synchronizes several QFutures.
+ * :class:`QPromise<~.QPromise>` provides a way to report progress and results
+ of the asynchronous computation to :class:`QFuture<PySide6.QtCore.QFuture>` .
+ Allows suspending or canceling the task when requested by
+ :class:`QFuture<PySide6.QtCore.QFuture>` .
+
+Using the Module
+^^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtConcurrent
diff --git a/sources/pyside6/doc/extras/QtCore.ClassInfo.rst b/sources/pyside6/doc/extras/QtCore.ClassInfo.rst
index b767ae153..75445e1fc 100644
--- a/sources/pyside6/doc/extras/QtCore.ClassInfo.rst
+++ b/sources/pyside6/doc/extras/QtCore.ClassInfo.rst
@@ -1,23 +1,34 @@
.. currentmodule:: PySide6.QtCore
-.. _ClassInfo:
+.. py:decorator:: ClassInfo
-ClassInfo
-*********
-
-This class is used to associates extra information to the class, which is available
-using QObject.metaObject(). Qt and PySide doesn't use this information.
+This decorator is used to associate extra information to the class, which is available
+using ``QObject.metaObject()``. This information is used by the
+*Qt D-Bus* and *Qt Qml* modules.
The extra information takes the form of a dictionary with key and value in a literal string.
-.. note:: This Class is a implementation of Q_CLASSINFO macro.
-
+The recommended usage is to provide the key/value using python keyword syntax, where the
+keyword becomes the key, and the provided string becomes the value.
+
+If the key needs to contain special characters (spaces, commas, '::', start with a number, etc),
+it is also possible to pass a python dictionary with arbitrary strings for both the key and
+value and enabling special characters in the key.
+
+.. note:: This decorator is a implementation of the Q_CLASSINFO macro.
+
Example
-------
-::
+.. code-block:: python
+ # Recommended syntax
@ClassInfo(Author='PySide Team', URL='http://www.pyside.org')
class MyObject(QObject):
...
+
+ # Provided to support keys not supported by Python's keyword syntax
+ @ClassInfo({'Some key text $': 'This syntax supports special characters in keys'})
+ class MyObject(QObject):
+ ...
diff --git a/sources/pyside6/doc/extras/QtCore.Property.rst b/sources/pyside6/doc/extras/QtCore.Property.rst
index 5eb299f67..9ed7de427 100644
--- a/sources/pyside6/doc/extras/QtCore.Property.rst
+++ b/sources/pyside6/doc/extras/QtCore.Property.rst
@@ -1,8 +1,5 @@
.. currentmodule:: PySide6.QtCore
-.. _Property:
-
-Property
-********
+.. py:class:: Property
Detailed Description
--------------------
@@ -16,7 +13,7 @@ They are equivalent to the ``Q_PROPERTY`` macro in the `Qt Docs`_.
Here is an example that illustrates how to use this
function:
-.. code-block::
+.. code-block:: python
:linenos:
from PySide6.QtCore import QObject, Property
@@ -40,17 +37,20 @@ function:
The full options for ``QtCore.Property`` can be found with ``QtCore.Property.__doc__``:
-.. code-block::
-
- Property(self, type: type,
- fget: Optional[Callable] = None,
- fset: Optional[Callable] = None,
- freset: Optional[Callable] = None,
- fdel: Optional[Callable] = None,
- doc: str = '', notify: Optional[Callable] = None,
- designable: bool = True, scriptable: bool = True,
- stored: bool = True, user: bool = False,
- constant: bool = False, final: bool = False) -> PySide6.QtCore.Property
+.. code-block:: python
+
+ Property(self, type: type,
+ fget: Optional[Callable] = None,
+ fset: Optional[Callable] = None,
+ freset: Optional[Callable] = None,
+ fdel: Optional[Callable] = None,
+ doc: str = '',
+ notify: Optional[Callable] = None,
+ designable: bool = True,
+ scriptable: bool = True,
+ stored: bool = True, user: bool = False,
+ constant: bool = False,
+ final: bool = False) -> PySide6.QtCore.Property
Normally, only ``type``, ``fget``and ``fset`` are used.
@@ -65,16 +65,16 @@ requires a ``type`` parameter.
In the above example, the following lines would be equivalent properties:
-.. code-block::
+.. code-block:: python
- pp = QtCore.Property(int, readPP, setPP) # PySide version
- pp = property(readPP, setPP) # Python version
+ pp = QtCore.Property(int, readPP, setPP) # PySide version
+ pp = property(readPP, setPP) # Python version
As you know from the `Python Docs`_, ``Python`` allows to break the property
creation into multiple steps, using the decorator syntax. We can do this in
``PySide`` as well:
-.. code-block::
+.. code-block:: python
:linenos:
from PySide6.QtCore import QObject, Property
@@ -107,12 +107,15 @@ If you are using properties of your objects in QML expressions,
QML requires that the property changes are notified. Here is an
example illustrating how to do this:
-.. code-block::
+.. code-block:: python
:linenos:
from PySide6.QtCore import QObject, Signal, Property
class Person(QObject):
+
+ name_changed = Signal()
+
def __init__(self, name):
QObject.__init__(self)
self._person_name = name
@@ -120,10 +123,6 @@ example illustrating how to do this:
def _name(self):
return self._person_name
- @Signal
- def name_changed(self):
- pass
-
name = Property(str, _name, notify=name_changed)
.. _`Python Docs`: https://docs.python.org/3/library/functions.html?highlight=property#property
diff --git a/sources/pyside6/doc/extras/QtCore.QEnum.rst b/sources/pyside6/doc/extras/QtCore.QEnum.rst
index d33134264..7ea35d8af 100644
--- a/sources/pyside6/doc/extras/QtCore.QEnum.rst
+++ b/sources/pyside6/doc/extras/QtCore.QEnum.rst
@@ -1,23 +1,19 @@
.. currentmodule:: PySide6.QtCore
-.. _QEnum:
-
-QEnum/QFlag
-***********
-
-This class decorator is equivalent to the `Q_ENUM` macro from Qt.
-The decorator is used to register an Enum to the meta-object system,
-which is available via `QObject.staticMetaObject`.
-The enumerator must be in a QObject derived class to be registered.
+.. py:decorator:: QEnum
+This class decorator is equivalent to the `Q_ENUM` macro from Qt. The decorator
+is used to register a Python Enum derived class to the meta-object system,
+which is available via `QObject.staticMetaObject`. The enumerator must be in a
+QObject derived class to be registered.
Example
-------
::
- from enum import Enum, Flag, auto
+ from enum import Enum, auto
- from PySide6.QtCore import QEnum, QFlag, QObject
+ from PySide6.QtCore import QEnum, QObject
class Demo(QObject):
@@ -25,68 +21,7 @@ Example
class Orientation(Enum):
North, East, South, West = range(4)
- class Color(Flag):
- RED = auto()
- BLUE = auto()
- GREEN = auto()
- WHITE = RED | BLUE | GREEN
-
- QFlag(Color) # identical to @QFlag usage
-
-
-Caution:
---------
-
-QEnum registers a Python Enum derived class.
-QFlag treats a variation of the Python Enum, the Flag class.
-
-Please do not confuse that with the Qt QFlags concept. Python does
-not use that concept, it has its own class hierarchy, instead.
-For more details, see the `Python enum documentation <https://docs.python.org/3/library/enum.html>`_.
-
-
-Details about Qt Flags:
------------------------
-
-There are some small differences between Qt flags and Python flags.
-In Qt, we have for instance these declarations:
-
-::
-
- enum QtGui::RenderHint { Antialiasing, TextAntialiasing, SmoothPixmapTransform,
- HighQualityAntialiasing, NonCosmeticDefaultPen }
- flags QtGui::RenderHints
-
-The equivalent Python notation would look like this:
-
-::
-
- @QFlag
- class RenderHints(enum.Flag)
- Antialiasing = auto()
- TextAntialiasing = auto()
- SmoothPixmapTransform = auto()
- HighQualityAntialiasing = auto()
- NonCosmeticDefaultPen = auto()
-
-
-As another example, the Qt::AlignmentFlag flag has 'AlignmentFlag' as the enum
-name, but 'Alignment' as the type name. Non flag enums have the same type and
-enum names.
-
-::
-
- enum Qt::AlignmentFlag
- flags Qt::Alignment
-
-The Python way to specify this would be
-
-::
-
- @QFlag
- class Alignment(enum.Flag):
- ...
-
-We are considering to map all builtin enums and flags to Python enums as well
-in a later release.
+See :deco:`QFlag` for registering Python Flag derived classes.
+Meanwhile all enums and flags have been converted to Python Enums
+(default since ``PySide 6.4``), see the :ref:`NewEnumSystem` section.
diff --git a/sources/pyside6/doc/extras/QtCore.QFlag.rst b/sources/pyside6/doc/extras/QtCore.QFlag.rst
new file mode 100644
index 000000000..dd4f02800
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtCore.QFlag.rst
@@ -0,0 +1,74 @@
+.. currentmodule:: PySide6.QtCore
+.. py:decorator:: QFlag
+
+QFlag handles a variation of the Python Enum, the Flag class.
+
+Please do not confuse that with the Qt QFlags concept. Python does
+not use that concept, it has its own class hierarchy, instead.
+For more details, see the `Python enum documentation <https://docs.python.org/3/library/enum.html>`_.
+
+Example
+-------
+
+::
+
+ from enum import Flag, auto
+
+ from PySide6.QtCore import QFlag, QObject
+
+ class Demo(QObject):
+
+ @QFlag
+ class Color(Flag):
+ RED = auto()
+ BLUE = auto()
+ GREEN = auto()
+ WHITE = RED | BLUE | GREEN
+
+
+Details about Qt Flags:
+-----------------------
+
+There are some small differences between Qt flags and Python flags.
+In Qt, we have for instance these declarations:
+
+::
+
+ enum QtGui::RenderHint { Antialiasing, TextAntialiasing, SmoothPixmapTransform,
+ HighQualityAntialiasing, NonCosmeticDefaultPen }
+ flags QtGui::RenderHints
+
+The equivalent Python notation would look like this:
+
+::
+
+ @QFlag
+ class RenderHints(enum.Flag)
+ Antialiasing = auto()
+ TextAntialiasing = auto()
+ SmoothPixmapTransform = auto()
+ HighQualityAntialiasing = auto()
+ NonCosmeticDefaultPen = auto()
+
+
+As another example, the Qt::AlignmentFlag flag has 'AlignmentFlag' as the enum
+name, but 'Alignment' as the type name. Non flag enums have the same type and
+enum names.
+
+::
+
+ enum Qt::AlignmentFlag
+ flags Qt::Alignment
+
+The Python way to specify this would be
+
+::
+
+ @QFlag
+ class Alignment(enum.Flag):
+ ...
+
+See :deco:`QEnum` for registering Python Enum derived classes.
+
+Meanwhile all enums and flags have been converted to Python Enums
+(default since ``PySide 6.4``), see the :ref:`NewEnumSystem` section.
diff --git a/sources/pyside6/doc/extras/QtCore.Signal.rst b/sources/pyside6/doc/extras/QtCore.Signal.rst
index 60c611482..c83a76a83 100644
--- a/sources/pyside6/doc/extras/QtCore.Signal.rst
+++ b/sources/pyside6/doc/extras/QtCore.Signal.rst
@@ -1,8 +1,5 @@
.. currentmodule:: PySide6.QtCore
-.. _Signal:
-
-Signal
-******
+.. py:class:: Signal
Synopsis
--------
@@ -10,30 +7,52 @@ Synopsis
Functions
^^^^^^^^^
-+---------------------------------------------------------------------------------------------+
-|def :meth:`connect<Signal.connect>` (receiver) |
-+---------------------------------------------------------------------------------------------+
-|def :meth:`disconnect<Signal.disconnect>` (receiver) |
-+---------------------------------------------------------------------------------------------+
-|def :meth:`emit<Signal.disconnect>` (\*args) |
-+---------------------------------------------------------------------------------------------+
++-----------------------------------------------------+
+|def :meth:`connect<Signal.connect>` (receiver) |
++-----------------------------------------------------+
+|def :meth:`disconnect<Signal.disconnect>` (receiver) |
++-----------------------------------------------------+
+|def :meth:`emit<Signal.disconnect>` (\*args) |
++-----------------------------------------------------+
Detailed Description
--------------------
- The :class:`~.Signal` class provides a way to declare and connect Qt signals in a pythonic way.
+The :class:`~.Signal` class provides a way to declare and connect Qt
+signals in a pythonic way.
+
+.. class:: PySide6.QtCore.Signal([type1 [, type2...]] [, name="" [, arguments=[]]])
+
+ :param name: str
+ :param arguments: list
+
+``Signal`` takes a list of Python types of the arguments.
+
+ It is possible to use the same signal name with different types by
+ passing a list of tuples representing the signatures, but this is a legacy
+ technique recommended against in new code (see
+ :ref:`overloading-signals-and-slots`).
+
+The optional named argument ``name`` defines the signal name. If nothing is
+passed, the new signal will have the same name as the variable that it is
+being assigned to.
- PySide adopt PyQt's new signal and slot syntax as-is. The PySide implementation is functionally compatible with the PyQt 4.5 one, with the exceptions listed bellow.
+The optional named argument ``arguments`` receives a list of strings
+denoting the argument names. This is useful for QML applications which
+may refer to the emitted values by name.
.. method:: Signal.connect(receiver[, type=Qt.AutoConnection])
- Create a connection between this signal and a `receiver`, the `receiver` can be a Python callable, a :class:`Slot` or a :class:`Signal`.
+ Create a connection between this signal and a `receiver`, the `receiver`
+ can be a Python callable, a :class:`Slot` or a :class:`Signal`.
.. method:: Signal.disconnect(receiver)
- Disconnect this signal from a `receiver`, the `receiver` can be a Python callable, a :class:`Slot` or a :class:`Signal`.
+ Disconnect this signal from a `receiver`, the `receiver` can be a Python
+ callable, a :class:`Slot` or a :class:`Signal`.
.. method:: Signal.emit(*args)
`args` is the arguments to pass to any connected slots, if any.
+.. seealso:: :ref:`signals-and-slots`
diff --git a/sources/pyside6/doc/extras/QtCore.Slot.rst b/sources/pyside6/doc/extras/QtCore.Slot.rst
index 268cfa4ad..98a1d465b 100644
--- a/sources/pyside6/doc/extras/QtCore.Slot.rst
+++ b/sources/pyside6/doc/extras/QtCore.Slot.rst
@@ -1,39 +1,42 @@
.. currentmodule:: PySide6.QtCore
-.. _Slot:
+.. py:decorator:: Slot([type1 [, type2...]] [, name="" [, result=None, [tag=""]]])
-Slot
-****
+ :param name: str
+ :param result: type
+ :param tag: str
-Detailed Description
---------------------
+``Slot`` takes a list of Python types of the arguments.
- PySide6 adopt PyQt's new signal and slot syntax as-is. The PySide6
- implementation is functionally compatible with the PyQt one, with the
- exceptions listed below.
+The optional named argument ``name`` defines the slot name. If nothing is
+passed, the slot name will be the decorated function name.
- PyQt's new signal and slot style utilizes method and decorator names
- specific to their implementation. These will be generalized according to
- the table below:
+The optional named argument ``result`` specifies the return type.
- ======= ======================= =============
- Module PyQt factory function PySide class
- ======= ======================= =============
- QtCore pyqtSignal Signal
- QtCore pyqtSlot Slot
- ======= ======================= =============
+The optional named argument ``tag`` specifies a value to be returned
+by ``QMetaMethod.tag()``.
+
+This implementation is functionally compatible with the PyQt one.
+
+======= =========== ======
+Module PyQt PySide
+======= =========== ======
+QtCore pyqtSignal Signal
+QtCore pyqtSlot Slot
+======= =========== ======
+
+.. seealso:: :ref:`signals-and-slots`
Q_INVOKABLE
-----------
- There is no equivalent of the Q_INVOKABLE macro of Qt
- since PySide6 slots can actually have return values.
- If you need to create a invokable method that returns some value,
- declare it as a slot, e.g.:
-
- ::
+There is no equivalent of the Q_INVOKABLE macro of Qt
+since PySide6 slots can actually have return values.
+If you need to create a invokable method that returns some value,
+declare it as a slot, e.g.:
- class Foo(QObject):
+::
- @Slot(float, result=int)
- def getFloatReturnInt(self, f):
- return int(f)
+ class Foo(QObject):
+ @Slot(float, result=int)
+ def getFloatReturnInt(self, f):
+ return int(f)
diff --git a/sources/pyside6/doc/extras/QtCore.rst b/sources/pyside6/doc/extras/QtCore.rst
index 694fb84e9..ac72bc487 100644
--- a/sources/pyside6/doc/extras/QtCore.rst
+++ b/sources/pyside6/doc/extras/QtCore.rst
@@ -1,5 +1,61 @@
-All other Qt modules rely on this module. To include the definitions of the module's classes, use the following directive:
+The Qt Core module is part of Qt's essential modules.
+
+The Qt Core module adds these features to C++:
+
+ * a very powerful mechanism for seamless object communication called signals and slots
+ * queryable and designable object properties
+ * hierarchical and queryable object trees
+
+The following pages provide more information about Qt's core features:
+
+ * :ref:`The Meta-Object System<The-Meta-Object-System>`
+ * :ref:`The Property System<The-Property-System>`
+ * :ref:`Object Model<Object-Model>`
+ * :ref:`Object Trees & Ownership<Object-Trees---Ownership>`
+ * :ref:`Signals & Slots<Signals---Slots>`
+
+Using the Module
+^^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
::
import PySide6.QtCore
+
+Threading and Concurrent Programming
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Qt provides thread support in the form of platform-independent
+threading classes, a thread-safe way of posting events, and
+signal-slot connections across threads. Multithreaded programming is
+also a useful paradigm for performing time-consuming operations
+without freezing the user interface of an application.
+
+The Thread Support in Qt page contains information on implementing
+threads in applications. Additional concurrent classes are provided by
+the :ref:`Qt Concurrent<Qt-Concurrent>` module.
+
+Input/Output and Resources
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Qt provides a resource system for organizing application files and
+assets, a set of containers, and classes for receiving input and
+printing output.
+
+ * :ref:`Serializing Qt Data Types<Serializing-Qt-Data-Types>`
+
+In addition, Qt Core provides a platform-independent mechanism for
+storing binary files in the application's executable.
+
+ * :ref:`The Qt Resource System<using_qrc_files>`
+
+Additional Frameworks
+^^^^^^^^^^^^^^^^^^^^^
+
+Qt Core also provides some of Qt's key frameworks.
+
+ * :ref:`The Animation Framework<The-Animation-Framework>`
+ * `JSON Support in Qt <https://doc.qt.io/qt-6/json.html>`_
+ * :ref:`The Event System<The-Event-System>`
diff --git a/sources/pyside6/doc/extras/QtDBus.rst b/sources/pyside6/doc/extras/QtDBus.rst
new file mode 100644
index 000000000..3b9cd775a
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtDBus.rst
@@ -0,0 +1,193 @@
+An introduction to Inter-Process Communication and Remote Procedure
+Calling with D-Bus.
+
+Introduction
+^^^^^^^^^^^^
+
+D-Bus is an Inter-Process Communication (IPC) and Remote Procedure
+Calling (RPC) mechanism originally developed for Linux to replace
+existing and competing IPC solutions with one unified protocol. It has
+also been designed to allow communication between system-level
+processes (such as printer and hardware driver services) and normal
+user processes.
+
+It uses a fast, binary message-passing protocol, which is suitable for
+same-machine communication due to its low latency and low overhead.
+Its specification is currently defined by the ``freedesktop.org``
+project, and is available to all parties.
+
+Communication in general happens through a central server application,
+called the "bus" (hence the name), but direct
+application-to-application communication is also possible. When
+communicating on a bus, applications can query which other
+applications and services are available, as well as activate one on
+demand.
+
+The Buses
+^^^^^^^^^
+
+D-Bus buses are used when many-to-many communication is desired. In
+order to achieve that, a central server is launched before any
+applications can connect to the bus: this server is responsible for
+keeping track of the applications that are connected and for properly
+routing messages from their source to their destination.
+
+In addition, D-Bus defines two well-known buses, called the system bus
+and the session bus. These buses are special in the sense that they
+have well-defined semantics: some services are defined to be found in
+one or both of these buses.
+
+For example, an application wishing to query the list of hardware
+devices attached to the computer will probably communicate to a
+service available on the system bus, while the service providing
+opening of the user's web browser will probably be found on the
+session bus.
+
+On the system bus, one can also expect to find restrictions on what
+services each application is allowed to offer. Therefore, one can be
+reasonably certain that, if a certain service is present, it is being
+offered by a trusted application.
+
+Messages
+^^^^^^^^
+
+On the low level, applications communicate over D-Bus by sending
+messages to one another. Messages are used to relay the remote
+procedure calls as well as the replies and errors associated with
+them. When used over a bus, messages have a destination, which means
+they are routed only to the interested parties, avoiding congestion
+due to "swarming" or broadcasting.
+
+A special kind of message called a "signal message" (a concept based
+on Qt's :ref:`Signals and Slots<Signals---Slots>` mechanism), however,
+does not have a pre-defined destination. Since its purpose is to be
+used in a one-to-many context, signal messages are designed to work
+over an "opt-in" mechanism.
+
+The Qt D-Bus module fully encapsulates the low-level concept of
+messages into a simpler, object-oriented approach familiar to Qt
+developers. In most cases, the developer need not worry about sending
+or receiving messages.
+
+Service Names
+^^^^^^^^^^^^^
+
+When communicating over a bus, applications obtain what is called a
+"service name": it is how that application chooses to be known by
+other applications on the same bus. The service names are brokered by
+the D-Bus bus daemon and are used to route messages from one
+application to another. An analogous concept to service names are IP
+addresses and hostnames: a computer normally has one IP address and
+may have one or more hostnames associated with it, according to the
+services that it provides to the network.
+
+On the other hand, if a bus is not used, service names are also not
+used. If we compare this to a computer network again, this would
+equate to a point-to-point network: since the peer is known, there is
+no need to use hostnames to find it or its IP address.
+
+The format of a D-Bus service name is in fact very similar to a host
+name: it is a dot-separated sequence of letters and digits. The common
+practice is even to name one's service name according to the domain
+name of the organization that defined that service.
+
+For example, the D-Bus service is defined by ``freedesktop.org`` and
+can be found on the bus under the service name:
+
+ ::
+
+ org.freedesktop.DBus
+
+Object Paths
+^^^^^^^^^^^^
+
+Like network hosts, applications provide specific services to other
+applications by exporting objects. Those objects are hierarchically
+organized, much like the parent-child relationship that classes
+derived from :class:`QObject<PySide6.QtCore.QObject>` possess. One
+difference, however, is that there is the concept of "root object",
+which all objects have as the ultimate parent.
+
+If we continue our analogy with Web services, object paths equate to
+the path part of a URL.
+
+Like them, object paths in D-Bus are formed resembling path names on
+the filesystem: they are slash-separated labels, each consisting of
+letters, digits and the underscore character ("\_"). They must always
+start with a slash and must not end with one.
+
+Interfaces
+^^^^^^^^^^
+
+Interfaces are similar to C++ abstract classes and Java's
+``interface`` keyword and declare the "contract" that is established
+between caller and callee. That is, they establish the names of the
+methods, signals, and properties that are available as well as the
+behavior that is expected from either side when communication is
+established.
+
+Qt uses a very similar mechanism in its Plugin system: Base classes in
+C++ are associated with a unique identifier by way of the
+:meth:`Q\_DECLARE\_INTERFACE()<~QtDBus.Q_DECLARE_INTERFACE>` macro.
+
+D-Bus interface names are, in fact, named in a manner similar to what
+is suggested by the Qt Plugin System: an identifier usually
+constructed from the domain name of the entity that defined that
+interface.
+
+Cheat Sheet
+^^^^^^^^^^^
+
+To facilitate remembering of the naming formats and their purposes,
+the following table can be used:
+
+ +-------------+------------------+---------------------------------------+
+ |D-Bus Concept|Analogy |Name format |
+ +-------------+------------------+---------------------------------------+
+ |Service name |Network hostnames |Dot-separated ("looks like a hostname")|
+ +-------------+------------------+---------------------------------------+
+ |Object path |URL path component|Slash-separated ("looks like a path") |
+ +-------------+------------------+---------------------------------------+
+ |Interface |Plugin identifier |Dot-separated |
+ +-------------+------------------+---------------------------------------+
+
+Debugging
+^^^^^^^^^
+
+When developing applications that use D-Bus, it is sometimes useful to
+be able to see information about the messages that are sent and
+received across the bus by each application.
+
+This feature can be enabled on a per-application basis by setting the
+``QDBUS_DEBUG`` environment variable before running each application.
+For example, we can enable debugging only for the car in the
+:ref:`D-Bus Remote Controlled Car
+Example<D-Bus-Remote-Controlled-Car-Example>` by running the
+controller and the car in the following way:
+
+ ::
+
+ QDBUS_DEBUG=1 python examples/dbus/pingpong/pong.py
+
+Information about the messages will be written to the console the
+application was launched from.
+
+Using the Module
+^^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtDBus
+
+Further Reading
+^^^^^^^^^^^^^^^
+
+The following documents contain information about Qt's D-Bus integration features, and provide details about the mechanisms used to send and receive type information over the bus:
+
+ * `Using Qt D-Bus Adaptors <https://doc.qt.io/qt-6/usingadaptors.html>`_
+ * `The Qt D-Bus Type System <https://doc.qt.io/qt-6/qdbustypesystem.html>`_
+ * `Qt D-Bus XML compiler (qdbusxml2cpp) <https://doc.qt.io/qt-6/qdbusxml2cpp.html>`_
+ * `D-Bus Viewer <https://doc.qt.io/qt-6/qdbusviewer.html>`_
diff --git a/sources/pyside6/doc/extras/QtDataVisualization.rst b/sources/pyside6/doc/extras/QtDataVisualization.rst
new file mode 100644
index 000000000..66e2d9523
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtDataVisualization.rst
@@ -0,0 +1,30 @@
+Provides functionality for 3D visualization.
+
+The Qt Data Visualization module enables you to visualize data in 3D as bar,
+scatter, and surface graphs. It's especially useful for visualizing depth maps
+and large quantities of rapidly changing data, such as data received from
+multiple sensors. The look and feel of graphs can be customized by using themes
+or by adding custom items and labels.
+
+Qt Data Visualization is built on Qt 6 and OpenGL to take advantage of hardware
+acceleration and Qt Quick 2.
+
+Using the Module
+^^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtDataVisualization
+
+The module also provides `QML types <https://doc.qt.io/qt-6/qtdatavisualization-qmlmodule.html>`_ .
+
+Articles and Guides
+^^^^^^^^^^^^^^^^^^^
+
+ * :ref:`Overview<Qt-Data-Visualization-Overview>`
+ * :ref:`Data Handling<Qt-Data-Visualization-Data-Handling>`
+ * :ref:`Interacting with Data<Qt-Data-Visualization-Interacting-with-Data>`
+ * :ref:`Known Issues<Qt-Data-Visualization-Known-Issues>`
diff --git a/sources/pyside6/doc/extras/QtDesigner.QPyDesignerContainerExtension.rst b/sources/pyside6/doc/extras/QtDesigner.QPyDesignerContainerExtension.rst
index 1baa9e369..a3e5ef511 100644
--- a/sources/pyside6/doc/extras/QtDesigner.QPyDesignerContainerExtension.rst
+++ b/sources/pyside6/doc/extras/QtDesigner.QPyDesignerContainerExtension.rst
@@ -1,10 +1,9 @@
.. currentmodule:: PySide6.QtDesigner
-.. _QPyDesignerContainerExtension:
-
-QPyDesignerContainerExtension
-*****************************
+.. py:class:: QPyDesignerContainerExtension
QPyDesignerContainerExtension is the base class for implementing
-`QDesignerContainerExtension <https://doc.qt.io/qt-6/qdesignercontainerextension.html>`_
-for a Qt Designer custom widget plugin in Python.
+`QDesignerContainerExtension class`_
+for a *Qt Widgets Designer* custom widget plugin in Python.
It provides the required inheritance from **QObject**.
+
+.. _QDesignerContainerExtension class: https://doc.qt.io/qt-6/qdesignercontainerextension.html
diff --git a/sources/pyside6/doc/extras/QtDesigner.QPyDesignerCustomWidgetCollection.rst b/sources/pyside6/doc/extras/QtDesigner.QPyDesignerCustomWidgetCollection.rst
index 00260860b..615ca4eec 100644
--- a/sources/pyside6/doc/extras/QtDesigner.QPyDesignerCustomWidgetCollection.rst
+++ b/sources/pyside6/doc/extras/QtDesigner.QPyDesignerCustomWidgetCollection.rst
@@ -1,8 +1,5 @@
.. currentmodule:: PySide6.QtDesigner
-.. _QPyDesignerCustomWidgetCollection:
-
-QPyDesignerCustomWidgetCollection
-*********************************
+.. py:class:: QPyDesignerCustomWidgetCollection
Synopsis
--------
@@ -19,20 +16,21 @@ Functions
Detailed Description
--------------------
- The :class:`~.QPyDesignerCustomWidgetCollection` implements
- `QDesignerCustomWidgetCollectionInterface <https://doc.qt.io/qt-6/qdesignercustomwidgetcollectioninterface.html>`_
- and provides static helper functions for registering custom widgets by
- type or by implementing
- `QDesignerCustomWidgetInterface <https://doc.qt.io/qt-6/qdesignercustomwidgetinterface.html>`_ .
+The :class:`~.QPyDesignerCustomWidgetCollection` implements
+`QDesignerCustomWidgetCollectionInterface <https://doc.qt.io/qt-6/qdesignercustomwidgetcollectioninterface.html>`_
+and provides static helper functions for registering custom widgets by
+type or by implementing
+`QDesignerCustomWidgetInterface`_ .
- The usage is explained in :ref:`designer_custom_widgets`.
+The usage is explained in :ref:`designer_custom_widgets`.
.. py:staticmethod:: QPyDesignerCustomWidgetCollection.registerCustomWidget(type[, xml=""[, tool_tip=""[, icon=""[, group=""[container=False]]]]])
- Registers an instance of a Python-implemented QWidget by type with Qt Designer.
+ Registers an instance of a Python-implemented QWidget by type with
+ *Qt Widgets Designer*.
The optional keyword arguments correspond to the getters of
- `QDesignerCustomWidgetInterface <https://doc.qt.io/qt-6/qdesignercustomwidgetinterface.html>`_ :
+ `QDesignerCustomWidgetInterface`_ :
:param str xml: A snippet of XML code in ``.ui`` format that specifies how the widget is created and sets initial property values.
:param str tool_tip: Tool tip to be shown in the widget box.
@@ -46,7 +44,9 @@ Detailed Description
.. py:staticmethod:: QPyDesignerCustomWidgetCollection.addCustomWidget(custom_widget)
Adds a custom widget (implementation of
- `QDesignerCustomWidgetInterface <https://doc.qt.io/qt-6/qdesignercustomwidgetinterface.html>`_)
- with Qt Designer.
+ `QDesignerCustomWidgetInterface`_)
+ with *Qt Widgets Designer*.
:param QDesignerCustomWidgetInterface custom_widget: Custom widget instance
+
+.. _QDesignerCustomWidgetInterface: https://doc.qt.io/qt-6/qdesignercustomwidgetinterface.html
diff --git a/sources/pyside6/doc/extras/QtDesigner.QPyDesignerMemberSheetExtension.rst b/sources/pyside6/doc/extras/QtDesigner.QPyDesignerMemberSheetExtension.rst
index c52aafdf5..ef2356221 100644
--- a/sources/pyside6/doc/extras/QtDesigner.QPyDesignerMemberSheetExtension.rst
+++ b/sources/pyside6/doc/extras/QtDesigner.QPyDesignerMemberSheetExtension.rst
@@ -1,10 +1,9 @@
.. currentmodule:: PySide6.QtDesigner
-.. _QPyDesignerMemberSheetExtension:
-
-QPyDesignerMemberSheetExtension
-*******************************
+.. py:class:: QPyDesignerMemberSheetExtension
QPyDesignerMemberSheetExtension is the base class for implementing
-`QDesignerMemberSheetExtension <https://doc.qt.io/qt-6/qdesignermembersheetextension.html>`_
-for a Qt Designer custom widget plugin in Python.
+`QDesignerMemberSheetExtension class`_
+for a *Qt Widgets Designer* custom widget plugin in Python.
It provides the required inheritance from **QObject**.
+
+.. _QDesignerMemberSheetExtension class: https://doc.qt.io/qt-6/qdesignermembersheetextension.html
diff --git a/sources/pyside6/doc/extras/QtDesigner.QPyDesignerTaskMenuExtension.rst b/sources/pyside6/doc/extras/QtDesigner.QPyDesignerTaskMenuExtension.rst
index 004c94693..e5e13122d 100644
--- a/sources/pyside6/doc/extras/QtDesigner.QPyDesignerTaskMenuExtension.rst
+++ b/sources/pyside6/doc/extras/QtDesigner.QPyDesignerTaskMenuExtension.rst
@@ -1,10 +1,9 @@
.. currentmodule:: PySide6.QtDesigner
-.. _QPyDesignerTaskMenuExtension:
-
-QPyDesignerTaskMenuExtension
-****************************
+.. py:class:: QPyDesignerTaskMenuExtension
QPyDesignerTaskMenuExtension is the base class for implementing
-`QDesignerTaskMenuExtension <https://doc.qt.io/qt-6/qdesignertaskmenuextension.html>`_
-for a Qt Designer custom widget plugin in Python.
+`QDesignerTaskMenuExtension class`_
+for a *Qt Widgets Designer* custom widget plugin in Python.
It provides the required inheritance from **QObject**.
+
+.. _QDesignerTaskMenuExtension class: https://doc.qt.io/qt-6/qdesignertaskmenuextension.html
diff --git a/sources/pyside6/doc/extras/QtDesigner.rst b/sources/pyside6/doc/extras/QtDesigner.rst
new file mode 100644
index 000000000..844f25b7b
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtDesigner.rst
@@ -0,0 +1,18 @@
+Provides classes to create your own custom widget plugins for
+*Qt Widgets Designer* and classes to access *Qt Widgets Designer*
+components.
+
+In addition, the :class:`QFormBuilder<PySide6.QtDesigner.QFormBuilder>` class
+provides the possibility of constructing user interfaces from UI files at
+run-time.
+
+
+Getting Started
+^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtDesigner
diff --git a/sources/pyside6/doc/extras/QtGui.rst b/sources/pyside6/doc/extras/QtGui.rst
index d55212bdf..8341ff453 100644
--- a/sources/pyside6/doc/extras/QtGui.rst
+++ b/sources/pyside6/doc/extras/QtGui.rst
@@ -1,7 +1,142 @@
-To include the definitions of modules classes, use the following directive:
+The Qt GUI module provides classes for windowing system integration,
+event handling, OpenGL and OpenGL ES integration, 2D graphics, basic
+imaging, fonts, and text. These classes are used internally by Qt's
+user interface technologies and can also be used directly, for
+instance to write applications using low-level OpenGL ES graphics
+APIs.
+
+For application developers writing user interfaces, Qt provides higher
+level APIs, like Qt Quick, that are much more suitable than the
+enablers found in the Qt GUI module.
+
+Application Windows
+^^^^^^^^^^^^^^^^^^^
+
+The most important classes in the Qt GUI module are
+:class:`QGuiApplication<PySide6.QtGui.QGuiApplication>` and
+:class:`QWindow<PySide6.QtGui.QWindow>` . A Qt application that wants
+to show content on screen will need to make use of these.
+:class:`QGuiApplication<PySide6.QtGui.QGuiApplication>` contains the
+main event loop, where all events from the window system and other
+sources are processed and dispatched. It also handles the
+application's initialization and finalization.
+
+The :class:`QWindow<PySide6.QtGui.QWindow>` class represents a window
+in the underlying windowing system. It provides a number of virtual
+functions to handle events ( :class:`QEvent<PySide6.QtCore.QEvent>` )
+from the windowing system, such as touch-input, exposure, focus, key
+strokes, and geometry changes.
+
+2D Graphics
+^^^^^^^^^^^
+
+The Qt GUI module contains classes for 2D graphics, imaging, fonts,
+and advanced typography.
+
+A :class:`QWindow<PySide6.QtGui.QWindow>` created with the surface
+type :attr:`RasterSurface<QSurface.SurfaceType>` can be used in
+combination with :class:`QBackingStore<PySide6.QtGui.QBackingStore>`
+and :class:`QPainter<PySide6.QtGui.QPainter>` , Qt's highly optimized
+2D vector graphics API. :class:`QPainter<PySide6.QtGui.QPainter>`
+supports drawing lines, polygons, vector paths, images, and text. For
+more information, see :ref:`Paint System<Paint-System>` and
+:ref:`Raster Window Example<Raster-Window-Example>` .
+
+Qt can load and save images using the
+:class:`QImage<PySide6.QtGui.QImage>` and
+:class:`QPixmap<PySide6.QtGui.QPixmap>` classes. By default, Qt
+supports the most common image formats including JPEG and PNG among
+others. Users can add support for additional formats via the
+:class:`QImageIOPlugin<~.QImageIOPlugin>` class. For more information,
+see :ref:`Reading and Writing Image
+Files<Reading-and-Writing-Image-Files>` .
+
+Typography in Qt is done with
+:class:`QTextDocument<PySide6.QtGui.QTextDocument>` , which uses the
+:class:`QPainter<PySide6.QtGui.QPainter>` API in combination with Qt's
+font classes, primarily :class:`QFont<PySide6.QtGui.QFont>` .
+Applications that prefer more low-level APIs to text and font handling
+can use classes like :class:`QRawFont<PySide6.QtGui.QRawFont>` and
+:class:`QGlyphRun<PySide6.QtGui.QGlyphRun>` .
+
+OpenGL and OpenGL ES Integration
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+:class:`QWindow<PySide6.QtGui.QWindow>` supports rendering using
+OpenGL and OpenGL ES, depending on what the platform supports. OpenGL
+rendering is enabled by setting the
+:class:`QWindow<PySide6.QtGui.QWindow>` 's surface type to
+:attr:`OpenGLSurface<QSurface.SurfaceType>` , choosing the format
+attributes with :class:`QSurfaceFormat<PySide6.QtGui.QSurfaceFormat>`
+, and then creating a
+:class:`QOpenGLContext<PySide6.QtGui.QOpenGLContext>` to manage the
+native OpenGL context. In addition, Qt has
+:class:`QOpenGLPaintDevice<PySide6.QtOpenGL.QOpenGLPaintDevice>` ,
+which enables the use of OpenGL accelerated
+:class:`QPainter<PySide6.QtGui.QPainter>` rendering, as well as
+convenience classes that simplify the writing of OpenGL code and hides
+the complexities of extension handling and the differences between
+OpenGL ES 2 and desktop OpenGL. The convenience classes include
+:class:`QOpenGLFunctions<PySide6.QtGui.QOpenGLFunctions>` that lets an
+application use all the OpenGL ES 2 functions on desktop OpenGL
+without having to manually resolve the OpenGL function pointers. This
+enables cross-platform development of applications targeting mobile or
+embedded devices, and provides classes that wrap native OpenGL
+functionality in a simpler Qt API.
+
+For more information, see the :ref:`OpenGL Window Example<OpenGL-Window-Example>` .
+
+The Qt GUI module also contains a few math classes to aid with the
+most common mathematical operations related to 3D graphics. These
+classes include :class:`QMatrix4x4<PySide6.QtGui.QMatrix4x4>` ,
+:class:`QVector4D<PySide6.QtGui.QVector4D>` , and
+:class:`QQuaternion<PySide6.QtGui.QQuaternion>` .
+
+A :class:`QWindow<PySide6.QtGui.QWindow>` created with the
+:attr:`OpenGLSurface<QSurface.SurfaceType>` can be used in combination
+with :class:`QPainter<PySide6.QtGui.QPainter>` and
+:class:`QOpenGLPaintDevice<PySide6.QtOpenGL.QOpenGLPaintDevice>` to
+have OpenGL hardware-accelerated 2D graphics by sacrificing some of
+the visual quality.
+
+Vulkan Integration
+^^^^^^^^^^^^^^^^^^
+
+Qt GUI has support for the `Vulkan <https://www.khronos.org/vulkan/>`_
+API. Qt applications require the presence of the `LunarG Vulkan SDK
+<https://www.lunarg.com/vulkan-sdk/>`_ .
+
+On Windows, the SDK sets the environment variable ``VULKAN_SDK``\,
+which will be detected by the ``configure`` script.
+
+On Android, Vulkan headers were added in API level 24 of the NDK.
+
+Relevant classes:
+
+* QVulkanDeviceFunctions
+ * :class:`QVulkanExtension<~.QVulkanExtension>`
+ * QVulkanFunctions
+ * :class:`QVulkanInfoVector<~.QVulkanInfoVector>`
+ * :class:`QVulkanInstance<~.QVulkanInstance>`
+ * :class:`QVulkanWindow<~.QVulkanWindow>`
+ * :class:`QVulkanWindowRenderer<~.QVulkanWindowRenderer>`
+
+For more information, see the
+:ref:`Hello Vulkan Widget Example<Hello-Vulkan-Widget-Example>` and the
+:ref:`Hello Vulkan Window Example<Hello-Vulkan-Window-Example>` .
+
+Drag and Drop
+^^^^^^^^^^^^^
+
+Qt GUI includes support for drag and drop. The
+:ref:`Drag and Drop<Drag-and-Drop>` overview has more information.
+
+Using the Module
+^^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
::
import PySide6.QtGui
-
-.. seealso:: :mod:`PySide6.QtCore`
diff --git a/sources/pyside6/doc/extras/QtHelp.rst b/sources/pyside6/doc/extras/QtHelp.rst
index 845d1f968..f6013486e 100644
--- a/sources/pyside6/doc/extras/QtHelp.rst
+++ b/sources/pyside6/doc/extras/QtHelp.rst
@@ -1,5 +1,19 @@
-To include the definitions of the module's classes, use the following directive:
+The QtHelp module provides classes for integrating online documentation
+in applications.
+
+Getting Started
+^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
::
import PySide6.QtHelp
+
+Articles and Guides
+^^^^^^^^^^^^^^^^^^^
+
+The classes and tools supplied with Qt to enable developers to include online
+help and documentation in their applications are described in more detail in
+:ref:`The Qt Help Framework<The-Qt-Help-Framework>` .
diff --git a/sources/pyside6/doc/extras/QtMultimedia.rst b/sources/pyside6/doc/extras/QtMultimedia.rst
index 9b6b702ce..527c2427b 100644
--- a/sources/pyside6/doc/extras/QtMultimedia.rst
+++ b/sources/pyside6/doc/extras/QtMultimedia.rst
@@ -1,7 +1,116 @@
-To include the definitions of the module's classes, use the following directive:
+ .. image:: images/noun_Media_166644.svg
+
+The Qt Multimedia module provides APIs for playing back and recording audiovisual content
+
+Qt Multimedia is an add-on module that provides a rich set of QML types and C++
+classes to handle multimedia content. It contains an easy to use API for
+playing back audio and video files and rendering those on screen, as well as a
+comprehensive API for recording audio and video from the systems cameras and
+microphones.
+
+The functionality of this module is divided into the following submodules:
+
+
+ +---------------------------------------------------+-----------------------------------------------+
+ |:ref:`Qt Multimedia<Multimedia-Overview>` |Provides API for multimedia-specific use cases.|
+ +---------------------------------------------------+-----------------------------------------------+
+ |:ref:`Qt Multimedia Widgets<Qt-Multimedia-Widgets>`|Provides the widget-based multimedia API. |
+ +---------------------------------------------------+-----------------------------------------------+
+
+Getting started
+^^^^^^^^^^^^^^^
+
+If you are porting from Qt 5 to Qt 6 see :ref:`Changes to Qt Multimedia<Changes-to-Qt-Multimedia>` .
+
+To include the definitions of modules classes, use the following
+directive:
::
import PySide6.QtMultimedia
+The module also provides QML `types <https://doc.qt.io/qt-6/qtmultimedia-qmlmodule.html>`_ .
+
+Overviews and Important Topics
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ * :ref:`Changes in Qt 6<Changes-to-Qt-Multimedia>`
+ * :ref:`Multimedia Overview<Multimedia-Overview>`
+ * :ref:`Audio Overview<Audio-Overview>`
+ * :ref:`Video Overview<Video-Overview>`
+ * :ref:`Camera Overview<Camera-Overview>`
+ * :ref:`Supported Media Formats<Video-Overview>`
+
+QML Types
+^^^^^^^^^
+
+The following table outlines some important QML types.
+
+ +------------------+---------------------------------------------------------------------+
+ |Type |Description |
+ +------------------+---------------------------------------------------------------------+
+ |`MediaPlayer`_ |Add audio/video playback functionality to a scene. |
+ +------------------+---------------------------------------------------------------------+
+ |`CaptureSession`_ |Create a session for capturing audio/video. |
+ +------------------+---------------------------------------------------------------------+
+ |`Camera`_ |Access a camera connected to the system. |
+ +------------------+---------------------------------------------------------------------+
+ |`AudioInput`_ |Access an audio input (microphone) connected to the system. |
+ +------------------+---------------------------------------------------------------------+
+ |`AudioOutput`_ |Access an audio output (speaker, headphone) connected to the system. |
+ +------------------+---------------------------------------------------------------------+
+ |`VideoOutput`_ |Display video content. |
+ +------------------+---------------------------------------------------------------------+
+ |`MediaRecorder`_ |Record audio/video from the `CaptureSession`_ . |
+ +------------------+---------------------------------------------------------------------+
+ |`ImageCapture`_ |Capture still images from the Camera. |
+ +------------------+---------------------------------------------------------------------+
+ |`Video`_ |Add Video playback functionality to a scene. Uses `MediaPlayer`_ and |
+ | |`VideoOutput`_ types to provide video playback functionality. |
+ +------------------+---------------------------------------------------------------------+
+
+.. _MediaPlayer: https://doc.qt.io/qt-6/qml-qtmultimedia-mediaplayer.html
+.. _CaptureSession: https://doc.qt.io/qt-6/qml-qtmultimedia-capturesession.html
+.. _Camera: https://doc.qt.io/qt-6/qml-qtmultimedia-camera.html
+.. _AudioInput: https://doc.qt.io/qt-6/qml-qtmultimedia-audioinput.html
+.. _AudioOutput: https://doc.qt.io/qt-6/qml-qtmultimedia-audiooutput.html
+.. _VideoOutput: https://doc.qt.io/qt-6/qml-qtmultimedia-videooutput.html
+.. _MediaRecorder: https://doc.qt.io/qt-6/qml-qtmultimedia-mediarecorder.html
+.. _ImageCapture: https://doc.qt.io/qt-6/qml-qtmultimedia-imagecapture.html
+.. _Video: https://doc.qt.io/qt-6/qml-qtmultimedia-video.html
+
+C++ Classes
+^^^^^^^^^^^
+
+The following table outlines some important C++ Classes
+
+ +------------------------------------------------------------------------+--------------------------------------------------------------------+
+ |Class |Description |
+ +------------------------------------------------------------------------+--------------------------------------------------------------------+
+ |:class:`QMediaPlayer<PySide6.QtMultimedia.QMediaPlayer>` |Playback media from a source. |
+ +------------------------------------------------------------------------+--------------------------------------------------------------------+
+ |:class:`QVideoWidget<PySide6.QtMultimediaWidgets.QVideoWidget>` |Display video from a media player or a capture session. |
+ +------------------------------------------------------------------------+--------------------------------------------------------------------+
+ |:class:`QMediaCaptureSession<PySide6.QtMultimedia.QMediaCaptureSession>`|Capture audio and video. |
+ +------------------------------------------------------------------------+--------------------------------------------------------------------+
+ |:class:`QCamera<PySide6.QtMultimedia.QCamera>` |Access a camera connected to the system |
+ +------------------------------------------------------------------------+--------------------------------------------------------------------+
+ |:class:`QAudioInput<PySide6.QtMultimedia.QAudioInput>` |Access an audio input (microphone) connected to the system. |
+ +------------------------------------------------------------------------+--------------------------------------------------------------------+
+ |:class:`QAudioOutput<PySide6.QtMultimedia.QAudioOutput>` |Access an audio output (speaker, headphone) connected to the system.|
+ +------------------------------------------------------------------------+--------------------------------------------------------------------+
+ |:class:`QImageCapture<PySide6.QtMultimedia.QImageCapture>` |Capture still images with a camera. |
+ +------------------------------------------------------------------------+--------------------------------------------------------------------+
+ |:class:`QMediaRecorder<PySide6.QtMultimedia.QMediaRecorder>` |Record media content from a capture session. |
+ +------------------------------------------------------------------------+--------------------------------------------------------------------+
+ |:class:`QVideoSink<PySide6.QtMultimedia.QVideoSink>` |Access and render individual video frames. |
+ +------------------------------------------------------------------------+--------------------------------------------------------------------+
+ |:class:`QAudioSink<PySide6.QtMultimedia.QAudioSink>` |Sends raw audio data to an audio output device. |
+ +------------------------------------------------------------------------+--------------------------------------------------------------------+
+For playback :class:`QMediaPlayer<PySide6.QtMultimedia.QMediaPlayer>` ,
+:class:`QAudioOutput<PySide6.QtMultimedia.QAudioOutput>` and QVideoOutput
+contain all the required functionality. The other classes are used for
+capturing audio and video content, where the
+:class:`QMediaCaptureSession<PySide6.QtMultimedia.QMediaCaptureSession>` is the
+central class managing the whole capture/recording process.
diff --git a/sources/pyside6/doc/extras/QtMultimediaWidgets.rst b/sources/pyside6/doc/extras/QtMultimediaWidgets.rst
new file mode 100644
index 000000000..510114907
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtMultimediaWidgets.rst
@@ -0,0 +1,15 @@
+An add-on module which provides multimedia-related widgets.
+
+Qt Multimedia Widgets provides additional multimedia-related widgets and
+controls. The classes expand the capabilities of the
+:ref:`Qt Multimedia<Qt-Multimedia>` and :ref:`Qt Widgets<Qt-Widgets>` modules.
+
+Getting Started
+^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtMultimediaWidgets
diff --git a/sources/pyside6/doc/extras/QtNetwork.rst b/sources/pyside6/doc/extras/QtNetwork.rst
index 070ab77f7..18d8b3db2 100644
--- a/sources/pyside6/doc/extras/QtNetwork.rst
+++ b/sources/pyside6/doc/extras/QtNetwork.rst
@@ -1,5 +1,30 @@
-To include the definitions of the module's classes, use the following directive:
+Provides networking capabilities
+
+The Qt Network module provides a set of APIs for programming applications that
+use TCP/IP. Operations such as requests, cookies, and sending data over HTTP
+are handled by various Python classes.
+
+Using the Module
+^^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
::
import PySide6.QtNetwork
+
+Articles and Guides
+^^^^^^^^^^^^^^^^^^^
+
+These articles contain information about Qt Network setup and about applications with networking capabilities.
+
+
+ * :ref:`Network Programming with Qt<Network-Programming-with-Qt>` - Programming applications
+ with networking capabilities
+ * :ref:`Secure Sockets Layer (SSL) Classes<Secure-Sockets-Layer--SSL--Classes>` - Classes
+ for secure communication over network sockets
+
+Also note shipping OpenSSL might cause
+`Import and Export Restrictions <https://doc.qt.io/qt-6/ssl.html#import-and-export-restrictions>`_
+to apply.
diff --git a/sources/pyside6/doc/extras/QtNetworkAuth.rst b/sources/pyside6/doc/extras/QtNetworkAuth.rst
new file mode 100644
index 000000000..1947d5ba4
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtNetworkAuth.rst
@@ -0,0 +1,37 @@
+Provides network authorization capabilities (OAuth).
+
+Qt Network Authorization provides a set of APIs that enable Qt applications to
+obtain limited access to online accounts and HTTP services without exposing
+users' passwords.
+
+Currently, the supported authorization protocol is `OAuth <https://oauth.net>`_
+, versions 1 and 2.
+
+Using the Module
+^^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtNetworkAuth
+
+Overview
+^^^^^^^^
+
+The goal of this module is to provide a way to handle different authentication
+methods present on the Internet.
+
+There are several authentication systems, including:
+
+ * `OAuth 1 <https://datatracker.ietf.org/doc/html/rfc5849>`_
+ * `OAuth 2 <https://datatracker.ietf.org/doc/html/rfc6749>`_
+ * `OpenID <http://openid.net>`_
+ * `OpenID Connect <http://openid.net/connect/>`_
+
+These systems allow the application developers to create applications which use
+external authentication servers provided by an *Authorization Server*\. Users
+of these services need not worry about passing their credentials to suspicious
+applications. Instead, the credentials are entered in a known and trusted web
+interface.
diff --git a/sources/pyside6/doc/extras/QtNfc.rst b/sources/pyside6/doc/extras/QtNfc.rst
new file mode 100644
index 000000000..9cd0181f0
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtNfc.rst
@@ -0,0 +1,31 @@
+Enables connectivity between NFC enabled devices.
+
+The NFC API provides connectivity between NFC enabled devices.
+
+Overview
+^^^^^^^^
+
+NFC is an extremely short-range (less than 20 centimeters) wireless technology
+and has a maximum transfer rate of 424 kbit/s. NFC is ideal for transferring
+small packets of data when two devices are touched together.
+
+The NFC API provides APIs for interacting with NFC Forum Tags and NFC Forum
+Devices, including target detection and loss, registering NDEF message
+handlers, reading and writing NDEF messages on NFC Forum Tags and sending tag
+specific commands.
+
+Using the Module
+^^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtNfc
+
+Guides
+^^^^^^
+
+ * `Qt NFC Overview <https://doc.qt.io/qt-6/qtnfc-overview.html>`_
+ * `Qt NFC on Android <https://doc.qt.io/qt-6/nfc-android.html>`_
diff --git a/sources/pyside6/doc/extras/QtOpenGL.rst b/sources/pyside6/doc/extras/QtOpenGL.rst
index 9979f9f03..aa699a7d7 100644
--- a/sources/pyside6/doc/extras/QtOpenGL.rst
+++ b/sources/pyside6/doc/extras/QtOpenGL.rst
@@ -1,14 +1,26 @@
-OpenGL is a standard API for rendering 3D graphics. OpenGL only deals with 3D rendering and provides little or no support for GUI programming issues. The user interface for an OpenGL application must be created with another toolkit, such as Motif on the X platform, Microsoft Foundation Classes (MFC) under Windows, or Qt on both platforms.
+OpenGL is a standard API for rendering 3D graphics. OpenGL only deals
+with 3D rendering and provides little or no support for GUI
+programming issues. The user interface for an OpenGL application must
+be created with another toolkit, such as XCB on the X platform,
+Microsoft Foundation Classes (MFC) under Windows, or Qt on both
+platforms.
.. note:: OpenGL is a trademark of Silicon Graphics, Inc. in the United States and other countries.
-The Qt OpenGL module makes it easy to use OpenGL in Qt applications. It provides an OpenGL widget class that can be used just like any other Qt widget, except that it opens an OpenGL display buffer where you can use the OpenGL API to render the contents.
-To include the definitions of the module's classes, use the following directive:
+The Qt OpenGL module makes it easy to use OpenGL in Qt applications.
+To include the definitions of the module's classes, use the following
+directive:
::
import PySide6.QtOpenGL
-The Qt OpenGL module is implemented as a platform-independent wrapper around the platform-dependent GLX (version 1.3 or later), WGL, or AGL C APIs. Although the basic functionality provided is very similar to Mark Kilgard's GLUT library, applications using the Qt OpenGL module can take advantage of the whole Qt API for non-OpenGL-specific GUI functionality.
+The Qt OpenGL module is implemented as a platform-independent wrapper
+around the platform-dependent GLX (version 1.3 or later), WGL, or AGL
+C APIs. Applications using the Qt OpenGL module can take advantage of
+the whole Qt API for non-OpenGL-specific GUI functionality.
+
+The QtOpenGL module is available on Windows, X11 and Mac OS X. Qt for
+Embedded Linux and OpenGL supports OpenGL ES (OpenGL for Embedded
+Systems).
-The QtOpenGL module is available on Windows, X11 and Mac OS X. Qt for Embedded Linux and OpenGL supports OpenGL ES (OpenGL for Embedded Systems). \ No newline at end of file
diff --git a/sources/pyside6/doc/extras/QtOpenGLWidgets.rst b/sources/pyside6/doc/extras/QtOpenGLWidgets.rst
new file mode 100644
index 000000000..d40b89d71
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtOpenGLWidgets.rst
@@ -0,0 +1,8 @@
+The Qt OpenGL provides the OpenGL widget class that can be used just like any
+other Qt widget, except that it opens an OpenGL display buffer where you can
+use the OpenGL API to render the contents. To include the definitions of
+the module's classes, use the following directive:
+
+::
+
+ import PySide6.QtOpenGLWidgets
diff --git a/sources/pyside6/doc/extras/QtPositioning.rst b/sources/pyside6/doc/extras/QtPositioning.rst
new file mode 100644
index 000000000..800e369fa
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtPositioning.rst
@@ -0,0 +1,40 @@
+The Qt Positioning API provides positioning information via QML and Python interfaces.
+
+Currently the API is supported on Android, iOS, macOS, Linux, and Windows (with
+GPS receivers exposed as a serial port providing NMEA sentences or using
+``Windows.Devices.Geolocation``\).
+
+Overview
+^^^^^^^^
+
+The Qt Positioning API gives developers the ability to determine a position by
+using a variety of possible sources, including satellite, or wifi, or text
+file, and so on. That information can then be used to for example determine a
+position on a map. In addition satellite information can be retrieved and area
+based monitoring can be performed.
+
+Using the Module
+^^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtPositioning
+
+The module also provides `QML types <https://doc.qt.io/qt-6/qtpositioning-qmlmodule.html>`_ .
+
+To load the Qt Positioning module, add the following statement to your .qml files
+
+ ::
+
+ import QtPositioning
+
+Articles and Guides
+^^^^^^^^^^^^^^^^^^^
+
+ * :ref:`Positioning introduction for C++<Positioning--C--->`
+ * :ref:`Positioning introduction for QML<Positioning--QML->`
+ * :ref:`Qt Positioning Plugins<Qt-Positioning-Plugins>`
+ * :ref:`Interfaces between C++ and QML Code in Qt Positioning<Interfaces-between-C---and-QML-Code-in-Qt-Positioning>`
diff --git a/sources/pyside6/doc/extras/QtPrintSupport.rst b/sources/pyside6/doc/extras/QtPrintSupport.rst
new file mode 100644
index 000000000..146ef6a9f
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtPrintSupport.rst
@@ -0,0 +1,15 @@
+The Qt Print Support module provides extensive cross-platform support for
+printing. Using the printing systems on each platform, Qt applications can
+print to attached printers and across networks to remote printers. The printing
+system also supports PDF file generation, providing the foundation for basic
+report generation facilities.
+
+Using the Module
+^^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtPrintSupport
diff --git a/sources/pyside6/doc/extras/QtQml.ListProperty.rst b/sources/pyside6/doc/extras/QtQml.ListProperty.rst
new file mode 100644
index 000000000..eaa580c68
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtQml.ListProperty.rst
@@ -0,0 +1,24 @@
+.. currentmodule:: PySide6.QtQml
+.. py:class:: ListProperty
+
+ The ``ListProperty`` class allows applications to expose list-like properties of
+ :class:`~PySide6.QtCore.QObject`-derived classes to QML.
+ The usage is shown in the :ref:`qml-object-and-list-property-types-example`
+ and the :ref:`qml-chapter5-listproperties` example.
+
+ .. py:method:: __init__(type, append, count=None, at=None, clear=None, removeLast=None, doc="", notify=None, designable=True, scriptable=True, stored=True, user=False, constant=False, final=False)
+
+ :param type type: Element type
+ :param callable append: A function to append an item
+ :param callable count: A function returning the list count
+ :param callable at: A function returning the item at an index
+ :param callable clear: A function to clear the list
+ :param removeLast: A function to remove the last item
+ :param str doc: Doc string
+ :param Signal notify: A signal emitted when a change occurs
+ :param bool designable: Not used in QML
+ :param bool scriptable: Not used in QML
+ :param bool stored: Whether the property is stored
+ :param bool user: Not used in QML
+ :param bool constant: Whether the property is constant
+ :param bool final: Whether the property is final
diff --git a/sources/pyside6/doc/extras/QtQml.QPyQmlParserStatus.rst b/sources/pyside6/doc/extras/QtQml.QPyQmlParserStatus.rst
new file mode 100644
index 000000000..10dde6b9a
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtQml.QPyQmlParserStatus.rst
@@ -0,0 +1,9 @@
+.. currentmodule:: PySide6.QtQml
+.. py:class:: QPyQmlParserStatus
+
+QPyQmlParserStatus is the base class for implementing
+`QQmlParserStatus class`_ .
+
+It provides the required inheritance from **QObject**.
+
+.. _QQmlParserStatus class: https://doc.qt.io/qt-6/qqmlparserstatus.html
diff --git a/sources/pyside6/doc/extras/QtQml.QPyQmlPropertyValueSource.rst b/sources/pyside6/doc/extras/QtQml.QPyQmlPropertyValueSource.rst
new file mode 100644
index 000000000..bf7f8e98f
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtQml.QPyQmlPropertyValueSource.rst
@@ -0,0 +1,9 @@
+.. currentmodule:: PySide6.QtQml
+.. py:class:: QPyQmlPropertyValueSource
+
+QPyQmlPropertyValueSource is the base class for implementing
+`QQmlPropertyValueSource class`_ .
+
+It provides the required inheritance from **QObject**.
+
+.. _QQmlPropertyValueSource class: https://doc.qt.io/qt-6/qqmlpropertyvaluesource.html
diff --git a/sources/pyside6/doc/extras/QtQml.QmlAnonymous.rst b/sources/pyside6/doc/extras/QtQml.QmlAnonymous.rst
new file mode 100644
index 000000000..44aa0ea21
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtQml.QmlAnonymous.rst
@@ -0,0 +1,17 @@
+.. currentmodule:: PySide6.QtQml
+.. py:decorator:: QmlAnonymous
+
+Declares the enclosing type to be available, but anonymous in QML. The type
+cannot be created or used to declare properties in QML, but when passed from
+C++, it is recognized. In QML, you can use properties of this type if they
+are declared in C++.
+
+.. code-block:: python
+
+ QML_IMPORT_NAME = "com.library.name"
+ QML_IMPORT_MAJOR_VERSION = 1
+ QML_IMPORT_MINOR_VERSION = 0 # Optional
+
+ @QmlAnonymous
+ class ClassForQml(QObject):
+ # ...
diff --git a/sources/pyside6/doc/extras/QtQml.QmlAttached.rst b/sources/pyside6/doc/extras/QtQml.QmlAttached.rst
new file mode 100644
index 000000000..4331b03f9
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtQml.QmlAttached.rst
@@ -0,0 +1,35 @@
+.. currentmodule:: PySide6.QtQml
+.. py:decorator:: QmlAttached
+
+This decorator declares that the enclosing type attaches the type passed as
+an attached property to other types. This takes effect if the type is exposed
+to QML using a ``QmlElement()`` or ``@QmlNamedElement()`` decorator.
+
+.. code-block:: python
+
+ QML_IMPORT_NAME = "com.library.name"
+ QML_IMPORT_MAJOR_VERSION = 1
+ QML_IMPORT_MINOR_VERSION = 0 # Optional
+
+ @QmlAnonymous
+ class LayoutAttached(QObject):
+ @Property(QMargins)
+ def margins(self):
+ ...
+
+ @QmlElement()
+ @QmlAttached(LayoutAttached)
+ class Layout(QObject):
+ ...
+
+Afterwards the class may be used in QML:
+
+.. code-block:: javascript
+
+ import com.library.name 1.0
+
+ Layout {
+ Widget {
+ Layout.margins: [2, 2, 2, 2]
+ }
+ }
diff --git a/sources/pyside6/doc/extras/QtQml.QmlElement.rst b/sources/pyside6/doc/extras/QtQml.QmlElement.rst
index 2746fbc0b..66397b2d9 100644
--- a/sources/pyside6/doc/extras/QtQml.QmlElement.rst
+++ b/sources/pyside6/doc/extras/QtQml.QmlElement.rst
@@ -1,30 +1,25 @@
.. currentmodule:: PySide6.QtQml
-.. _QmlElement:
-
-QmlElement
-**********
-
.. py:decorator:: QmlElement
- This decorator registers a class it is attached to for use in QML, using
- global variables to specify the import name and version.
+This decorator registers a class it is attached to for use in QML, using
+global variables to specify the import name and version.
- .. code-block:: python
+.. code-block:: python
- QML_IMPORT_NAME = "com.library.name"
- QML_IMPORT_MAJOR_VERSION = 1
- QML_IMPORT_MINOR_VERSION = 0 # Optional
+ QML_IMPORT_NAME = "com.library.name"
+ QML_IMPORT_MAJOR_VERSION = 1
+ QML_IMPORT_MINOR_VERSION = 0 # Optional
- @QmlElement
- class ClassForQml(QObject):
- # ...
+ @QmlElement
+ class ClassForQml(QObject):
+ # ...
- Afterwards the class may be used in QML:
+Afterwards the class may be used in QML:
- .. code-block:: python
+.. code-block:: python
- import com.library.name 1.0
+ import com.library.name 1.0
- ClassForQml {
- // ...
- }
+ ClassForQml {
+ // ...
+ }
diff --git a/sources/pyside6/doc/extras/QtQml.QmlExtended.rst b/sources/pyside6/doc/extras/QtQml.QmlExtended.rst
new file mode 100644
index 000000000..af113a9c8
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtQml.QmlExtended.rst
@@ -0,0 +1,32 @@
+.. currentmodule:: PySide6.QtQml
+.. py:decorator:: QmlExtended
+
+Declares that the enclosing type uses the type passed as an extension to
+provide further properties, methods, and enumerations in QML. This takes effect
+if the type is exposed to QML using a ``QmlElement()`` or ``QmlNamedElement()``
+decorator.
+
+.. code-block:: python
+
+ QML_IMPORT_NAME = "com.library.name"
+ QML_IMPORT_MAJOR_VERSION = 1
+ QML_IMPORT_MINOR_VERSION = 0 # Optional
+
+ class LineEditExtension(QObject):
+ pass
+
+ @QmlNamedElement("QLineEdit")
+ @QmlExtended(LineEditExtension)
+ @QmlForeign(QLineEdit)
+ class LineEditForeign(QObject):
+ ...
+
+Afterwards the class may be used in QML:
+
+.. code-block:: javascript
+
+ import com.library.name 1.0
+
+ QLineEdit {
+ left_margin: 10
+ }
diff --git a/sources/pyside6/doc/extras/QtQml.QmlForeign.rst b/sources/pyside6/doc/extras/QtQml.QmlForeign.rst
new file mode 100644
index 000000000..90b821e9b
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtQml.QmlForeign.rst
@@ -0,0 +1,28 @@
+.. currentmodule:: PySide6.QtQml
+.. py:decorator:: QmlForeign
+
+This decorator can be used to change the type that is created by QML.
+
+This is useful for registering types that cannot be amended by adding the
+QmlElement decorator, for example because they belong to 3rdparty libraries.
+
+.. code-block:: python
+
+ QML_IMPORT_NAME = "com.library.name"
+ QML_IMPORT_MAJOR_VERSION = 1
+ QML_IMPORT_MINOR_VERSION = 0 # Optional
+
+ @QmlNamedElement("QWidget")
+ @QmlForeign(QWidget)
+ class ForeignWidgetHelperClass(QObject):
+ ...
+
+Afterwards the class may be used in QML:
+
+.. code-block:: javascript
+
+ import com.library.name 1.0
+
+ QWidget {
+ // ...
+ }
diff --git a/sources/pyside6/doc/extras/QtQml.QmlNamedElement.rst b/sources/pyside6/doc/extras/QtQml.QmlNamedElement.rst
new file mode 100644
index 000000000..79eb9d7ad
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtQml.QmlNamedElement.rst
@@ -0,0 +1,26 @@
+.. currentmodule:: PySide6.QtQml
+.. py:decorator:: QmlNamedElement
+
+This decorator registers a class it is attached to for use in QML under
+a name different from the class name, using global variables to specify
+the import name and version.
+
+.. code-block:: python
+
+ QML_IMPORT_NAME = "com.library.name"
+ QML_IMPORT_MAJOR_VERSION = 1
+ QML_IMPORT_MINOR_VERSION = 0 # Optional
+
+ @QmlNamedElement("ClassForQml")
+ class ClassWithSomeName(QObject):
+ ...
+
+Afterwards the class may be used in QML:
+
+.. code-block:: javascript
+
+ import com.library.name 1.0
+
+ ClassForQml {
+ // ...
+ }
diff --git a/sources/pyside6/doc/extras/QtQml.QmlSingleton.rst b/sources/pyside6/doc/extras/QtQml.QmlSingleton.rst
new file mode 100644
index 000000000..402c18d55
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtQml.QmlSingleton.rst
@@ -0,0 +1,33 @@
+.. currentmodule:: PySide6.QtQml
+.. py:decorator:: QmlSingleton
+
+Declares the decorated type to be a singleton in QML. This only takes effect if
+the type is a QObject and is available in QML (by having a QmlElement decorator).
+The QQmlEngine will try to create a singleton instance using the type's default
+constructor.
+
+.. code-block:: python
+
+ QML_IMPORT_NAME = "com.library.name"
+ QML_IMPORT_MAJOR_VERSION = 1
+ QML_IMPORT_MINOR_VERSION = 0 # Optional
+
+ @QmlElement
+ @QmlSingleton
+ class ClassForQml(QObject):
+ ...
+
+It is also possible to use a static ``create()`` method which receives
+the engine as a parameter:
+
+.. code-block:: python
+
+ @QmlElement
+ @QmlSingleton
+ class ClassForQml(QObject):
+
+ @staticmethod
+ def create(engine):
+ ...
+
+.. note:: The order of the decorators matters; ``QmlSingleton`` needs to be preceded by ``QmlElement``.
diff --git a/sources/pyside6/doc/extras/QtQml.QmlUncreatable.rst b/sources/pyside6/doc/extras/QtQml.QmlUncreatable.rst
new file mode 100644
index 000000000..b7a28801f
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtQml.QmlUncreatable.rst
@@ -0,0 +1,26 @@
+.. currentmodule:: PySide6.QtQml
+.. py:decorator:: QmlUncreatable
+
+Declares that the decorated type shall not be creatable from QML. This takes
+effect if the type is available in QML, by a preceding ``QmlElement``
+decorator. The reason will be emitted as error message if an attempt to create
+the type from QML is detected.
+
+Some QML types are implicitly uncreatable, in particular types exposed with
+``QmlAnonymous``.
+
+Passing None or no argument will cause a standard message to be used instead.
+
+.. code-block:: python
+
+ QML_IMPORT_NAME = "com.library.name"
+ QML_IMPORT_MAJOR_VERSION = 1
+ QML_IMPORT_MINOR_VERSION = 0 # Optional
+
+
+ @QmlElement
+ @QmlUncreatable("BaseClassForQml is an abstract base class")
+ class BaseClassForQml(QObject):
+ ...
+
+.. note:: The order of the decorators matters; ``QmlUncreatable`` needs to be preceded by ``QmlElement``.
diff --git a/sources/pyside6/doc/extras/QtQml.qmlRegisterSingletonType.rst b/sources/pyside6/doc/extras/QtQml.qmlRegisterSingletonType.rst
deleted file mode 100644
index 83102bf86..000000000
--- a/sources/pyside6/doc/extras/QtQml.qmlRegisterSingletonType.rst
+++ /dev/null
@@ -1,44 +0,0 @@
-.. currentmodule:: PySide6.QtQml
-.. _qmlRegisterSingletonType:
-
-qmlRegisterSingletonType
-************************
-
-.. py:function:: qmlRegisterSingletonType(pytype: type, uri: str, versionMajor: int, versionMinor: int, typeName: str) -> int
-
- :param type pytype: Python class
- :param str uri: uri to use while importing the component in QML
- :param int versionMajor: major version
- :param int versionMinor: minor version
- :param str typeName: name exposed to QML
- :return: int (the QML type id)
-
- This function registers a Python type as a singleton in the QML system.
-
-.. py:function:: qmlRegisterSingletonType(pytype: type, uri: str, versionMajor: int, versionMinor: int, typeName: str, callback: object) -> int
-
- :param type pytype: Python class
- :param str uri: uri to use while importing the component in QML
- :param int versionMajor: major version
- :param int versionMinor: minor version
- :param str typeName: name exposed to QML
- :param object callback: Python callable (to handle Python type)
- :return: int (the QML type id)
-
- This function registers a Python type as a singleton in the QML system using
- the provided callback (which gets a QQmlEngine as a parameter) to generate
- the singleton.
-
-
-.. py:function:: qmlRegisterSingletonType(uri: str, versionMajor: int, versionMinor: int, typeName: str, callback: object) -> int
-
- :param str uri: uri to use while importing the component in QML
- :param int versionMajor: major version
- :param int versionMinor: minor version
- :param str typeName: name exposed to QML
- :param object callback: Python callable (to handle QJSValue)
- :return: int (the QML type id)
-
- This function registers a QJSValue as a singleton in the QML system using
- the provided callback (which gets a QQmlEngine as a parameter) to
- generate the singleton.
diff --git a/sources/pyside6/doc/extras/QtQml.qmlRegisterType.rst b/sources/pyside6/doc/extras/QtQml.qmlRegisterType.rst
deleted file mode 100644
index 079e15bf1..000000000
--- a/sources/pyside6/doc/extras/QtQml.qmlRegisterType.rst
+++ /dev/null
@@ -1,41 +0,0 @@
-.. currentmodule:: PySide6.QtQml
-.. _qmlRegisterType:
-
-qmlRegisterType
-***************
-
-.. py:function:: qmlRegisterType(pytype: type, uri: str, versionMajor: int, versionMinor: int, qmlName: str) -> int
-
- :param type pytype: Python class
- :param str uri: uri to use while importing the component in QML
- :param int versionMajor: major version
- :param int versionMinor: minor version
- :param str qmlName: name exposed to QML
- :return: int (the QML type id)
-
- This function registers the Python *type* in the QML system with the
- name *qmlName*, in the library imported from *uri* having the
- version number composed from *versionMajor* and *versionMinor*.
-
- For example, this registers a Python class 'MySliderItem' as a QML
- type named 'Slider' for version '1.0' of a module called
- 'com.mycompany.qmlcomponents':
-
- ::
-
- qmlRegisterType(MySliderItem, "com.mycompany.qmlcomponents", 1, 0, "Slider")
-
- Once this is registered, the type can be used in QML by importing
- the specified module name and version number:
-
- ::
-
- import com.mycompany.qmlcomponents 1.0
-
- Slider { ... }
-
- Note that it's perfectly reasonable for a library to register types
- to older versions than the actual version of the library.
- Indeed, it is normal for the new library to allow QML written to
- previous versions to continue to work, even if more advanced
- versions of some of its types are available.
diff --git a/sources/pyside6/doc/extras/QtQml.qmlRegisterUncreatableType.rst b/sources/pyside6/doc/extras/QtQml.qmlRegisterUncreatableType.rst
deleted file mode 100644
index 2f34cd987..000000000
--- a/sources/pyside6/doc/extras/QtQml.qmlRegisterUncreatableType.rst
+++ /dev/null
@@ -1,36 +0,0 @@
-.. currentmodule:: PySide6.QtQml
-.. _qmlRegisterUncreatableType:
-
-
-qmlRegisterUncreatableType
-**************************
-
-
-.. py:function:: qmlRegisterUncreatableType(pytype: type, uri: str, versionMajor: int, versionMinor: int, qmlName: str, noCreationReason: str) -> int
-
-
- :param type pytype: Python class
- :param str uri: uri to use while importing the component in QML
- :param int versionMajor: major version
- :param int versionMinor: minor version
- :param str qmlName: name exposed to QML
- :param str noCreationReason: Error message shown when trying to create the QML type
- :return: int (the QML type id)
-
- This function registers the Python *type* in the QML system as an uncreatable type with the
- name *qmlName*, in the library imported from *uri* having the
- version number composed from *versionMajor* and *versionMinor*,
- showing *noCreationReason* as an error message when creating the type is attempted.
-
- For example, this registers a Python class 'MySliderItem' as a QML
- type named 'Slider' for version '1.0' of a module called
- 'com.mycompany.qmlcomponents':
-
- ::
- qmlRegisterUncreatableType(MySliderItem, "com.mycompany.qmlcomponents", 1, 0, "Slider", "Slider cannot be created.")
-
- Note that it's perfectly reasonable for a library to register types
- to older versions than the actual version of the library.
- Indeed, it is normal for the new library to allow QML written to
- previous versions to continue to work, even if more advanced
- versions of some of its types are available.
diff --git a/sources/pyside6/doc/extras/QtQml.rst b/sources/pyside6/doc/extras/QtQml.rst
new file mode 100644
index 000000000..66f736f02
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtQml.rst
@@ -0,0 +1,75 @@
+The Qt QML module defines and implements the QML language
+
+The Qt QML module provides a framework for developing applications and
+libraries with the QML language. It defines and implements the language and
+engine infrastructure, and provides an API to enable application developers to
+extend the QML language with custom types and integrate QML code with
+JavaScript and C++. The Qt QML module provides both a `QML API
+<https://doc.qt.io/qt-6/qtqml-qmlmodule.html>`_ and a `C++ API
+<https://doc.qt.io/qt-6/qtqml-module.html>`_ .
+
+Note that while the Qt QML module provides the language and infrastructure for
+QML applications, the :ref:`Qt Quick<Qt-Quick>` module provides many visual
+components, model-view support, an animation framework, and much more for
+building user interfaces.
+
+For those new to QML and Qt Quick, please see QML Applications for an
+introduction to writing QML applications.
+
+Using the Module
+^^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtQml
+
+The module also provides `QML types <https://doc.qt.io/qt-6/qtqml-qmlmodule.html>`_ .
+
+QML and QML Types
+^^^^^^^^^^^^^^^^^
+
+The Qt QML module contains the QML framework and important QML types used in
+applications. The constructs of QML are described in the
+:ref:`The QML Reference<The-QML-Reference>` .
+
+In addition to the :ref:`QML Basic Types<QML-Basic-Types>` , the module comes
+with the following QML object types:
+
+ * `Component <https://doc.qt.io/qt-6/qml-qtqml-component.html>`_
+ * `QtObject <https://doc.qt.io/qt-6/qml-qtqml-qtobject.html>`_
+ * `Binding <https://doc.qt.io/qt-6/qml-qtqml-binding.html>`_
+ * `Connections <https://doc.qt.io/qt-6/qml-qtqml-connections.html>`_
+ * `Timer <https://doc.qt.io/qt-6/qml-qtqml-timer.html>`_
+
+The `Qt <https://doc.qt.io/qt-6/qml-qtqml-qt.html>`_ global object provides
+useful enums and functions for various QML types.
+
+Lists and Models
+^^^^^^^^^^^^^^^^
+
+New in Qt 5.1, the model types are moved to a submodule, ``QtQml.Models``\. The
+Qt QML Models page has more information.
+
+ * DelegateModel
+ * DelegateModelGroup
+ * ListElement
+ * ListModel
+ * ObjectModel
+
+JavaScript Environment for QML Applications
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+JavaScript expressions allow QML code to contain application logic. Qt QML
+provides the framework for running JavaScript expressions in QML and from C++.
+
+These sections are from :ref:`The QML Reference<The-QML-Reference>` .
+
+ * `Integrating QML and JavaScript <https://doc.qt.io/qt-6/qtqml-javascript-topic.html>`_
+ * `Using JavaScript Expressions with QML <https://doc.qt.io/qt-6/qtqml-javascript-expressions.html>`_
+ * `Dynamic QML Object Creation from JavaScript <https://doc.qt.io/qt-6/qtqml-javascript-dynamicobjectcreation.html>`_
+ * `Defining JavaScript Resources In QML <https://doc.qt.io/qt-6/qtqml-javascript-resources.html>`_
+ * `Importing JavaScript Resources In QML <https://doc.qt.io/qt-6/qtqml-javascript-imports.html>`_
+ * `JavaScript Host Environment <https://doc.qt.io/qt-6/qtqml-javascript-hostenvironment.html>`_
diff --git a/sources/pyside6/doc/extras/QtQuickControls2.rst b/sources/pyside6/doc/extras/QtQuickControls2.rst
new file mode 100644
index 000000000..dba542045
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtQuickControls2.rst
@@ -0,0 +1,45 @@
+Provides a set of UI controls for Qt Quick.
+
+Qt Quick Controls provides a set of controls that can be used to build complete
+interfaces in Qt Quick. The module was introduced in Qt 5.7.
+
+ .. image:: images/qtquickcontrols2-styles.png
+
+Qt Quick Controls comes with a selection customizable styles. See
+:ref:`Styling Qt Quick Controls<Styling-Qt-Quick-Controls>` for more details.
+
+ .. _QtQuickControls2_using-the-module:
+
+Using the Module
+^^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtQuickControls2
+
+Versions
+^^^^^^^^
+
+Qt Quick Controls 2.0 was introduced in Qt 5.7. Subsequent minor Qt releases
+increment the import version of the Qt Quick Controls modules by one, until Qt
+5.12, where the import versions match Qt's minor version.
+
+In Qt 6, both the major and minor versions match, and version numbers may be
+omitted from imports in QML. If the version is omitted, the latest version will
+be used.
+
+Topics
+^^^^^^
+
+ * `Getting Started <https://doc.qt.io/qt-6/qtquickcontrols2-gettingstarted.html>`_
+ * `Guidelines <https://doc.qt.io/qt-6/qtquickcontrols2-guidelines.html>`_
+ * `Styling <https://doc.qt.io/qt-6/qtquickcontrols2-styles.html>`_
+ * `Icons <https://doc.qt.io/qt-6/qtquickcontrols2-icons.html>`_
+ * `Customization <https://doc.qt.io/qt-6/qtquickcontrols2-customize.html>`_
+ * `Using File Selectors <https://doc.qt.io/qt-6/qtquickcontrols2-fileselectors.html>`_
+ * `Deployment <https://doc.qt.io/qt-6/qtquickcontrols2-deployment.html>`_
+ * `Configuration File <https://doc.qt.io/qt-6/qtquickcontrols2-configuration.html>`_
+ * `Environment Variables <https://doc.qt.io/qt-6/qtquickcontrols2-environment.html>`_
diff --git a/sources/pyside6/doc/extras/QtQuickTest.rst b/sources/pyside6/doc/extras/QtQuickTest.rst
new file mode 100644
index 000000000..52f13590b
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtQuickTest.rst
@@ -0,0 +1,58 @@
+ Qt Quick Test is a unit test framework for QML applications. Test cases are
+ written as JavaScript functions within a QML TestCase type:
+
+.. code-block:: JavaScript
+
+ import QtQuick
+ import QtTest
+
+ TestCase {
+ name: "MathTests"
+
+ function test_math() {
+ compare(2 + 2, 4, "2 + 2 = 4")
+ }
+
+ function test_fail() {
+ compare(2 + 2, 5, "2 + 2 = 5")
+ }
+ }
+
+Functions whose names start with ``test_`` are treated as test cases to be
+executed.
+
+QML API
+^^^^^^^
+
+The `QML types <https://doc.qt.io/qt-6/qttest-qmlmodule.html>`_
+in Qt Quick Test are available through the ``QtTest`` import.
+To use the types, add the following import statement to your ``.qml`` file:
+
+.. code-block:: JavaScript
+
+ import QtTest
+
+Running Tests
+^^^^^^^^^^^^^
+
+Test cases are launched by a harness that consists of the following code:
+
+.. code-block:: Python
+
+ import sys
+ from PySide6.QtQuickTest import QUICK_TEST_MAIN
+
+ QUICK_TEST_MAIN("example", sys.argv)
+
+Where "example" is the identifier to use to uniquely identify this set of
+tests.
+
+Test execution can be controlled by a number of command line options (pass
+``-h`` for help).
+
+Executing Code Before QML Tests
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+To execute code before any of the QML tests are run, the
+:py:func:`QUICK_TEST_MAIN_WITH_SETUP` function can be used. This can be useful
+for setting context properties on the QML engine, amongst other things.
diff --git a/sources/pyside6/doc/extras/QtRemoteObjects.rst b/sources/pyside6/doc/extras/QtRemoteObjects.rst
new file mode 100644
index 000000000..7a8eb76a3
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtRemoteObjects.rst
@@ -0,0 +1,101 @@
+Provides APIs for inter-process communication.
+
+Remote Object Concepts
+^^^^^^^^^^^^^^^^^^^^^^
+
+Qt Remote Objects (QtRO) is an Inter-Process Communication (IPC) module
+developed for Qt. This module extends Qt's existing functionalities to enable
+information exchange between processes or computers, easily.
+
+One of Qt's key features, to enable this information exchange, is the
+distinction between an object's API (defined by its properties, signals, and
+slots) and the implementation of that API. QtRO's purpose is to meet that
+expected API, even if the true :class:`QObject<PySide6.QtCore.QObject>` is in a
+different process. A slot called on a copy of an object (the
+:ref:`Replica<Qt-Remote-Objects-Replica>` in QtRO) is forwarded to the true
+object (the :ref:`Source<Qt-Remote-Objects-Source>` in QtRO) for handling.
+Every Replica receives updates to the Source, either property changes or
+emitted signals.
+
+A :ref:`Replica<Qt-Remote-Objects-Replica>` is a light-weight proxy for the
+:ref:`Source<Qt-Remote-Objects-Source>` object, but a Replica supports the same
+connections and behavior of QObjects, which makes it usable in the same way as
+any other :class:`QObject<PySide6.QtCore.QObject>` that Qt provides. Behind the
+scenes, QtRO handles everything that's necessary for the Replica to look like
+its Source.
+
+Note that Remote Objects behave differently from traditional Remote Procedure
+Call (RPC) implementations, for example:
+
+ * In RPC, the client makes a request and waits for the response.
+ * In RPC, the server doesn't push anything to the client unless it's in response to a request.
+ * Often, the design of RPC is such that different clients are independent of each other:
+ for instance, two clients can ask a mapping service for directions and get
+ different results.
+
+While it is possible to implement this RPC-style behavior in QtRO, as Sources
+without properties, and slots that have return values, QtRO hides the fact that
+the processing is really remote. You let a node give you the Replica instead of
+creating it yourself, possibly use the status signals (
+:meth:`isReplicaValid()<PySide6.QtRemoteObjects.QRemoteObjectReplica.isReplicaValid>`
+), but then interact with the object like you would with any other
+:class:`QObject<PySide6.QtCore.QObject>` -based type.
+
+Use Case: GPS
+^^^^^^^^^^^^^
+
+Consider a sensor such as a Global Positioning System (GPS) receiver. In QtRO terms:
+
+ * The :ref:`Source<Qt-Remote-Objects-Source>` would be the process that directly
+ interacts with the GPS hardware and derives your current location.
+ * The location would be exposed as :class:`QObject<PySide6.QtCore.QObject>` properties;
+ the periodic updates to the location would update these properties and emit property
+ changed signals.
+ * :ref:`Replicas<Qt-Remote-Objects-Replica>` would be created in other processes
+ and would always know your current location, but wouldn't need any of the logic
+ to compute the location from the sensor data.
+ * Connecting to the location changed signal on the Replica would work as
+ expected: the signal emitted from the Source would trigger the signal
+ emission on every Replica.
+
+Use Case: Printer Access
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+Consider a service that provides access to a printer. In QtRO terms:
+
+ * The :ref:`Source<Qt-Remote-Objects-Source>` would be the process
+ controlling the printer directly.
+ * The ink levels and printer status would be monitored by
+ :class:`QObject<PySide6.QtCore.QObject>` properties. Updates to these
+ properties would emit property changed signals.
+ * The key feature -- being able to print something -- needs to be passed
+ back to the printer. Incidentally, this aligns with the Qt slot mechanism,
+ which QtRO uses as the way for :ref:`Replicas<Qt-Remote-Objects-Replica>`
+ to make calls on the Source. In effect, properties and signals go from Source
+ to Replicas; slots go from Replica to Source.
+ * When a print request is accepted, the printer status would change,
+ triggering a change in the status property. This would then be reported
+ to all Replicas.
+
+Using the Module
+^^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtRemoteObjects
+
+Articles and Guides
+^^^^^^^^^^^^^^^^^^^
+
+ * `Getting Started with Qt Remote Objects <https://doc.qt.io/qt-6/qtremoteobjects-gettingstarted.html>`_
+ * `Nodes <https://doc.qt.io/qt-6/qtremoteobjects-node.html>`_
+ * `Sources <https://doc.qt.io/qt-6/qtremoteobjects-source.html>`_
+ * `Replicas <https://doc.qt.io/qt-6/qtremoteobjects-replica.html>`_
+ * `Registry <https://doc.qt.io/qt-6/qtremoteobjects-registry.html>`_
+ * `Compiler <https://doc.qt.io/qt-6/qtremoteobjects-repc.html>`_
+ * `Remote Object Interaction <https://doc.qt.io/qt-6/qtremoteobjects-interaction.html>`__
+ * `Troubleshooting <https://doc.qt.io/qt-6/qtremoteobjects-troubleshooting.html>`_
+ * `Protocol Versioning <https://doc.qt.io/qt-6/qtremoteobjects-compatibility.html>`_
diff --git a/sources/pyside6/doc/extras/QtScript.rst b/sources/pyside6/doc/extras/QtScript.rst
deleted file mode 100644
index 1d2a1bd04..000000000
--- a/sources/pyside6/doc/extras/QtScript.rst
+++ /dev/null
@@ -1,21 +0,0 @@
-The QtScript module only provides core scripting facilities; the QtScriptTools module provides additional Qt Script-related components that application developers may find useful.
-
-To include the definitions of the module's classes, use the following directive:
-
-::
-
- import PySide6.QtScript
-
-License Information
--------------------
-
-Qt Commercial Edition licensees that wish to distribute applications that use the QtScript module need to be aware of their obligations under the GNU Library General Public License (LGPL).
-
-Developers using the Open Source Edition can choose to redistribute the module under the appropriate version of the GNU LGPL.
-QtScript is licensed under the GNU Library General Public License. Individual contributor names and copyright dates can be found inline in the code.
-
-This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/sources/pyside6/doc/extras/QtScriptTools.rst b/sources/pyside6/doc/extras/QtScriptTools.rst
deleted file mode 100644
index 8f0c7e12b..000000000
--- a/sources/pyside6/doc/extras/QtScriptTools.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-Applications that use the Qt Script Tools classes need to be configured to be built against the QtScriptTools module. To include the definitions of the module's classes, use the following directive:
-
-::
-
- import PySide6.QtScriptTools
diff --git a/sources/pyside6/doc/extras/QtScxml.rst b/sources/pyside6/doc/extras/QtScxml.rst
new file mode 100644
index 000000000..e757bfd58
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtScxml.rst
@@ -0,0 +1,25 @@
+Provides functionality to create state machines from SCXML files.
+
+The Qt SCXML module provides functionality to create state machines from
+`SCXML <http://www.w3.org/TR/scxml/>`_ files. This includes both dynamically
+creating state machines (loading the SCXML file and instantiating states and
+transitions) and generating a C++ file that has a class implementing the state
+machine. It also contains functionality to support data models and executable
+content.
+
+Getting Started
+^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtScxml
+
+Articles and Guides
+^^^^^^^^^^^^^^^^^^^
+
+ * `Qt SCXML Overview <https://doc.qt.io/qt-6/qtscxml-overview.html>`_
+ * `Instantiating State Machines <https://doc.qt.io/qt-6/qtscxml-instantiating-state-machines.html>`_
+ * `SCXML Compliance <https://doc.qt.io/qt-6/qtscxml-scxml-compliance.html>`_
diff --git a/sources/pyside6/doc/extras/QtSensors.rst b/sources/pyside6/doc/extras/QtSensors.rst
new file mode 100644
index 000000000..03a4d5477
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtSensors.rst
@@ -0,0 +1,19 @@
+
+The Qt Sensors API provides access to sensor hardware via QML and Python
+interfaces.
+
+Currently the API is supported on Android, iOS, and Windows (MSVC).
+
+Information for Application Writers
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Applications can access Qt Sensors using QML or Python.
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtSensors
+
+The module also provides `QML types <https://doc.qt.io/qt-6/qtsensors-qmlmodule.html>`_ .
diff --git a/sources/pyside6/doc/extras/QtSerialBus.rst b/sources/pyside6/doc/extras/QtSerialBus.rst
new file mode 100644
index 000000000..a6493a2ae
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtSerialBus.rst
@@ -0,0 +1,46 @@
+The Qt Serial Bus API provides classes and functions to access the various
+industrial serial buses and protocols, such as CAN, ModBus, and others.
+
+Getting Started
+^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtSerialBus
+
+Supported Buses and Protocols
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ * Qt CAN Bus
+ * Qt Modbus
+
+Logging Categories
+^^^^^^^^^^^^^^^^^^
+
+The QtSerialBus module exports the following logging categories:
+
+.. list-table::
+ :header-rows: 1
+
+ * - Logging Category
+ - Description
+ * - qt.canbus
+ - Enables standard logging inside the Qt CAN Bus classes
+ * - qt.canbus.plugins
+ - Enables low level logging inside the Qt CAN Bus plugin classes. To set logging for a specific plugin, use ``qt.canbus.plugins.pluginname``, e.g. ``qt.canbus.plugins.socketcan``. ``qt.canbus.plugins*`` affects all plugins.
+ * - qt.modbus
+ - Enables standard logging inside the Qt Modbus classes
+ * - qt.modbus.lowlevel
+ - Enables low level logging including individual packet content inside the Qt Modbus classes
+
+Logging categories can be used to enable additional warning and debug output
+for QtSerialBus.
+
+A quick way to enable all Qt Modbus logging is to add the following line:
+
+.. code-block:: python
+
+ QLoggingCategory.setFilterRules("qt.modbus* = true")
diff --git a/sources/pyside6/doc/extras/QtSerialPort.rst b/sources/pyside6/doc/extras/QtSerialPort.rst
new file mode 100644
index 000000000..1b20039c3
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtSerialPort.rst
@@ -0,0 +1,18 @@
+Provides an API to make serial programming simple and portable.
+
+Qt Serial Port provides the basic functionality, which includes configuring,
+I/O operations, getting and setting the control signals of the RS-232 pinouts.
+
+The following items are not supported by this module:
+
+ * Terminal features, such as echo, control CR/LF, and so on.
+ * Text mode.
+ * Configuring timeouts and delays while reading or writing.
+ * Pinout signal change notification.
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtSerialPort
diff --git a/sources/pyside6/doc/extras/QtSql.rst b/sources/pyside6/doc/extras/QtSql.rst
index fb62f887c..f3374edc8 100644
--- a/sources/pyside6/doc/extras/QtSql.rst
+++ b/sources/pyside6/doc/extras/QtSql.rst
@@ -1,4 +1,20 @@
-To include the definitions of the module's classes, use the following directive:
+Provides a driver layer, SQL API layer, and a user interface layer for SQL databases
+
+The Qt SQL module provides support for SQL databases. Qt SQL's APIs are divided
+into different layers:
+
+ * Driver layer
+ * SQL API layer
+ * User interface layer
+
+The :ref:`SQL Programming<SQL-Programming>` guide contains information about
+development using Qt SQL.
+
+Using the Module
+^^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
::
diff --git a/sources/pyside6/doc/extras/QtSvg.rst b/sources/pyside6/doc/extras/QtSvg.rst
index eae02c41e..d652841a6 100644
--- a/sources/pyside6/doc/extras/QtSvg.rst
+++ b/sources/pyside6/doc/extras/QtSvg.rst
@@ -1,5 +1,21 @@
-To include the definitions of the module's classes, use the following directive:
+Qt SVG provides functionality for handling SVG images.
+
+Scalable Vector Graphics (SVG) is an XML-based language for describing
+two-dimensional vector graphics. Qt provides classes for rendering and
+displaying SVG drawings in widgets and on other paint devices.
+
+
+Getting Started
+^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
::
import PySide6.QtSvg
+
+Articles
+^^^^^^^^
+
+ * :ref:`Rendering SVG Files<Rendering-SVG-Files>` contains information about how to render SVG files
diff --git a/sources/pyside6/doc/extras/QtTest.rst b/sources/pyside6/doc/extras/QtTest.rst
index 1b3f98940..cebd5a053 100644
--- a/sources/pyside6/doc/extras/QtTest.rst
+++ b/sources/pyside6/doc/extras/QtTest.rst
@@ -4,4 +4,4 @@ To include the definitions of the module's classes, use the following directive:
import PySide6.QtTest
-.. note:: All macros in the C++ version of QtTest were not binded in PySide, this module is useful only for GUI testing and benchmarking, for ordinary unit testing you should use the ``unittest`` Python module.
+.. note:: Not all macros in the C++ version of QtTest were exposed in PySide. This module is useful only for GUI testing and benchmarking; for ordinary unit testing you should use the ``pytest`` Python module.
diff --git a/sources/pyside6/doc/extras/QtUiTools.loadUiType.rst b/sources/pyside6/doc/extras/QtUiTools.loadUiType.rst
deleted file mode 100644
index 8a8c4bef0..000000000
--- a/sources/pyside6/doc/extras/QtUiTools.loadUiType.rst
+++ /dev/null
@@ -1,36 +0,0 @@
-.. currentmodule:: PySide6.QtUiTools
-.. _loadUiType:
-
-loadUiType
-***********
-
-.. py:function:: loadUiType(uifile: str) -> tuple(object, object)
-
- :param str uifile: The name of the `.ui` file
- :return: tuple(object, object)
-
- This function generates and loads a `.ui` file at runtime, and it returns
- a `tuple` containing the reference to the Python class, and the base class.
-
- We recommend not to use this approach as the workflow should be to generate a Python file
- from the `.ui` file, and then import and load it to use it, but we do understand that
- there are some corner cases when such functionality is required.
-
- The internal process relies on `uic` being in the PATH.
- The `pyside6-uic` wrapper uses a shipped `uic` that is located in the
- `site-packages/PySide6/uic`, so PATH needs to be updated to use that if there
- is no `uic` in the system.
-
- A simple use case is::
-
- from PySide6.QtUiTools import loadUiType
-
- generated_class, base_class = loadUiType("themewidget.ui")
- # the values will be:
- # (<class '__main__.Ui_ThemeWidgetForm'>, <class 'PySide6.QtWidgets.QWidget'>)
-
- widget = base_class()
- form = generated_class()
- form.setupUi(widget)
- # form.a_widget_member.a_method_of_member()
- widget.show()
diff --git a/sources/pyside6/doc/extras/QtUiTools.rst b/sources/pyside6/doc/extras/QtUiTools.rst
index 2769da4d6..e83aa0357 100644
--- a/sources/pyside6/doc/extras/QtUiTools.rst
+++ b/sources/pyside6/doc/extras/QtUiTools.rst
@@ -1,6 +1,14 @@
-These forms are processed at run-time to produce dynamically-generated user interfaces. In order to generate a form at run-time, a resource file containing a UI file is needed.
+*Qt Widgets Designer* forms are processed at run-time to produce
+dynamically-generated user interfaces. In order to generate a form at
+run-time, a resource file containing a UI file is needed.
-A form loader object, provided by the QUiLoader class, is used to construct the user interface. This user interface can be retrieved from any QIODevice; for example, a QFile object can be used to obtain a form stored in a project's resources. The :meth:`PySide6.QtUiTools.QUiLoader.load` function takes the user interface description contained in the file and constructs the form widget.
+A form loader object, provided by the ``QUiLoader`` class, is used to
+construct the user interface. This user interface can be retrieved
+from any ``QIODevice``; for example, a ``QFile`` object can be used to obtain
+a form stored in a project's resources. The
+:meth:`PySide6.QtUiTools.QUiLoader.load` function takes the user
+interface description contained in the file and constructs the form
+widget.
To include the definitions of the module's classes, use the following directive:
diff --git a/sources/pyside6/doc/extras/QtWebChannel.rst b/sources/pyside6/doc/extras/QtWebChannel.rst
new file mode 100644
index 000000000..5207a3486
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtWebChannel.rst
@@ -0,0 +1,30 @@
+Bridges the gap between Qt applications and HTML/JavaScript.
+
+Qt WebChannel enables peer-to-peer communication between a server (QML/Python
+application) and a client (HTML/JavaScript or QML application). It is supported
+out of the box by :ref:`Qt WebEngine<Qt-WebEngine>` . In addition it can work
+on all browsers that support :ref:`WebSockets<Qt-WebSockets>` , enabling Qt
+WebChannel clients to run in any JavaScript environment (including QML). This
+requires the implementation of a custom transport based on Qt WebSockets.
+
+The module provides a JavaScript library for seamless integration of Python and
+QML applications with HTML/JavaScript and QML clients. The clients must use the
+JavaScript library to access the serialized QObjects published by the host
+applications.
+
+Getting Started
+^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtWebChannel
+
+API Reference
+^^^^^^^^^^^^^
+
+ * `JavaScript API <https://doc.qt.io/qt-6/qtwebchannel-javascript.html>`_
+
+The module also provides `QML types <https://doc.qt.io/qt-6/qtwebchannel-qmlmodule.html>`_ .
diff --git a/sources/pyside6/doc/extras/QtWebEngineCore.rst b/sources/pyside6/doc/extras/QtWebEngineCore.rst
new file mode 100644
index 000000000..ff8dd5c23
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtWebEngineCore.rst
@@ -0,0 +1,19 @@
+Provides common API shared by Qt WebEngine and Qt WebEngine Widgets.
+
+Qt WebEngine Core provides API shared by :ref:`Qt WebEngine<Qt-WebEngine>`
+and :ref:`Qt WebEngine Widgets<Qt-WebEngine-Widgets>` .
+
+Getting Started
+^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtWebEngineCore
+
+Articles and Guides
+^^^^^^^^^^^^^^^^^^^
+
+ * `Qt WebEngine Overview <https://doc.qt.io/qt-6/qtwebengine-overview.html>`_
diff --git a/sources/pyside6/doc/extras/QtWebEngineWidgets.rst b/sources/pyside6/doc/extras/QtWebEngineWidgets.rst
new file mode 100644
index 000000000..8d3f6e126
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtWebEngineWidgets.rst
@@ -0,0 +1,18 @@
+Provides a web browser engine as well as C++ classes to render web content and
+interact with it.
+
+Getting Started
+^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtWebEngineWidgets
+
+
+Articles and Guides
+^^^^^^^^^^^^^^^^^^^
+
+ * `Qt WebEngine Overview <https://doc.qt.io/qt-6/qtwebengine-overview.html>`_
diff --git a/sources/pyside6/doc/extras/QtWebSockets.rst b/sources/pyside6/doc/extras/QtWebSockets.rst
new file mode 100644
index 000000000..f15264699
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtWebSockets.rst
@@ -0,0 +1,29 @@
+Provides an implementation of the WebSocket protocol.
+
+WebSocket is a web-based protocol designed to enable two-way communication
+between a client application and a remote host. It enables the two entities to
+send data back and forth if the initial handshake succeeds. WebSocket is the
+solution for applications that struggle to get real-time data feeds with less
+network latency and minimum data exchange.
+
+The Qt WebSockets module provides C++ and QML interfaces that enable Qt
+applications to act as a server that can process WebSocket requests, or a
+client that can consume data received from the server, or both.
+
+Getting Started
+^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtWebSockets
+
+The module also provides `QML types <https://doc.qt.io/qt-6/qtwebsockets-qmlmodule.html>`_ .
+
+Articles and Guides
+^^^^^^^^^^^^^^^^^^^
+
+ * `Overview <https://doc.qt.io/qt-6/websockets-overview.html>`_
+ * `Testing Qt WebSockets <https://doc.qt.io/qt-6/qtwebsockets-testing.html>`_
diff --git a/sources/pyside6/doc/extras/QtWidgets.rst b/sources/pyside6/doc/extras/QtWidgets.rst
new file mode 100644
index 000000000..784421aac
--- /dev/null
+++ b/sources/pyside6/doc/extras/QtWidgets.rst
@@ -0,0 +1,86 @@
+A module which provides a set of C++ technologies for building user
+interfaces
+
+The QtWidgets module provides a set of UI elements to create classic
+desktop-style user interfaces.
+
+Widgets
+^^^^^^^
+
+Widgets are the primary elements for creating user interfaces in Qt. They can
+display data and status information, receive user input, and provide a
+container for other widgets that should be grouped together. A widget that is
+not embedded in a parent widget is called a window.
+
+ .. image:: images/parent-child-widgets.png
+
+The :class:`QWidget<PySide6.QtWidgets.QWidget>` class provides the
+basic capability to render to the screen, and to handle user input
+events. All UI elements that Qt provides are either subclasses of
+:class:`QWidget<PySide6.QtWidgets.QWidget>` , or are used in
+connection with a :class:`QWidget<PySide6.QtWidgets.QWidget>`
+subclass. Creating custom widgets is done by subclassing
+:class:`QWidget<PySide6.QtWidgets.QWidget>` or a suitable subclass and
+reimplementing the virtual event handlers.
+
+ * :ref:`Window and Dialog Widgets<Window-and-Dialog-Widgets>`
+ * :ref:`Application Main Window<Application-Main-Window>`
+ * :ref:`Dialog Windows<Dialog-Windows>`
+ * :ref:`Keyboard Focus in Widgets<Keyboard-Focus-in-Widgets>`
+
+Styles
+^^^^^^
+
+:ref:`Styles<Styles-and-Style-Aware-Widgets>` draw on behalf of
+widgets and encapsulate the look and feel of a GUI. Qt's built-in
+widgets use the :class:`QStyle<PySide6.QtWidgets.QStyle>` class to
+perform nearly all of their drawing, ensuring that they look exactly
+like the equivalent native widgets.
+
+:ref:`Qt Style Sheets<Qt-Style-Sheets>` are a powerful mechanism that
+allows you to customize the appearance of widgets, in addition to what
+is already possible by subclassing
+:class:`QStyle<PySide6.QtWidgets.QStyle>` .
+
+Layouts
+^^^^^^^
+
+:ref:`Layouts<Layout-Management>` are an elegant and flexible way to
+automatically arrange child widgets within their container. Each
+widget reports its size requirements to the layout through the
+:meth:`sizeHint<PySide6.QtWidgets.QWidget.sizeHint>` and
+:meth:`sizePolicy<PySide6.QtWidgets.QWidget.sizePolicy>` properties,
+and the layout distributes the available space accordingly.
+
+:ref:`Qt Widgets Designer<using_ui_files>` is a powerful tool for interactively
+creating and arranging widgets in layouts.
+
+Model/View Classes
+^^^^^^^^^^^^^^^^^^
+
+The :ref:`model/view<Model-View-Programming>` architecture provides
+classes that manage the way data is presented to the user. Data-driven
+applications which use lists and tables are structured to separate the
+data and view using models, views, and delegates.
+
+ .. image:: images/windows-treeview.png
+
+Graphics View
+^^^^^^^^^^^^^
+
+The :ref:`Graphics View Framework<Graphics-View-Framework>` is for
+managing and interacting with a large number of custom-made 2D
+graphical items, and a view widget for visualizing the items, with
+support for zooming and rotation.
+
+ .. image:: images/graphicsview-items.png
+
+Using the Module
+^^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
+
+::
+
+ import PySide6.QtWidgets
diff --git a/sources/pyside6/doc/extras/QtXml.rst b/sources/pyside6/doc/extras/QtXml.rst
index 39c384e77..33d821baa 100644
--- a/sources/pyside6/doc/extras/QtXml.rst
+++ b/sources/pyside6/doc/extras/QtXml.rst
@@ -1,4 +1,12 @@
-To include the definitions of the module's classes, use the following directive:
+The Qt XML module provides implementations of the SAX and DOM standards for XML.
+
+.. note:: Qt XML will no longer receive additional features. For reading or writing XML documents iteratively (SAX), use the :class:`QXmlStreamReader<PySide6.QtCore.QXmlStreamReader>` and :class:`QXmlStreamWriter<PySide6.QtCore.QXmlStreamWriter>` classes. The classes are both easier to use and more compliant with the XML standard.
+
+Using the Module
+^^^^^^^^^^^^^^^^
+
+To include the definitions of modules classes, use the following
+directive:
::
diff --git a/sources/pyside6/doc/extras/QtXmlPatterns.rst b/sources/pyside6/doc/extras/QtXmlPatterns.rst
deleted file mode 100644
index 258fdf28d..000000000
--- a/sources/pyside6/doc/extras/QtXmlPatterns.rst
+++ /dev/null
@@ -1,12 +0,0 @@
-To include the definitions of the module's classes, use the following directive:
-
-::
-
- import PySide6.QtXmlPatterns
-
-Further Reading
----------------
-
-General overviews of XQuery and XSchema can be found in the XQuery document.
-
-An introduction to the XQuery language can be found in A Short Path to XQuery.
diff --git a/sources/pyside6/doc/faq.rst b/sources/pyside6/doc/faq.rst
index c1a27b3c2..4171df947 100644
--- a/sources/pyside6/doc/faq.rst
+++ b/sources/pyside6/doc/faq.rst
@@ -23,14 +23,14 @@ Frequently Asked Questions
Before the official release, everything was in one big wheel, so it made sense to split these
into separate wheels, each for the major projects currently in development:
- * **pyside6**: contains all the PySide6 modules to use the Qt framework; also depends on the
- shiboken6 module.
- * **shiboken6**: contains the shiboken6 module with helper functions for PySide6.
- * **shiboken6_generator**: contains the generator binary that can work with a C++ project and a
- typesystem to generate Python bindings.
- If you want to generate bindings for a Qt/C++ project, there won't be any linking to the Qt
- shared libraries; you need to do this by hand. We recommend building PySide6 from scratch
- to have everything properly linked.
+ * **pyside6**: contains all the PySide6 modules to use the Qt framework; also depends on the
+ shiboken6 module.
+ * **shiboken6**: contains the shiboken6 module with helper functions for PySide6.
+ * **shiboken6_generator**: contains the generator binary that can work with a C++ project and a
+ typesystem to generate Python bindings.
+ If you want to generate bindings for a Qt/C++ project, there won't be any linking to the Qt
+ shared libraries; you need to do this by hand. We recommend building PySide6 from scratch
+ to have everything properly linked.
**Why is the shiboken6_generator not installed automatically?**
It's not necessary to install the shiboken6_generator to use PySide6. The package is a result of
diff --git a/sources/pyside6/doc/tutorials/pretutorial/distribution.rst b/sources/pyside6/doc/faq/distribution.rst
index f55c3684a..fea588153 100644
--- a/sources/pyside6/doc/tutorials/pretutorial/distribution.rst
+++ b/sources/pyside6/doc/faq/distribution.rst
@@ -59,7 +59,7 @@ difficult to retrieve it.
You can find a series of tutorials based on the most popular tools that
allow Python users to freeze and distribute applications in our
-:ref:`deployment` section.
+:ref:`deployment-guides` section.
Compiling Python
----------------
diff --git a/sources/pyside6/doc/tutorials/pretutorial/hello_linux.png b/sources/pyside6/doc/faq/hello_linux.png
index f335a234d..f335a234d 100644
--- a/sources/pyside6/doc/tutorials/pretutorial/hello_linux.png
+++ b/sources/pyside6/doc/faq/hello_linux.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/pretutorial/hello_macOS.png b/sources/pyside6/doc/faq/hello_macOS.png
index 863149399..863149399 100644
--- a/sources/pyside6/doc/tutorials/pretutorial/hello_macOS.png
+++ b/sources/pyside6/doc/faq/hello_macOS.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/pretutorial/hello_win10.jpg b/sources/pyside6/doc/faq/hello_win10.jpg
index 78dcf8ab5..78dcf8ab5 100644
--- a/sources/pyside6/doc/tutorials/pretutorial/hello_win10.jpg
+++ b/sources/pyside6/doc/faq/hello_win10.jpg
Binary files differ
diff --git a/sources/pyside6/doc/faq/tiobe.png b/sources/pyside6/doc/faq/tiobe.png
new file mode 100644
index 000000000..87647d1c2
--- /dev/null
+++ b/sources/pyside6/doc/faq/tiobe.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/pretutorial/typesoffiles.rst b/sources/pyside6/doc/faq/typesoffiles.rst
index 71d38f809..3155b24fc 100644
--- a/sources/pyside6/doc/tutorials/pretutorial/typesoffiles.rst
+++ b/sources/pyside6/doc/faq/typesoffiles.rst
@@ -36,9 +36,10 @@ functionality to your applications.
User Interface Definition File ``.ui``
--------------------------------------
-When using Qt Designer, you can create user interfaces using Qt Widgets with
-the WYSIWYG form editor, this interface is represented as a widget tree using
-XML. Here is an extract of the beginning of a ``.ui`` file:
+When using *Qt Widgets Designer*, you can create user interfaces using
+Qt Widgets with the WYSIWYG form editor, this interface is represented
+as a widget tree using XML. Here is an extract of the beginning of a
+``.ui`` file:
.. code-block:: xml
@@ -58,7 +59,6 @@ XML. Here is an extract of the beginning of a ``.ui`` file:
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralWidget">
- ...
The `pyside6-uic` tool generates Python code from these `.ui` files,
which you can import from your main files, so it is not necessary
@@ -97,8 +97,8 @@ the QML file, and optionally, elements defined in Python that are exposed
to QML to be used.
You can write ``.qml`` files by hand, but also you can use tools like the
-QML Designer that is embedded in Qt Creator. Additionally, there are commercial
-tools like Qt Design Studio that allow you to load designs from other design
+*QML Designer* that is embedded in *Qt Creator*. Additionally, there are commercial
+tools like *Qt Design Studio* that allow you to load designs from other design
applications.
Here you can find an example of how a ``.qml`` file looks like.
@@ -128,11 +128,11 @@ message on it.
Qt Creator Python Project File ``.pyproject``
---------------------------------------------
-For Qt Creator to load and handle Python based projects, a special file is
+For *Qt Creator* to load and handle Python based projects, a special file is
needed, because C++ based projects could be handle from ``.qmake`` or
``CMakeLists.txt`` file, which are not used with Python-based projects.
-Old versions of Qt Creator, provided a simple format with the ``.pyqtc``
+Old versions of *Qt Creator*, provided a simple format with the ``.pyqtc``
extension, which were plain-text files with one-file-per-line::
library/server.py
diff --git a/sources/pyside6/doc/tutorials/pretutorial/whatisqt.rst b/sources/pyside6/doc/faq/whatisqt.rst
index 2dee661a7..3b42a9403 100644
--- a/sources/pyside6/doc/tutorials/pretutorial/whatisqt.rst
+++ b/sources/pyside6/doc/faq/whatisqt.rst
@@ -25,7 +25,7 @@ As a framework, Qt has many components, which are distributed by components
and modules, for example, `qtbase <https://code.qt.io/cgit/qt/qtbase.git/>`_
is the base component that holds many modules, like: ``QtCore``, ``QtGui``,
``QtWidgets``, ``QtNetwork``, etc.
-All those modules contains many classes that you can directly use, like the
+All those modules contains many classes that you can directly use, like the
case of the `Classes of QtCore <https://doc.qt.io/qt-6/qtcore-module.html>`_
from which you can find classes like ``QFile``, ``QTime``, ``QByteArray``, etc.
@@ -65,8 +65,8 @@ is not to affect the user experience compared to other included applications.
.. note:: You can adapt these applications to use your self-made style, but
you need to be aware that the goal of Widgets is to respect the system
- style, be careful when changing colors. Check this `simple tutorial
- <widgetstyling>`_ on how to do so.
+ style, be careful when changing colors. Check this
+ :ref:`simple tutorial <widgetstyling>` on how to do so.
QML
---
diff --git a/sources/pyside6/doc/tutorials/pretutorial/whatisshiboken.rst b/sources/pyside6/doc/faq/whatisshiboken.rst
index 67aafc4f8..bf6d19ab3 100644
--- a/sources/pyside6/doc/tutorials/pretutorial/whatisshiboken.rst
+++ b/sources/pyside6/doc/faq/whatisshiboken.rst
@@ -4,11 +4,9 @@ Binding Generation: What Is Shiboken?
=====================================
When you install ``PySide6`` you might have notice that also ``Shiboken6``
-is installed as a dependency:
+is installed as a dependency::
-.. code-block:: bash
-
- (env) [qt ~]$ pip install pyside6
+ $ pip install pyside6
Collecting pyside6
Downloading PySide6-6.0.0-6.0.0-cp36.cp37.cp38.cp39-abi3-manylinux1_x86_64.whl (170.5 MB)
|████████████████████████████████| 170.5 MB 42 kB/s
@@ -21,7 +19,7 @@ is installed as a dependency:
That installed package is also called **Shiboken Module**, and it contains
some utilities for PySide to properly work.
You can find more information about it on its
-`documentation page <https://doc.qt.io/qtforpython/shiboken6/shibokenmodule.html>`_
+`documentation page (module) <https://doc.qt.io/qtforpython/shiboken6/shibokenmodule.html>`_
There is a third package that does not get installed when you install PySide,
because it is not required, and it is called **Shiboken Generator**.
@@ -39,4 +37,4 @@ but on the other hand, if you want to work with your own bindings
or extend Qt/C++ applications with Python, you **need** it.
You can find all the information related to Shiboken on its
-`documentation page <https://doc.qt.io/qtforpython/shiboken6/>`_.
+`documentation page (generator) <https://doc.qt.io/qtforpython/shiboken6/>`_.
diff --git a/sources/pyside6/doc/tutorials/pretutorial/whichide.rst b/sources/pyside6/doc/faq/whichide.rst
index ec005a188..3afa79b7f 100644
--- a/sources/pyside6/doc/tutorials/pretutorial/whichide.rst
+++ b/sources/pyside6/doc/faq/whichide.rst
@@ -4,7 +4,7 @@ Which IDEs Are Compatible?
==========================
|project|, as any other Python module, can be used in any Python-compatible
-IDE, but not all of them will provide extra functionality like Qt Creator does.
+IDE, but not all of them will provide extra functionality like *Qt Creator* does.
Besides writing files, there are some external steps you might want to perform
in order to help the development of your applications:
@@ -15,8 +15,8 @@ From a terminal:
:command:`pyside6-uic -i form.ui -o ui_form.py`
* Generating a Python file from a ``.qrc`` file:
:command:`pyside6-rcc -i resources.qrc -o rc_resources.py`
-* Opening Qt Designer with the command :command:`pyside6-designer` to
- edit/create ``.ui`` files.
+* Opening *Qt Widgets Designer* with the command :command:`pyside6-designer`
+ to edit/create ``.ui`` files.
External add-ons/plugins from your favorite IDE might include configuration
steps to run these commands, or open external tools like Designer and
@@ -47,8 +47,10 @@ that you can install from VS Code while writing the following on the Quick Open
PyCharm
-------
-You can configure PyCharm to enable external tools, in |project| terms, Qt Designer, and
-Qt Creator. Go to ``File > Settings > tools > PyCharm External Tools``, and include the following
+You can configure PyCharm to enable external tools, in |project| terms,
+*Qt Widgets Designer*, and *Qt Creator*. Go to
+``File > Settings > tools > PyCharm External Tools``, and include the following
information to add them to your project.
-Later, you will be able to right click a ``.ui`` file, and select ``Qt Designer``,
-``pyside6-uic``, or any tool that you configured this way.
+Later, you will be able to right click a ``.ui`` file, and select
+``Qt Widgets Designer``, ``pyside6-uic``, or any tool that you configured this
+way.
diff --git a/sources/pyside6/doc/faq/whyqtforpython.rst b/sources/pyside6/doc/faq/whyqtforpython.rst
new file mode 100644
index 000000000..0f0ab9aaf
--- /dev/null
+++ b/sources/pyside6/doc/faq/whyqtforpython.rst
@@ -0,0 +1,203 @@
+.. _whyqtforpython:
+
+Why Qt for Python?
+==================
+
+.. image:: tiobe.png
+ :width: 0
+
+.. raw:: html
+
+ <div style="float: right; padding-left: 20px; max-width: 30%;
+ background-color: #e9eff5; padding-top: 5px;">
+ <img src="../_images/tiobe.png"
+ style="width: 90%;"
+ alt="TIOBE index for Python" />
+ <p style="font-size: 80%;">
+ Screenshot from
+ <a href="https://www.tiobe.com/tiobe-index/python/">tiobe.com/tiobe-index/python</a>,
+ on 2021.09.06
+ </p>
+ </div>
+
+To answer this question we need to take a step back, and talk a bit about
+languages.
+
+Python has been around for almost the same amount of years that Qt has,
+and similarly it has been growing, and transforming to become the most used,
+loved, and demanded language for many programming areas.
+
+Currently (2021), it's rare to be aware of Machine Learning and Artificial
+Intelligence, without having heard of Python. Similarly, when we hear about
+Data Science/Analysis/Engineering we know that it is most probably related
+to Python.
+
+One can validate this statements by public surveys that have been showing
+the evolution and preference of the Python language, like the StackOverflow
+Surveys of the lasts years:
+
++----------------------+-----------+-----------+-----------+
+| | 2019_ | 2020_ | 2021_ |
++======================+===========+===========+===========+
+| Most Loved Language | 2nd place | 3rd place | 6th place |
++----------------------+-----------+-----------+-----------+
+| Most Wanted Language | 1st place | 1st place | 1st place |
++----------------------+-----------+-----------+-----------+
+
+and the `TIOBE index`_ (image on the right).
+
+It's natural to think that this sources might not be enough to judge the
+language in general terms, but it certainly highlights a trend among
+developers around the world.
+
+Lowering the Qt Barrier
+-----------------------
+
+Veteran C++ developers will have no problem with setting up a Qt
+application from scratch, or even manage to understand a different
+code base written with Qt. In addition, many teams are multidisciplinary,
+and other project/company developers might not be fluent in C++.
+
+Python has been luring people into programming, and for the same reason
+it's not uncommon that even people with a different background are able
+to write code, meaning that different teams are enabled to speak
+"the same language".
+
+Creating Qt applications in Python requires only a few lines of code,
+and not much configuration is required to execute it. As an /unfair/
+example, let's check the code of a simple hello world application:
+
+.. tab-set::
+
+ .. tab-item:: C++ Header
+
+ .. code-block:: cpp
+
+ #ifndef MAINWINDOW_H
+ #define MAINWINDOW_H
+
+ #include <QMainWindow>
+ #include <QPushButton>
+
+ class MainWindow : public QMainWindow
+ {
+ Q_OBJECT
+ public:
+ MainWindow(QWidget *parent = nullptr);
+ private slots:
+ void handleButton();
+ private:
+ QPushButton *m_button;
+ };
+
+ #endif // MAINWINDOW_H
+
+ .. tab-item:: C++ Implementation
+
+ .. code-block:: cpp
+
+ #include "mainwindow.h"
+
+ MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+ {
+ m_button = new QPushButton("My Button", this);
+ connect(m_button, SIGNAL(clicked()), this,
+ SLOT(handleButton()));
+ }
+
+ void MainWindow::handleButton()
+ {
+ m_button->setText("Ready");
+ }
+
+ .. tab-item:: C++ Main
+
+ .. code-block:: cpp
+
+ #include <QApplication>
+ #include "mainwindow.h"
+
+ int main(int argc, char *argv[])
+ {
+ QApplication app(argc, argv);
+ MainWindow mainWindow;
+ mainWindow.show();
+ return app.exec(d);
+ }
+
+.. tab-set::
+
+ .. tab-item:: Python
+
+ .. code-block:: python
+
+ import sys
+ from pyside6.QtWidgets import (QApplication, QMainWindow,
+ QPushButton)
+
+ class MainWindow(QMainWindow):
+ def __init__(self, parent=None):
+ QMainWindow.__init__(self, parent)
+ self.button = QPushButton("My Button", self)
+ self.button.clicked.connect(self.handleButton)
+
+ def handleButton(self):
+ self.button.setText("Ready")
+
+ if __name__ == "__main__":
+ app = QApplication([])
+ mainWindow = MainWindow()
+ mainWindow.show()
+ sys.exit(app.exec())
+
+It's fair to say that most of the boilerplate code is provided by many
+good IDEs, like QtCreator, but using external tools certainly requires
+some practice to use them and get familiarized.
+
+Unity Makes Strength
+--------------------
+
+In our mission to enable more developers to enter the Qt World, it's
+important to note that this doesn't imply C++ developers are forgotten.
+
+Together with the bindings, Qt for Python provides our binding generator,
+Shiboken (Check :ref:`whatisshiboken`), whose functionality has
+extensibly been shown by talks on events such as those from our
+:ref:`video-gallery` section.
+
+Generating bindings between two languages it nothing new, but it has
+always been a non-trivial task, mainly for being as-compatible-as-possible
+when using external modules/libraries in your project.
+
+Shiboken's main use case is to extend Qt/C++ project's
+functionality, making them **scriptable**.
+
+What does it mean for an application to be scriptable?
+
+* enables a interpreted language to interact directly with the Qt/C++
+ application,
+* provide the option to modify and create components/elements of the
+ application from Python,
+* possibility to create a plugins/add-ons system for the application.
+* complement a process with external Python functionality.
+
+Check out this `Shiboken Webinar`_ for a hands-on example.
+
+Shiboken excels at Qt-dependent binding generation, meaning that
+any Qt/C++ project can be easily exposed to Python.
+In addition, Shiboken has proven its support for C++ projects (without Qt),
+as shown on event talks and `blog posts`.
+
+Adding Python support to well known solutions/projects is a pattern we keep
+seeing in the industry, on a broad range of devices.
+This is why we are working every day to improve the Qt for Python offering.
+
+We believe both Qt and Python will benefit from this interaction.
+
+.. _2019: https://insights.stackoverflow.com/survey/2019
+.. _2020: https://insights.stackoverflow.com/survey/2020
+.. _2021: https://insights.stackoverflow.com/survey/2021
+.. _`TIOBE index`: https://www.tiobe.com/tiobe-index/
+.. _`blog posts`: https://www.qt.io/blog/tag/qt-for-python
+.. _`Shiboken Webinar`: https://www.youtube.com/watch?v=wOMlDutOWXI
diff --git a/sources/pyside6/doc/gettingstarted-linux.rst b/sources/pyside6/doc/gettingstarted-linux.rst
deleted file mode 100644
index 34c22bd4d..000000000
--- a/sources/pyside6/doc/gettingstarted-linux.rst
+++ /dev/null
@@ -1,79 +0,0 @@
-Getting Started on Linux
-==========================
-
-Requirements
-------------
-
- * GCC
- * ``sphinx`` package for the documentation (optional).
- * Depending on your linux distribution, the following dependencies might also be required:
-
- * ``libgl-dev``, ``python-dev``, ``python-distutils``, and ``python-setuptools``.
-
-Building from source
---------------------
-
-Creating a virtual environment
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The ``venv`` module allows you to create a local, user-writeable copy of a python environment into
-which arbitrary modules can be installed and which can be removed after use::
-
- python -m venv testenv
- source testenv/bin/activate
- pip install -r requirements.txt # General dependencies, documentation, and examples.
-
-will create and use a new virtual environment, which is indicated by the command prompt changing.
-
-Setting up CLANG
-~~~~~~~~~~~~~~~~
-
-If you don't have libclang already in your system, you can download from the Qt servers::
-
- wget https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_100-based-linux-Rhel7.6-gcc5.3-x86_64.7z
-
-Extract the files, and leave it on any desired path, and then set these two required
-environment variables::
-
- 7z x libclang-release_100-based-linux-Rhel7.6-gcc5.3-x86_64.7z
- export CLANG_INSTALL_DIR=$PWD/libclang
-
-Getting PySide
-~~~~~~~~~~~~~~
-
-Cloning the official repository can be done by::
-
- git clone --recursive https://code.qt.io/pyside/pyside-setup
-
-Checking out the version that we want to build, for example 6.0::
-
- cd pyside-setup && git checkout 6.0
-
-.. note:: Keep in mind you need to use the same version as your Qt installation.
- Additionally, :command:`git checkout -b 6.0 --track origin/6.0` could be a better option
- in case you want to work on it.
-
-Building PySide
-~~~~~~~~~~~~~~~
-
-Check your Qt installation path, to specifically use that version of qmake to build PySide.
-for example, :command:`/opt/Qt/6.0.0/gcc_64/bin/qmake`.
-
-Build can take a few minutes, so it is recommended to use more than one CPU core::
-
- python setup.py build --qmake=/opt/Qt/6.0.0/gcc_64/bin/qmake --build-tests --ignore-git --parallel=8
-
-Installing PySide
-~~~~~~~~~~~~~~~~~
-
-To install on the current directory, just run::
-
- python setup.py install --qmake=/opt/Qt/6.0.0/gcc_64/bin/qmake --build-tests --ignore-git --parallel=8
-
-Test installation
-~~~~~~~~~~~~~~~~~
-
-You can execute one of the examples to verify the process is properly working.
-Remember to properly set the environment variables for Qt and PySide::
-
- python examples/widgets/widgets/tetrix.py
diff --git a/sources/pyside6/doc/gettingstarted-windows.rst b/sources/pyside6/doc/gettingstarted-windows.rst
deleted file mode 100644
index a8c27b17a..000000000
--- a/sources/pyside6/doc/gettingstarted-windows.rst
+++ /dev/null
@@ -1,83 +0,0 @@
-Getting Started on Windows
-==========================
-
-The Qt library has to be built with the same version of MSVC as Python and PySide, this can be
-selected when using the online installer.
-
-Requirements
-------------
-
- * `MSVC2017`_ (or MSVC2019) for Python 3 on Windows,
- * `OpenSSL`_ (optional for SSL support, Qt must have been configured using the same SSL library).
- * ``sphinx`` package for the documentation (optional).
-
-.. note:: Python 3.8.0 was missing some API required for PySide/Shiboken so it's not possible
- to use it for a Windows build.
-
-.. _MSVC2017: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools
-.. _OpenSSL: https://sourceforge.net/projects/openssl/
-
-Building from source on Windows 10
-----------------------------------
-
-Creating a virtual environment
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The ``venv`` module allows you to create a local, user-writeable copy of a python environment into
-which arbitrary modules can be installed and which can be removed after use::
-
- python -m venv testenv
- call testenv\Scripts\activate
- pip install -r requirements.txt # General dependencies, documentation, and examples.
-
-will create and use a new virtual environment, which is indicated by the command prompt changing.
-
-Setting up CLANG
-~~~~~~~~~~~~~~~~
-
-If you don't have libclang already in your system, you can download from the Qt servers,
-for example, ``libclang-release_100-based-windows-vs2019_64.7z``.
-
-Extract the files, and leave it on any desired path, for example, ``c:``, and then set these two
-required environment variables::
-
- set LLVM_INSTALL_DIR=c:\libclang
- set PATH=C:\libclang\bin;%PATH%
-
-Getting PySide
-~~~~~~~~~~~~~~
-
-Cloning the official repository can be done by::
-
- git clone --recursive https://code.qt.io/pyside/pyside-setup
-
-Checking out the version that we want to build, for example, 6.0::
-
- cd pyside-setup && git checkout 6.0
-
-.. note:: Keep in mind you need to use the same version as your Qt installation
-
-Building PySide
-~~~~~~~~~~~~~~~
-
-Check your Qt installation path, to specifically use that version of qmake to build PySide.
-for example, ``E:\Qt\6.0.0\msvc2019_64\bin\qmake.exe``.
-
-Build can take a few minutes, so it is recommended to use more than one CPU core::
-
- python setup.py build --qmake=c:\path\to\qmake.exe --openssl=c:\path\to\openssl\bin --build-tests --ignore-git --parallel=8
-
-Installing PySide
-~~~~~~~~~~~~~~~~~
-
-To install on the current directory, just run::
-
- python setup.py install --qmake=c:\path\to\qmake.exe --openssl=c:\path\to\openssl\bin --build-tests --ignore-git --parallel=8
-
-Test installation
-~~~~~~~~~~~~~~~~~
-
-You can execute one of the examples to verify the process is properly working.
-Remember to properly set the environment variables for Qt and PySide::
-
- python examples/widgets/widgets/tetrix.py
diff --git a/sources/pyside6/doc/gettingstarted.rst b/sources/pyside6/doc/gettingstarted.rst
deleted file mode 100644
index 58a5d646b..000000000
--- a/sources/pyside6/doc/gettingstarted.rst
+++ /dev/null
@@ -1,247 +0,0 @@
-|project| Getting Started
-==========================
-
-.. important:: This page is focused on building |project| **from source**.
- If you just want to install |pymodname|, you need to run: :command:`pip install pyside6`.
-
- For more details, refer to our `Quick Start`_ guide. Additionally, you can check the
- :ref:`FAQ <faq>` related to the project.
-
-.. _Quick Start: quickstart.html
-
-General Requirements
---------------------
-
-The following prerequisites must be installed before you build |project|.
-On **Linux** you might get them with your operating system package manager, on **macOS**
-you might get them with ``brew``, and on **Windows** you can download the installer from each
-website.
-
- * **Python**: 3.6+ `[official Python website] <https://www.python.org/downloads/>`_
- * **Qt:** 6.0+ `[online installer] <https://download.qt.io/official_releases/online_installers/>`_
- * **CMake:** 3.18+ `[official CMake website] <https://cmake.org/download/>`_
- * **Git:** 2.0+. `[official Git website] <https://git-scm.com/downloads>`_
- * **libclang:** The libclang library, recommended: version 10 for 6.0+.
- Prebuilt versions for each OS can be `downloaded here`_.
-
-.. _downloaded here: http://download.qt.io/development_releases/prebuilt/libclang/
-
-Guides per platform
--------------------
-
-You can refer to the following pages for platform specific instructions:
-
-.. raw:: html
-
- <table class="special">
- <colgroup>
- <col style="width: 200px" />
- <col style="width: 200px" />
- <col style="width: 200px" />
- </colgroup>
- <tr>
- <td><a href="gettingstarted-windows.html"><p><strong>Windows</strong></p></a></td>
- <td><a href="gettingstarted-macOS.html"><p><strong>macOS</strong></p></a></td>
- <td><a href="gettingstarted-linux.html"><p><strong>Linux</strong></p></a></td>
- </tr>
- </table>
-
-.. important:: The |project| does not yet support WebAssembly and the mobile operating
- systems (Android or iOS).
-
- Most Linux-based embedded OS provide PySide with their official
- package manager (for example, `Raspbian`_ and `ArchlinuxARM`_).
-
-.. _Raspbian: https://www.raspbian.org/
-.. _ArchlinuxARM: https://archlinuxarm.org/
-
-A normal building command will look like this::
-
- python setup.py install --qmake=/path/to/qmake \
- --ignore-git \
- --debug \
- --build-tests \
- --parallel=8 \
- --verbose-build \
- --module-subset=Core,Gui,Widgets
-
-Which will build and install the project with **debug** symbols, including the **tests**,
-using **ninja** (instead of make), and considering only the **module subset** of
-:mod:`QtCore <PySide6.QtCore>`, :mod:`QtGui <PySide6.QtGui>`, and
-:mod:`QtWidgets <PySide6.QtWidgets`.
-
-Other important options to consider are:
- * ``--cmake``, to specify the path to the cmake binary,
- * ``--reuse-build``, to rebuild only the modified files,
- * ``--openssl=/path/to/openssl/bin``, to use a different path for OpenSSL,
- * ``--standalone``, to copy over the Qt libraries into the final package to make it work on other
- machines,
- * ``--doc-build-online``, to build documentation using the online template.
-
-Testing the installation
-------------------------
-
-Once the installation finishes, you will be able to execute any of our examples::
-
- python examples/widgets/widgets/tetrix.py
-
-Running Tests
--------------
-
-Using the ``--build-tests`` option will enable us to run all the auto tests inside the project::
-
- python testrunner.py test > testlog.txt
-
-.. note:: On Windows, don't forget to have qmake in your path
- (:command:`set PATH=E:\\\Path\\\to\\\Qt\\\6.0.0\\\msvc2019_64\\\bin;%PATH%`)
-
-You can also run a specific test (for example ``qpainter_test``) by running::
-
- ctest -R qpainter_test --verbose
-
-.. _building_documentation:
-
-Building the documentation
---------------------------
-
-Starting from 5.15, there are two options to build the documentation:
-
-1. Building rst-only documentation (no API)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The process of parsing Qt headers to generate the PySide API documentation can take several
-minutes, this means that modifying a specific section of the rst files we currently have, might
-become a hard task.
-
-For this, you can install :command:`sphinx` on a virtual environment, and execute the following command::
-
- python setup.py build_rst_docs
-
-which will generate a ``html/`` directory with the following structure::
-
- html
- └── pyside6
- ├── index.html
- ├── ...
- └── shiboken6
- ├── index.html
- └── ...
-
-so you can open the main page ``html/pyside6/index.html`` on your browser to check the generated
-files.
-
-This is useful when updating the general sections of the documentation, adding tutorials,
-modifying the build instructions, and more.
-
-2. Building the documentation (rst + API)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The documentation is being generated using **qdoc** to get the API information, and also **sphinx**
-for the local Python related notes.
-
-The system required ``libxml2`` and ``libxslt``, also on the Python environment, ``sphinx`` and
-``graphviz`` need to be installed before running the installation process::
-
- pip install graphviz sphinx sphinx_tabs
-
-After installing ``graphviz``, the ``dot`` command needs to be in PATH, otherwise,
-the process will fail. Installing ``graphviz`` system-wide is also an option.
-
-Since the process rely on a Qt installation, you need to specify where the ``qtbase`` directory
-you will use with your ``qmake`` is located::
-
- export QT_SRC_DIR=/path/to/qtbase
-
-Once the build process finishes, you can go to the generated ``*_build/*_release/pyside6``
-directory, and run::
-
- ninja apidoc
-
-.. note:: The :command:`apidoc` make target builds offline documentation in QCH (Qt Creator Help)
- format by default. You can switch to building for the online use with the ``--doc-build-online``
- configure option.
-
-The target executes several steps:
-
-#. The ``qdoc`` tool is run over the Qt source code to produce documentation in WebXML format.
-#. ``shiboken6`` is run to extract the functions for which bindings exist from WebXML and convert it into RST.
-#. ``sphinx`` is run to produce the documentation in HTML format.
-
-Re-running the command will not execute step 1 unless the file
-``qdoc_output/webxml/qtcore-index.webxml`` is removed from the build tree.
-Similarly, step 2 will not be executed unless the file ``rst/PySide6/QtCore/index.rst``
-is removed.
-
-Finally, you will get a ``html`` directory containing all the generated documentation. The offline
-help files, ``PySide.qch`` and ``Shiboken.qch``, can be moved to any directory of your choice. You
-can find ``Shiboken.qch`` in the build directory, ``*_build\*_release\shiboken6\doc\html``.
-
-If you want to temporarily change a ``.rst`` file to examine the impact on
-formatting, you can re-run ``sphinx`` in the ``doc`` directory::
-
- sphinx-build rst html
-
-Viewing offline documentation
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The offline documentation (QCH) can be viewed using the Qt Creator IDE or Qt Assistant, which is
-a standalone application for viewing QCH files.
-
-To view the QCH using Qt Creator, following the instructions outlined in
-`Using Qt Creator Help Mode <https://doc.qt.io/qtcreator/creator-help.html>`_. If you chose to
-use Qt Assistant instead, use the following command to register the QCH file before launching
-Qt Assistant::
-
- assistant -register PySide.qch
-
-.. note:: Qt Assistant renders the QCH content using the QTextBrowser backend, which supports
- a subset of the CSS styles, However, Qt Creator offers an alternative litehtml-based
- backend, which offers better browsing experience. At the moment, this is not the default
- backend, so you have to select the litehtml backend
- explicitly under the ``General`` tab in ``Qt Creator >> Tools >> Options >> Help``.
-
-Using the internal tools
-------------------------
-
-A set of tools can be found under the ``tools/`` directory inside the ``pyside-setup`` repository.
-
-* ``checklibs.py``: Script to analyze dynamic library dependencies of Mach-O binaries.
- To use this utility, just run::
-
- python checklibs.py /path/to/some.app/Contents/MacOS/Some
-
- This script was fetched from this repository_.
-
-* ``create_changelog.py``: Script used to create the CHANGELOG that you can find in the ``dist/``
- directory. Usage::
-
- python create_changelog.py -r 6.0.1 -v v6.0.0..6.0 -t bug-fix
-
-* ``debug_windows.py``: This script can be used to find out why PySide modules
- fail to load with various DLL errors like Missing DLL or Missing symbol in DLL.
-
- You can think of it as a Windows version of :command:`ldd` / ``LD_DEBUG``.
-
- Underneath, it uses the :command:`cdb.exe` command line debugger and the :command:`gflags.exe`
- tool, which are installed with the latest Windows Kit.
-
- The aim is to help developers debug issues that they may encounter using the PySide imports on
- Windows. The user should then provide the generated log file.
-
- Incidentally it can also be used for any Windows executables, not just Python.
- To use it just run::
-
- python debug_windows.py
-
-* ``missing_bindings.py``: This script is used to compare the state of PySide and PyQt
- regarding available modules and classses. This content is displayed in our `wiki page`_,
- and can be used as follows::
-
- python missing_bindings.py --qt-version 6.0.1 -w all
-
-.. note:: The script relies on BeautifulSoup to parse the content and generate a list of the
- missing bindings.
-
-.. _repository: https://github.com/liyanage/macosx-shell-scripts/
-.. _`wiki page`: https://wiki.qt.io/Qt_for_Python_Missing_Bindings
-.. _BeautifulSoup: https://www.crummy.com/software/BeautifulSoup/
diff --git a/sources/pyside6/doc/gettingstarted/index.rst b/sources/pyside6/doc/gettingstarted/index.rst
new file mode 100644
index 000000000..9d36061ad
--- /dev/null
+++ b/sources/pyside6/doc/gettingstarted/index.rst
@@ -0,0 +1,572 @@
+Getting Started
+===============
+
+.. important:: This page is focused on building |project| **from source**.
+ If you just want to install |pymodname|, you need to run: :command:`pip install pyside6`.
+
+ For more details, refer to our :ref:`quick-start` guide. Additionally, you can check the
+ :ref:`FAQ <faq>` related to the project.
+
+.. _Quick Start: quickstart.html
+
+General Requirements
+--------------------
+
+The following prerequisites must be installed before you build |project|.
+On **Linux** you might get them with your operating system package manager, on **macOS**
+you might get them with ``brew``, and on **Windows** you can download the installer from each
+website.
+
+* **Python**: 3.9+ `[official Python website] <https://www.python.org/downloads/>`_
+* **Qt:** 6.4+ `[online installer] <https://download.qt.io/official_releases/online_installers/>`_
+* **CMake:** 3.18+ `[official CMake website] <https://cmake.org/download/>`_
+* **Git:** 2.0+. `[official Git website] <https://git-scm.com/downloads>`_
+* **libclang:** The libclang library, recommended: version 10 for 6.0+.
+ Prebuilt versions for each OS can be `downloaded here`_.
+* Check the `Supported Platforms of Qt`_
+
+.. _downloaded here: https://download.qt.io/development_releases/prebuilt/libclang/
+.. _`Supported Platforms of Qt` : https://doc.qt.io/qt-6/supported-platforms.html
+
+Guides per platform
+-------------------
+
+.. toctree::
+ :maxdepth: 1
+ :hidden:
+
+ linux.rst
+ macOS.rst
+ windows.rst
+ package_details.rst
+ porting_from2.rst
+
+You can refer to the following pages for platform specific instructions:
+
+.. grid:: 1 3 3 3
+ :gutter: 2
+
+ .. grid-item-card::
+ :img-top: ../images/windows.svg
+ :class-item: text-center
+
+ +++
+ .. button-ref:: windows
+ :color: primary
+ :outline:
+ :expand:
+
+ Windows
+
+ .. grid-item-card::
+ :img-top: ../images/macos.svg
+ :class-item: text-center
+
+ +++
+ .. button-ref:: macOS
+ :color: primary
+ :outline:
+ :expand:
+
+ macOS
+
+ .. grid-item-card::
+ :img-top: ../images/linux.svg
+ :class-item: text-center
+
+ +++
+ .. button-ref:: linux
+ :color: primary
+ :outline:
+ :expand:
+
+ Linux
+
+.. important:: |project| does not yet support WebAssembly and the mobile operating systems (Android or iOS).
+ Most Linux-based embedded OS provide PySide with their official
+ package manager (for example, `Raspbian`_ and `ArchlinuxARM`_).
+
+.. _Raspbian: https://www.raspbian.org/
+.. _ArchlinuxARM: https://archlinuxarm.org/
+
+A normal building command will look like this::
+
+ python setup.py install --qtpaths=/path/to/qtpaths \
+ --ignore-git \
+ --debug \
+ --build-tests \
+ --parallel=8 \
+ --verbose-build \
+ --module-subset=Core,Gui,Widgets
+
+Which will build and install the project with **debug** symbols, including the **tests**,
+using **ninja** (instead of make), and considering only the **module subset** of
+:mod:`QtCore <PySide6.QtCore>`, :mod:`QtGui <PySide6.QtGui>`, and
+:mod:`QtWidgets <PySide6.QtWidgets>`.
+
+`CMake Unity Build Mode`_ is used by default for speed-up.
+
+Other important options to consider are:
+ * ``--cmake``, to specify the path to the cmake binary,
+ * ``--reuse-build``, to rebuild only the modified files,
+ * ``--openssl=/path/to/openssl/bin``, to use a different path for OpenSSL,
+ * ``--standalone``, to copy over the Qt libraries into the final package to make it work on other
+ machines,
+ * ``--build-docs``, to enable the documentation build.
+ * ``--doc-build-online``, to build documentation using the online template (by
+ default it uses the offline)
+
+Testing the installation
+------------------------
+
+Once the installation finishes, you will be able to execute any of our examples::
+
+ python examples/widgets/widgets/tetrix.py
+
+Running Tests
+-------------
+
+Using the ``--build-tests`` option will enable us to run all the auto tests inside the project::
+
+ python testrunner.py test > testlog.txt
+
+.. note:: On Windows, don't forget to have qtpaths in your path
+ (:command:`set PATH=C:\\\Path\\\to\\\Qt\\\6.4.0\\\msvc2019_64\\\bin;%PATH%`)
+
+You can also run a specific test (for example ``qpainter_test``) by running::
+
+ ctest -R qpainter_test --verbose
+
+.. _cross_compilation:
+
+Cross Compilation
+-----------------
+
+Starting from 6.3, it is possible to cross-compile Shiboken (module), and
+PySide. This functionality is still in Technical Preview, which means it could
+change in the future releases.
+
+.. important:: The only supported configuration is using a host Linux
+ machine to cross-compile to a Linux target platform.
+
+Cross compiling software is a valid use case that many projects rely on,
+however, it is a complicated process that might fail due to many reasons.
+
+Before starting with the process, it is important to understand the details of
+the build system, and the goal of cross compilation.
+
+In the build process, a ``Host`` is the computer you are currently using to
+compile, and a ``Target`` is your embedded device that you are compiling for.
+
+Qt for Python is being built using setuptools, and relies on a ``setup.py`` file
+that is called recursively to build Shiboken (module),
+Shiboken (generator), and PySide. As the generator is creating
+the wrappers for the bindings, it's not cross compiled
+for the target.
+Only the Shiboken (module) and PySide are cross compiled.
+
+The building process requires a Qt installation, and a Python interpreter
+on both the host, and the target. The used Qt versions on both platforms
+should have the same minor version. That is, Qt 6.3 (host)
+cannot be used with a Qt 6.2 (target), or the other way around.
+
+.. note:: It is recommended to use the same version of Qt on both host and target to avoid possible
+ unconventional errors.
+
+Prerequisites
+~~~~~~~~~~~~~
+
+First and foremost, you need to have access to the target device because you
+need to copy several system files (sysroot). We recommend a Linux OS that has
+the latest Qt versions, like `Manjaro ARM`_ or `Archlinux ARM`_.
+
+* (target) Install Qt 6.3+ on the system using the package manager.
+* (host) Install Qt 6.3+ on the system using the package manager or Qt
+ Installer.
+* (target, host) Install the library and development packages that provide
+ C++ headers, linkers, libraries, and compilers.
+* (target, host) Install Python interpreter v3.7 or later
+* (target, host) Install CMake 3.17+
+
+After installing these prerequisites, copy the ``target`` sysroot to your
+``host`` computer. This process is tricky, because copying system files from
+another computer might cause problems with the symbolic links. Here you
+have two options to achieve that.
+
+Option A: Copying the files
+***************************
+
+Create a directory to copy the sysroot of your target device,
+for example ``rpi-sysroot``, and perform the copy on your host computer:
+
+.. code-block:: bash
+
+ rsync -vR --progress -rl --delete-after --safe-links \
+ USERNAME@TARGET_IP:/{lib,usr,opt/vc/lib} rpi-sysroot/
+
+Ensure to replace ``USERNAME`` and ``TARGET_IP`` with your system appropriate
+values.
+
+Option B: Packaging the file system
+***********************************
+
+Create a package for your sysroot in your target:
+
+.. code-block:: bash
+
+ tar cfJ ~/sysroot.tar.xz /lib /usr /opt/vc/lib
+
+Copy the package from the target to your host:
+
+.. code-block:: bash
+
+ rsync -vR --progress USERNAME@TARGET_IP:sysroot.tar.xz .
+
+Once you have the tar file, unpack it inside a ``rpi-sysroot`` directory.
+
+Fix Symlinks
+************
+
+It is recommended to run the following script to fix
+most of the issues you would find with symbolic links:
+
+.. code-block:: python
+
+ import sys
+ from pathlib import Path
+ import os
+
+ # Take a sysroot directory and turn all the absolute symlinks and turn them into
+ # relative ones such that the sysroot is usable within another system.
+
+ if len(sys.argv) != 2:
+ print(f"Usage is {sys.argv[0]} <sysroot-directory>")
+ sys.exit(-1)
+
+ topdir = Path(sys.argv[1]).absolute()
+
+ def handlelink(filep, subdir):
+ link = filep.readlink()
+ if str(link)[0] != "/":
+ return
+ if link.startswith(topdir):
+ return
+ relpath = os.path.relpath((topdir / link).resolve(), subdir)
+ os.unlink(filep)
+ os.symlink(relpath, filep)
+
+ for f in topdir.glob("**/*"):
+ if f.is_file() and f.is_symlink():
+ handlelink(f, f.parent)
+
+Setting up the toolchain
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+To perform the cross compilation, you need a special set of compilers,
+libraries, and headers, which runs on the host architecture, but generates
+(binaries/executables) for a target architecture.
+For example, from x86_64 to aarch64.
+
+It is recommended to use the official 10.2 `ARM Developer cross compilers`_,
+which you can find on their official website. For this tutorial, we choose
+``aarch64`` target architecture and we will assume that you downloaded the
+`gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu.tar.xz`_ file,
+and unpacked it.
+
+With those compilers, now you need a CMake toolchain file. This is
+a configuration file to set the compilers and sysroot information, together
+with extra options like compilation flags, and other details. You can use the
+following file as an example, but keep in mind they might vary:
+
+.. code-block:: cmake
+
+ # toolchain-aarch64.cmake
+ cmake_minimum_required(VERSION 3.18)
+ include_guard(GLOBAL)
+
+ set(CMAKE_SYSTEM_NAME Linux)
+ set(CMAKE_SYSTEM_PROCESSOR aarch64)
+
+ set(TARGET_SYSROOT /path/to/your/target/sysroot)
+ set(CROSS_COMPILER /path/to/your/crosscompiling/compilers/)
+
+ set(CMAKE_SYSROOT ${TARGET_SYSROOT})
+
+ set(ENV{PKG_CONFIG_PATH} "")
+ set(ENV{PKG_CONFIG_LIBDIR} ${CMAKE_SYSROOT}/usr/lib/pkgconfig:${CMAKE_SYSROOT}/usr/share/pkgconfig)
+ set(ENV{PKG_CONFIG_SYSROOT_DIR} ${CMAKE_SYSROOT})
+
+ set(CMAKE_C_COMPILER ${CROSS_COMPILER}/aarch64-none-linux-gnu-gcc)
+ set(CMAKE_CXX_COMPILER ${CROSS_COMPILER}/aarch64-none-linux-gnu-g++)
+
+ set(QT_COMPILER_FLAGS "-march=armv8-a")
+ set(QT_COMPILER_FLAGS_RELEASE "-O2 -pipe")
+ set(QT_LINKER_FLAGS "-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed")
+
+ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
+
+ include(CMakeInitializeConfigs)
+
+ function(cmake_initialize_per_config_variable _PREFIX _DOCSTRING)
+ if (_PREFIX MATCHES "CMAKE_(C|CXX|ASM)_FLAGS")
+ set(CMAKE_${CMAKE_MATCH_1}_FLAGS_INIT "${QT_COMPILER_FLAGS}")
+
+ foreach (config DEBUG RELEASE MINSIZEREL RELWITHDEBINFO)
+ if (DEFINED QT_COMPILER_FLAGS_${config})
+ set(CMAKE_${CMAKE_MATCH_1}_FLAGS_${config}_INIT "${QT_COMPILER_FLAGS_${config}}")
+ endif()
+ endforeach()
+ endif()
+
+ if (_PREFIX MATCHES "CMAKE_(SHARED|MODULE|EXE)_LINKER_FLAGS")
+ foreach (config SHARED MODULE EXE)
+ set(CMAKE_${config}_LINKER_FLAGS_INIT "${QT_LINKER_FLAGS}")
+ endforeach()
+ endif()
+
+ _cmake_initialize_per_config_variable(${ARGV})
+ endfunction()
+
+You need to adjust the paths in these two lines::
+
+ set(TARGET_SYSROOT /path/to/your/target/sysroot)
+ set(CROSS_COMPILER /path/to/your/crosscompiling/compilers/)
+
+and replace them with the sysroot directory (the one we called ``rpi-sysroot``),
+and the compilers (the ``gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu/bin`` directory).
+
+
+Cross compiling PySide
+~~~~~~~~~~~~~~~~~~~~~~
+
+After you have installed the prerequisites and copied the necessary files, you
+should have the following:
+
+* The compilers to cross compile (``gcc-argm-10.2-...``),
+* The target sysroot (``rpi-sysroot``),
+* The toolchain cmake file (``toolchain-aarch64.cmake``),
+* The ``pyside-setup`` repository,
+
+An example of the ``setup.py`` invocation might look like the following:
+
+.. code-block:: bash
+
+ python setup.py bdist_wheel \
+ --parallel=8 --ignore-git --reuse-build --standalone --limited-api=yes \
+ --cmake-toolchain-file=/opt/toolchain-aarch64.cmake \
+ --qt-host-path=/opt/Qt/6.3.0/gcc_64 \
+ --plat-name=linux_aarch64
+
+Depending on the target platform, you could use ``linux_armv7``,
+``linux_aarch64``, etc.
+
+For embedded platforms, which typically do not have Qt and its tools fully
+built, the option ``--no-qt-tools`` can be used to prevent the bundling of the
+tools.
+
+If the process succeeds, you will find the target wheels in your ``dist/``
+directory, for example:
+
+.. code-block:: bash
+
+ PySide6-6.3.0-6.3.0-cp36-abi3-manylinux2014_aarch64.whl
+ shiboken6-6.3.0-6.3.0-cp36-abi3-manylinux2014_aarch64.whl
+
+
+Troubleshooting
+***************
+
+* If the auto-detection mechanism fails to find the Python or Qt installations
+ you have in your target device, you can use two additional options::
+
+ --python-target-path=...
+
+ and::
+
+ --qt-target-path=...
+
+* In case the automatic build of the host Shiboken (generator) fails,
+ you can specify the custom path using::
+
+ --shiboken-host-path=...
+
+.. _`Manjaro ARM`: https://manjaro.org/download/#ARM
+.. _`Archlinux ARM`: https://archlinuxarm.org
+.. _`ARM Developer Cross Compilers`: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads
+.. _`gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu.tar.xz`: https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu.tar.xz
+
+.. _building_documentation:
+
+Building the documentation
+--------------------------
+
+Starting from 6.3, the documentation is not being built by default.
+When using the second option described in this section, make sure to use the
+``--build-docs`` option.
+
+Install the specific documentation requirements in your Python virtual
+environment::
+
+ pip install -r requirements-doc.txt
+
+You can find the ``requirements-doc.txt`` file in the root of the repository.
+
+Starting from 5.15, there are two options to build the documentation:
+
+1. Building the base documentation (no API)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The process of parsing Qt headers to generate the PySide API documentation can take several
+minutes, this means that modifying a specific section of the documentation we currently have, might
+become a hard task. You may only care about the base documentation, which comprises all the
+documentation except for the API documentation.
+
+To generate this, execute the following command::
+
+ python setup.py build_base_docs
+
+This will generate an ``html/`` directory with the following structure::
+
+ html
+ └── pyside6
+ ├── index.html
+ ├── ...
+ └── shiboken6
+ ├── index.html
+ └── ...
+
+so you can open the main page ``html/pyside6/index.html`` on your browser to check the generated
+files.
+
+This is useful when updating the general sections of the documentation, adding tutorials,
+modifying the build instructions, and more.
+
+.. note:: In case you are interested in only generating the Example Gallery,
+ you would need to run ``python tools/example_gallery/main.py`` to
+ generate the examples ``documentation`` for the gallery. This will
+ also be used internally by the ``build_base_docs`` target
+
+
+2. Building the documentation (Base + API)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The documentation is being generated using **qdoc** to get the API information, and also **sphinx**
+for the local Python related notes.
+
+The system requires the ``libxml2`` and ``libxslt`` libraries.
+
+After installing ``graphviz`` (included in the ``requirements-doc.txt`` file),
+the ``dot`` command needs to be in PATH, otherwise,
+the process will fail. Installing ``graphviz`` system-wide is also an option.
+
+Since the process relies on a Qt installation, you need to specify where the
+``qtbase`` directory of a Qt source tree is located by passing it to
+the command line option ``--qt-src-dir``.
+
+Once the common ``setup.py`` build process finishes (remember to use
+``--build-docs`` to enable the documentation build, and ``--doc-build-online``
+to get the HTML files), you can go to the generated
+``build/<your_env_name>/build/pyside6`` directory, and run::
+
+ ninja apidoc
+
+You can add ``-j X``, to perform the build process in parallel with
+X processes.
+
+.. note:: The :command:`apidoc` make target builds offline documentation in ``QCH``
+ (Qt Compressed Help) format by default. You can switch to building for the
+ online use with the ``--doc-build-online`` configure option.
+
+The target executes several steps:
+
+#. The ``qdoc`` tool is run over the Qt source code to produce documentation in WebXML format.
+#. ``shiboken6`` is run to extract the functions for which bindings exist from WebXML and convert it into RST.
+#. ``sphinx`` is run to produce the documentation in HTML format.
+
+Re-running the command will not execute step 1 unless the file
+``qdoc-output/webxml/qtcore-index.webxml`` is removed from the build tree.
+Similarly, step 2 will not be executed unless the file ``base/PySide6/QtCore/index.rst``
+is removed.
+
+Finally, you will get a ``html`` directory containing all the generated documentation. The offline
+help files, ``PySide.qch`` and ``Shiboken.qch``, can be moved to any directory of your choice. You
+can find ``Shiboken.qch`` in the build directory, ``build/<your_env_name>/build/shiboken6/doc/html``.
+
+If you want to temporarily change a ``.rst`` file to examine the impact on
+formatting, you can re-run ``sphinx`` in the ``doc`` directory::
+
+ sphinx-build base html
+
+Viewing offline documentation
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The offline documentation (QCH) can be viewed using the *Qt Creator* IDE or
+*Qt Assistant*, which is a standalone application for viewing QCH files.
+
+To view the QCH using *Qt Creator*, following the instructions outlined in
+`Using Qt Creator Help Mode <https://doc.qt.io/qtcreator/creator-help.html>`_.
+If you chose to use *Qt Assistant* instead, use the following command to register
+the QCH file before launching *Qt Assistant*::
+
+ assistant -register PySide.qch
+
+Troubleshooting documentation
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The documentation uses intersphinx to link from the PySide to the
+Shiboken documentation. This can fail if
+
+* the default ``QCH`` format is used; in which case the required ``objects.inv``
+ files are not generated. Use ``--doc-build-online``.
+* base and full doc builds are mixed, resulting in wrong values for the
+ intersphinx location in the CMake files. Re-run ``cmake`` to fix this.
+
+Using the internal tools
+------------------------
+
+A set of tools can be found under the ``tools/`` directory inside the ``pyside-setup`` repository.
+
+* ``checklibs.py``: Script to analyze dynamic library dependencies of Mach-O binaries.
+ To use this utility, just run::
+
+ python checklibs.py /path/to/some.app/Contents/MacOS/Some
+
+ This script was fetched from this repository_.
+
+* ``create_changelog.py``: Script used to create the CHANGELOG that you can find in the ``dist/``
+ directory. Usage::
+
+ python create_changelog.py -r 6.0.1 -v v6.0.0..6.0 -t bug-fix
+
+* ``debug_windows.py``: This script can be used to find out why PySide modules
+ fail to load with various DLL errors like Missing DLL or Missing symbol in DLL.
+
+ You can think of it as a Windows version of :command:`ldd` / ``LD_DEBUG``.
+
+ Underneath, it uses the :command:`cdb.exe` command line debugger and the :command:`gflags.exe`
+ tool, which are installed with the latest Windows Kit.
+
+ The aim is to help developers debug issues that they may encounter using the PySide imports on
+ Windows. The user should then provide the generated log file.
+
+ Incidentally it can also be used for any Windows executables, not just Python.
+ To use it just run::
+
+ python debug_windows.py
+
+* ``missing_bindings.py``: This script is used to compare the state of PySide and PyQt
+ regarding available modules and classses. This content is displayed in our `wiki page`_,
+ and can be used as follows::
+
+ python missing_bindings.py --qt-version 6.0.1 -w all
+
+.. note:: The script relies on BeautifulSoup to parse the content and generate a list of the
+ missing bindings.
+
+.. _repository: https://github.com/liyanage/macosx-shell-scripts/
+.. _`wiki page`: https://wiki.qt.io/Qt_for_Python_Missing_Bindings
+.. _BeautifulSoup: https://www.crummy.com/software/BeautifulSoup/
+.. _`CMake Unity Build Mode` : https://cmake.org/cmake/help/latest/prop_tgt/UNITY_BUILD.html
diff --git a/sources/pyside6/doc/gettingstarted/linux.rst b/sources/pyside6/doc/gettingstarted/linux.rst
new file mode 100644
index 000000000..912105ef8
--- /dev/null
+++ b/sources/pyside6/doc/gettingstarted/linux.rst
@@ -0,0 +1,115 @@
+Getting Started on Linux
+==========================
+
+Requirements
+------------
+
+* GCC
+* ``sphinx`` package for the documentation (optional).
+* Depending on your linux distribution, the following dependencies might also be required:
+
+ * ``libgl-dev``, ``python-dev``, and ``python-setuptools``.
+* Check the platform dependencies of `Qt for Linux/X11`_.
+
+Building from source
+--------------------
+
+Creating a virtual environment
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``venv`` module allows you to create a local, user-writeable copy of a python environment into
+which arbitrary modules can be installed and which can be removed after use::
+
+ python -m venv testenv
+ source testenv/bin/activate
+
+will create and use a new virtual environment, which is indicated by the command prompt changing.
+
+Setting up CLANG
+~~~~~~~~~~~~~~~~
+
+If you don't have libclang already in your system, you can download from the Qt servers::
+
+ wget https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_140-based-linux-Rhel8.2-gcc9.2-x86_64.7z
+
+Extract the files, and leave it on any desired path, and set the environment
+variable required::
+
+ 7z x libclang-release_140-based-linux-Rhel8.2-gcc9.2-x86_64.7z
+ export LLVM_INSTALL_DIR=$PWD/libclang
+
+Getting the source
+~~~~~~~~~~~~~~~~~~
+
+Cloning the official repository can be done by::
+
+ git clone https://code.qt.io/pyside/pyside-setup
+
+Checking out the version that we want to build, for example 6.5::
+
+ cd pyside-setup && git checkout 6.5
+
+Install the general dependencies::
+
+ pip install -r requirements.txt
+
+.. note:: Keep in mind you need to use the same version as your Qt installation.
+ Additionally, :command:`git checkout -b 6.5 --track origin/6.5` could be a better option
+ in case you want to work on it.
+
+Building and Installing (setuptools)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``setuptools`` approach uses the ``setup.py`` file to execute the build,
+install, and packaging steps.
+
+Check your Qt installation path, to specifically use that version of qtpaths to build PySide.
+for example, :command:`/opt/Qt/6.5.0/gcc_64/bin/qtpaths`.
+
+Build can take a few minutes, so it is recommended to use more than one CPU core::
+
+ python setup.py build --qtpaths=/opt/Qt/6.5.0/gcc_64/bin/qtpaths --build-tests --ignore-git --parallel=8
+
+To install on the current directory, just run::
+
+ python setup.py install --qtpaths=/opt/Qt/6.5.0/gcc_64/bin/qtpaths --build-tests --ignore-git --parallel=8
+
+Building and Installing (cmake)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``setuptools`` approach includes internal ``CMake`` calls when
+building and installing the project, but a CMake-only approach is only
+recommended for packaging the project for distribution builds.
+
+Assumming that Qt is in PATH, for example, the configure step can be done with::
+
+ cmake -B /path/to/the/build/directory \
+ -S /path/to/the/pyside-setup \
+ -DCMAKE_INSTALL_PREFIX=/where/to/install \
+ -DPython_EXECUTABLE=/path/to/interpreter
+
+.. note:: You can add `-DFORCE_LIMITED_API=yes` in case you want to have a
+ build which will be compatible with Python 3.7+.
+
+and then for building::
+
+ cmake --build /path/to/the/build/directory --parallel X
+
+where `X` is the amount of processes you want to use.
+Finally, the install step can be done with::
+
+ cmake --install /path/to/the/build/directory
+
+.. note:: You can build only pyside6 or only shiboken6 by using
+ the diferent source directories with the option `-S`.
+
+
+Test installation
+~~~~~~~~~~~~~~~~~
+
+You can execute one of the examples to verify the process is properly working.
+Remember to properly set the environment variables for Qt and PySide::
+
+ python examples/widgets/widgets/tetrix.py
+
+.. _`Qt for Linux/X11`: https://doc.qt.io/qt-6/linux.html
diff --git a/sources/pyside6/doc/gettingstarted-macOS.rst b/sources/pyside6/doc/gettingstarted/macOS.rst
index 1033bef78..ff457a4e2 100644
--- a/sources/pyside6/doc/gettingstarted-macOS.rst
+++ b/sources/pyside6/doc/gettingstarted/macOS.rst
@@ -4,14 +4,16 @@ Getting Started on macOS
Requirements
------------
- * `XCode`_ 8.2 (macOS 10.11), 8.3.3 (macOS 10.12), 9 (macOS 10.13), 10.1 (macOS 10.14)
- * ``sphinx`` package for the documentation (optional).
- * Depending on your OS, the following dependencies might also be required:
+* `XCode`_ 8.2 (macOS 10.11), 8.3.3 (macOS 10.12), 9 (macOS 10.13), 10.1 (macOS 10.14)
+* ``sphinx`` package for the documentation (optional).
+* Depending on your OS, the following dependencies might also be required:
- * ``libgl-dev``, ``python-dev``, ``python-distutils``, and ``python-setuptools``.
+ * ``libgl-dev``, ``python-dev``, and ``python-setuptools``.
-.. _XCode: https://developer.apple.com/xcode/
+* Check the platform dependencies of `Qt for macOS`_.
+.. _XCode: https://developer.apple.com/xcode/
+.. _`Qt for macOS`: https://doc.qt.io/qt-6/macos.html
Building from source
--------------------
@@ -24,7 +26,6 @@ which arbitrary modules can be installed and which can be removed after use::
python -m venv testenv # your interpreter could be called 'python3'
source testenv/bin/activate
- pip install -r requirements.txt # General dependencies, documentation, and examples.
will create and use a new virtual environment, which is indicated by the command prompt changing.
@@ -33,43 +34,47 @@ Setting up CLANG
If you don't have libclang already in your system, you can download from the Qt servers::
- wget http://download.qt.io/development_releases/prebuilt/libclang/libclang-release_100-based-mac.7z
+ wget https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_140-based-macos-universal.7z
-Extract the files, and leave it on any desired path, and then set these two required
-environment variables::
+Extract the files, and leave it on any desired path, and set the environment
+variable required::
- 7z x libclang-release_100-based-mac.7z
- export CLANG_INSTALL_DIR=$PWD/libclang
+ 7z x libclang-release_140-based-macos-universal.7z
+ export LLVM_INSTALL_DIR=$PWD/libclang
Getting PySide
~~~~~~~~~~~~~~
Cloning the official repository can be done by::
- git clone --recursive https://code.qt.io/pyside/pyside-setup
+ git clone https://code.qt.io/pyside/pyside-setup
+
+Checking out the version that we want to build, for example, 6.5::
+
+ cd pyside-setup && git checkout 6.5
-Checking out the version that we want to build, for example, 6.0::
+Install the general dependencies::
- cd pyside-setup && git checkout 6.0
+ pip install -r requirements.txt
.. note:: Keep in mind you need to use the same version as your Qt installation
Building PySide
~~~~~~~~~~~~~~~
-Check your Qt installation path, to specifically use that version of qmake to build PySide.
-for example, ``/opt/Qt/6.0.0/gcc_64/bin/qmake``.
+Check your Qt installation path, to specifically use that version of qtpaths to build PySide.
+for example, ``/opt/Qt/6.5.0/gcc_64/bin/qtpaths``.
Build can take a few minutes, so it is recommended to use more than one CPU core::
- python setup.py build --qmake=/opt/Qt/6.0.0/gcc_64/bin/qmake --build-tests --ignore-git --parallel=8
+ python setup.py build --qtpaths=/opt/Qt/6.5.0/gcc_64/bin/qtpaths --build-tests --ignore-git --parallel=8
Installing PySide
~~~~~~~~~~~~~~~~~
To install on the current directory, just run::
- python setup.py install --qmake=/opt/Qt/6.0.0/gcc_64/bin/qmake --build-tests --ignore-git --parallel=8
+ python setup.py install --qtpaths=/opt/Qt/6.5.0/gcc_64/bin/qtpaths --build-tests --ignore-git --parallel=8
Test installation
~~~~~~~~~~~~~~~~~
diff --git a/sources/pyside6/doc/gettingstarted/package_details.rst b/sources/pyside6/doc/gettingstarted/package_details.rst
new file mode 100644
index 000000000..113edb686
--- /dev/null
+++ b/sources/pyside6/doc/gettingstarted/package_details.rst
@@ -0,0 +1,75 @@
+.. _package_details:
+
+Package Details
+===============
+
+Having a large project as the Qt Framework available from one simple
+installation line::
+
+ pip install pyside6
+
+is really beneficial,
+but it might be confusing to newcomers.
+
+Besides your IDE, you don't need to install anything else to develop your
+Qt application, because the same command installs many tools
+that will help you design UIs, use QML types, generate
+files automatically, translate applications, etc.
+
+Package Dependencies
+--------------------
+
+.. image:: packages.png
+ :width: 400
+ :alt: Packages structure and dependency
+
+Starting from 6.3.0, the ``pyside6`` package (wheel) is almost empty,
+and only includes references to other packages that are required
+to properly use all the modules.
+This packages are:
+
+* ``pyside6-essentials``, `essential Qt modules <https://pypi.org/project/PySide6-Essentials/>`_,
+* ``pyside6-addons``, `additional Qt modules <https://pypi.org/project/PySide6-Addons/>`_,
+* ``shiboken6``, a utility Python module.
+
+You can verify this by running ``pip list`` to check the installed
+packages in your Python (virtual) environment::
+
+ (env) % pip list
+ Package Version
+ ------------------ -------
+ pip 22.0.4
+ PySide6 6.3.0
+ PySide6-Addons 6.3.0
+ PySide6-Essentials 6.3.0
+ setuptools 58.1.0
+ shiboken6 6.3.0
+
+Both ``pyside6-essentials`` and ``pyside6-addons`` contain Qt binaries
+(``.so``, ``.dll``, or ``.dylib``) that are used by the Python wrappers
+that enable you to use the Qt modules from Python.
+For example, in the ``QtCore`` module, you will find
+on Linux:
+
+* ``PySide6/QtCore.abi3.so``, and
+* ``PySide6/Qt/lib/libQt6Core.so.6``
+
+inside the ``site-packages`` directory of your (virtual) environment.
+The first is the *importable* module which depends on the second file
+which is the original QtCore library.
+
+.. note:: The package ``shiboken6-generator`` is not a dependency,
+ and it's not available on PyPi. The reason, is that it depends on
+ ``libclang``, which is a large library that we don't package, and
+ requires a special configuration for you to use. Check the `Shiboken
+ Documentation`_ for more details.
+
+..
+ Adding the full URL because it's a different sphinx project.
+.. _`Shiboken Documentation`: https://doc.qt.io/qtforpython/shiboken6/gettingstarted.html
+
+Tools Included
+--------------
+
+PySide6 comes bundled with a set of tools that assist in making the development experience with
+PySide6 more efficient. The list of tools can be found :ref:`here <package_tools>`.
diff --git a/sources/pyside6/doc/gettingstarted/packages.png b/sources/pyside6/doc/gettingstarted/packages.png
new file mode 100644
index 000000000..57e7ca47d
--- /dev/null
+++ b/sources/pyside6/doc/gettingstarted/packages.png
Binary files differ
diff --git a/sources/pyside6/doc/gettingstarted/porting_from2.rst b/sources/pyside6/doc/gettingstarted/porting_from2.rst
new file mode 100644
index 000000000..6699f54e0
--- /dev/null
+++ b/sources/pyside6/doc/gettingstarted/porting_from2.rst
@@ -0,0 +1,94 @@
+Porting Applications from PySide2 to PySide6
+============================================
+
+Module Availability
+-------------------
+
+Qt for Python 6.2.0 provides all modules planned for inclusion in Qt 6.
+
+Module-Level Changes
+--------------------
+
+* The modules *QtMacExtras*, *Qt Quick Controls 1*, *QtWinExtras*,
+ *QtXmlPatterns* and *QtX11Extras* have been removed.
+* ``QStateMachine`` and related classes have been extracted to a new
+ *QtStateMachine* module.
+* The modules *QtWebKit* and *QtWebKitWidgets* have been replaced by the new
+ *QtWebEngineCore*, *QtWebEngineQuick* and *QtWebEngineWidgets* modules.
+* ``QXmlReader`` and related classes (*SAX API*) have been removed.
+* The content of the *QtOpenGL* module has been replaced. The class
+ ``QGLWidget`` and related classes (``QGLContext``, ``QGLFunctions``,
+ ``QGLShaderProgram``) have been removed. Parts of the *Open GL*
+ functionality from *QtGui* have been extracted into this module, for example
+ ``QOpenGLBuffer`` and ``QOpenGLShaderProgram``.
+ There is a new module *QtOpenGLWidgets* which contains the class
+ ``QOpenGLWidget``, a replacement for ``QGLWidget``.
+
+As *Open GL* is phasing out,
+`QRhi <https://doc.qt.io/qt-6/topics-graphics.html>`_ should be considered
+for graphics applications.
+
+Imports
+-------
+
+The first thing to do when porting applications is to replace the
+import statements:
+
+.. code-block:: python
+
+ from PySide2.QtWidgets import QApplication
+ from PySide2 import QtCore
+
+needs to be changed to:
+
+.. code-block:: python
+
+ from PySide6.QtWidgets import QApplication
+ from PySide6 import QtCore
+
+
+Some classes are in a different module now, for example
+``QAction`` and ``QShortcut`` have been moved from ``QtWidgets`` to ``QtGui``.
+
+For *Qt Charts* and *Qt Data Visualization*, the additional namespaces have been
+removed. It is now possible to use:
+
+.. code-block:: python
+
+ from PySide6.QtCharts import QChartView
+
+directly.
+
+
+Class/Function Deprecations
+---------------------------
+
+Then, the code base needs to be checked for usage of deprecated API and adapted
+accordingly. For example:
+
+* The High DPI scaling attributes ``Qt.AA_EnableHighDpiScaling``,
+ ``Qt.AA_DisableHighDpiScaling`` and ``Qt.AA_UseHighDpiPixmaps`` are
+ deprecated. High DPI is by default enabled in Qt 6 and cannot be turned off.
+* ``QDesktopWidget`` has been removed. ``QScreen`` should be used instead,
+ which can be retrieved using ``QWidget.screen()``,
+ ``QGuiApplication.primaryScreen()`` or ``QGuiApplication.screens()``.
+* ``QFontMetrics.width()`` has been renamed to ``horizontalAdvance()``.
+* ``QMouseEvent.pos()`` and ``QMouseEvent.globalPos()`` returning a ``QPoint``
+ as well as ``QMouseEvent.x()`` and ``QMouseEvent.y()`` returning ``int``
+ are now deprecated. ``QMouseEvent.position()`` and
+ ``QMouseEvent.globalPosition()`` returning a ``QPointF`` should be used
+ instead.
+* ``Qt.MidButton`` has been renamed to ``Qt.MiddleButton``.
+* ``QOpenGLVersionFunctionsFactory.get()`` instead of
+ ``QOpenGLContext.versionFunctions()`` should be used to obtain
+ *Open GL* functions.
+* ``QRegExp`` has been replaced by ``QRegularExpression``.
+* ``QWidget.mapToGlobal()`` and ``QWidget.mapFromGlobal()`` now also accept
+ and return ``QPointF``.
+* Functions named ``exec_`` (classes ``QCoreApplication``, ``QDialog``,
+ ``QEventLoop``) have been renamed to ``exec`` which became possible
+ in Python 3.
+
+More information can be found in the
+`Porting to Qt 6 <https://doc.qt.io/qt-6/portingguide.html>`_ Guide
+and the `Qt 6.2 Documentation <https://doc.qt.io/qt-6/index.html>`_ .
diff --git a/sources/pyside6/doc/gettingstarted/windows.rst b/sources/pyside6/doc/gettingstarted/windows.rst
new file mode 100644
index 000000000..f688acd90
--- /dev/null
+++ b/sources/pyside6/doc/gettingstarted/windows.rst
@@ -0,0 +1,110 @@
+Getting Started on Windows
+==========================
+
+The Qt library has to be built with the same version of MSVC as Python and PySide, this can be
+selected when using the online installer.
+
+Requirements
+------------
+
+* `MSVC2022`_ or (MSVC2019) for Python 3 on Windows,
+* `OpenSSL`_ (optional for SSL support, Qt must have been configured using the same SSL library).
+* ``sphinx`` package for the documentation (optional).
+* Check the platform dependencies of `Qt for Windows`_.
+
+.. note:: The Python provided by the Microsoft Store is not compatible with PySide. Please
+ use https://www.python.org/downloads/ to get a Python Interpreter.
+
+.. _MSVC2022: https://visualstudio.microsoft.com/downloads/
+.. _OpenSSL: https://sourceforge.net/projects/openssl/
+.. _`Qt for Windows`: https://doc.qt.io/qt-6/windows.html
+
+Building from source on Windows 10
+----------------------------------
+
+Creating a virtual environment
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``venv`` module allows you to create a local, user-writeable copy of a python environment into
+which arbitrary modules can be installed and which can be removed after use::
+
+ python -m venv testenv
+ call testenv\Scripts\activate
+
+will create and use a new virtual environment, which is indicated by the command prompt changing.
+
+Setting up CLANG
+~~~~~~~~~~~~~~~~
+
+libclang can be downloaded from the
+`Qt servers <https://download.qt.io/development_releases/prebuilt/libclang>`_.
+for example, ``libclang-release_140-based-windows-vs2019_64.7z``.
+
+Note that from version 12 onwards, the prebuilt Windows binaries from
+`LLVM <https://www.llvm.org>`_ no longer contain CMake configuration files; so
+they can no longer be used.
+
+Extract the files, and leave it on any desired path, for example, ``c:``,
+and set the environment variable required::
+
+ set LLVM_INSTALL_DIR=c:\libclang
+ set PATH=C:\libclang\bin;%PATH%
+
+Getting PySide
+~~~~~~~~~~~~~~
+
+Cloning the official repository can be done by::
+
+ git clone https://code.qt.io/pyside/pyside-setup
+
+Checking out the version that we want to build, for example, 6.5::
+
+ cd pyside-setup && git checkout 6.5
+
+Install the general dependencies::
+
+ pip install -r requirements.txt
+
+.. note:: Keep in mind you need to use the same version as your Qt installation
+
+Building PySide
+~~~~~~~~~~~~~~~
+
+Check your Qt installation path, to specifically use that version of qtpaths to build PySide.
+for example, ``C:\Qt\6.5.0\msvc2019_64\bin\qtpaths.exe``.
+
+Build can take a few minutes, so it is recommended to use more than one CPU core::
+
+ python setup.py build --qtpaths=c:\path\to\qtpaths.exe --openssl=c:\path\to\openssl\bin --build-tests --ignore-git --parallel=8
+
+.. _creating_windows_debug_builds:
+
+Creating Debug Builds
+~~~~~~~~~~~~~~~~~~~~~
+
+* Choose *Custom Installation* when installing Python and tick the options for
+ debug binaries and libraries
+
+* Use ``venv`` to create a virtual environment and pass the debug binary::
+
+ python_d.exe -m venv testenv_d
+
+* Use ``python_d.exe`` to invoke ``setup.py``
+
+.. note:: Make sure you add the ``--debug`` option to the ``python setup.py install`` to produce a debug build
+
+
+Installing PySide
+~~~~~~~~~~~~~~~~~
+
+To install on the current directory, just run::
+
+ python setup.py install --qtpaths=c:\path\to\qtpaths.exe --openssl=c:\path\to\openssl\bin --build-tests --ignore-git --parallel=8
+
+Test installation
+~~~~~~~~~~~~~~~~~
+
+You can execute one of the examples to verify the process is properly working.
+Remember to properly set the environment variables for Qt and PySide::
+
+ python examples/widgets/widgets/tetrix.py
diff --git a/sources/pyside6/doc/images/Commercial.svg b/sources/pyside6/doc/images/Commercial.svg
new file mode 100644
index 000000000..f37cce629
--- /dev/null
+++ b/sources/pyside6/doc/images/Commercial.svg
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 26.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 75 75" style="enable-background:new 0 0 75 75;" xml:space="preserve">
+<style type="text/css">
+ .st0{fill-rule:evenodd;clip-rule:evenodd;fill:url(#handshake_00000120533523703459691090000008987813838278108073_);}
+</style>
+<g id="Icons">
+ <g id="Icon_Partner_75">
+ <g id="Icons_00000013163458512384628070000011202706081841226428_">
+ <g id="Icon_Partner_75_00000024708088633722110760000017651124705385698191_">
+
+ <linearGradient id="handshake_00000144337817784615937160000016289583607924598409_" gradientUnits="userSpaceOnUse" x1="-263.8588" y1="427.9277" x2="-265.086" y2="429.2586" gradientTransform="matrix(75 -2.450961e-05 -2.450747e-05 -74.9934 19864.2129 32166.1777)">
+ <stop offset="0" style="stop-color:#6FFE80"/>
+ <stop offset="0.3726" style="stop-color:#43CE58"/>
+ <stop offset="1" style="stop-color:#425FCF"/>
+ </linearGradient>
+
+ <path id="handshake" style="fill-rule:evenodd;clip-rule:evenodd;fill:url(#handshake_00000144337817784615937160000016289583607924598409_);" d="
+ M59.3,50c1.9,1.9,1.9,5.1,0,7.1c-0.6,0.6-1.4,1.1-2.2,1.3l0.5,0.5c1.9,1.9,1.9,5.1,0,7.1c-1.5,1.5-3.8,1.9-5.7,1
+ c-0.2,1-0.7,1.9-1.4,2.6c-1.5,1.5-3.9,1.9-5.7,1c-0.2,1-0.7,1.9-1.4,2.6c-1,1-2.3,1.5-3.5,1.5c-1.3,0-2.6-0.5-3.5-1.5L15,51.7
+ c-3.8-3.8-4.6-8.5-5.3-12.3c-0.5-2.7-0.9-5.1-2.2-6.5c-0.5-0.5-0.5-1.3,0-1.8c0.5-0.5,1.3-0.5,1.8,0c1.9,1.9,2.4,4.8,2.9,7.8
+ c0.6,3.6,1.3,7.7,4.6,10.9L38,71.2c1,1,2.6,1,3.5,0c0.5-0.5,0.7-1.1,0.7-1.8c0-0.7-0.3-1.3-0.7-1.8L30.1,56.2
+ c-0.5-0.5-0.5-1.3,0-1.8c0.5-0.5,1.3-0.5,1.8,0l11.5,11.5h0l1.8,1.8c0.9,0.9,2.6,0.9,3.5,0c1-1,1-2.6,0-3.5L34.5,50
+ c-0.5-0.5-0.5-1.3,0-1.8c0.5-0.5,1.3-0.5,1.8,0l15.9,15.9c1,1,2.6,1,3.5,0c1-1,1-2.6,0-3.5L38.9,43.8c-0.5-0.5-0.5-1.3,0-1.8
+ c0.5-0.5,1.3-0.5,1.8,0L54,55.3c1,1,2.6,1,3.5,0c1-1,1-2.6,0-3.5L44.2,38.5c-0.5-0.5-0.5-1.3,0-1.8c0.5-0.5,1.3-0.5,1.8,0
+ L59.3,50L59.3,50z M66.3,26.2c-2,2-2.7,5.3-3.4,8.5c-0.6,2.8-1.2,5.8-2.7,7.3l-1.8,1.8c-0.5,0.5-0.5,1.3,0,1.8
+ c0.2,0.2,0.6,0.4,0.9,0.4c0.3,0,0.6-0.1,0.9-0.4l1.8-1.8c2-2,2.7-5.3,3.4-8.5c0.6-2.8,1.2-5.8,2.7-7.3c0.5-0.5,0.5-1.3,0-1.8
+ S66.8,25.7,66.3,26.2L66.3,26.2z M19.6,34.1c0,0.7,0.3,1.3,0.7,1.8l0.9,0.9c1.2,1.2,2.7,1.8,4.4,1.8s3.2-0.6,4.4-1.8l6.2-6.2
+ c2.5,2.1,5.5,3.2,8.8,3.2h0c3.7,0,7.1-1.4,9.7-4c0.5-0.5,0.5-1.3,0-1.8c-0.5-0.5-1.3-0.5-1.8,0c-2.1,2.1-5,3.3-8,3.3h0
+ c-3,0-5.8-1.2-8-3.3c-0.5-0.5-1.3-0.5-1.8,0L28.3,35c-1.4,1.4-3.9,1.4-5.3,0l-0.9-0.9l15-15c1.4-1.4,2.7-1.4,4.4-1.4
+ c1.8,0,4.1,0,6.2-2.1l3.5-3.5c0.5-0.5,0.5-1.3,0-1.8c-0.5-0.5-1.3-0.5-1.8,0L46,13.7c-1.4,1.4-2.7,1.4-4.4,1.4
+ c-1.8,0-4.1,0-6.2,2.1l-15,15C19.9,32.8,19.6,33.4,19.6,34.1L19.6,34.1z M23,17.3l3.5,3.5c0.2,0.2,0.6,0.4,0.9,0.4
+ c0.3,0,0.6-0.1,0.9-0.4c0.5-0.5,0.5-1.3,0-1.8l-3.5-3.5c-0.5-0.5-1.3-0.5-1.8,0C22.5,16,22.5,16.8,23,17.3L23,17.3z M21.6,11.4
+ l-7.5-7.5c-0.5-0.5-1.3-0.5-1.8,0s-0.5,1.3,0,1.8l6.6,6.6L2.1,29.1c-0.5,0.5-0.5,1.3,0,1.8c0.2,0.2,0.6,0.4,0.9,0.4
+ s0.6-0.1,0.9-0.4l17.7-17.7C22.1,12.6,22.1,11.9,21.6,11.4L21.6,11.4z M72.9,24.8L55.3,7.3l4.1-4.1c0.5-0.5,0.5-1.3,0-1.8
+ s-1.3-0.5-1.8,0l-5,5c-0.5,0.5-0.5,1.3,0,1.8l18.4,18.4c0.2,0.2,0.6,0.4,0.9,0.4c0.3,0,0.6-0.1,0.9-0.4
+ C73.4,26.1,73.4,25.3,72.9,24.8L72.9,24.8z M30.4,71.9c-0.7,0.4-1.9,0.4-3-0.7c-1.1-1.1-1.1-2.3-0.7-2.9
+ c0.3-0.5,0.2-1.2-0.3-1.6c-0.5-0.4-1.2-0.4-1.7,0.1c-1,1-2.6,1-3.5,0c-1-1-1-2.6,0-3.5c0.2-0.2,0.4-0.6,0.4-0.9
+ s-0.1-0.6-0.4-0.9c-0.5-0.5-1.3-0.5-1.8,0l-0.9,0.9c-1,1-2.6,1-3.5,0c-1-1-1-2.6,0-3.5l0.9-0.9c0.4-0.4,0.5-1.1,0.1-1.6
+ c-0.4-0.5-1.1-0.6-1.6-0.3c-0.7,0.4-1.9,0.3-2.9-0.7c-1.1-1.1-1.1-2.3-0.7-2.8c0.4-0.6,0.2-1.3-0.3-1.7
+ c-0.6-0.4-1.3-0.2-1.7,0.3c-1,1.5-1,4,1,6c0.8,0.8,1.7,1.3,2.5,1.5c-0.3,0.6-0.4,1.3-0.4,2c0,1.3,0.5,2.6,1.5,3.5
+ c1.3,1.3,3.1,1.7,4.7,1.3c0.1,1.1,0.6,2.2,1.4,3.1c1.2,1.2,3,1.7,4.6,1.4c0.2,1,0.7,2.1,1.6,3.1c1.2,1.2,2.5,1.6,3.7,1.6
+ c0.8,0,1.5-0.2,2.1-0.5c0.6-0.3,0.8-1.1,0.5-1.7C31.8,71.8,31,71.5,30.4,71.9L30.4,71.9z"/>
+ </g>
+ </g>
+ </g>
+</g>
+</svg>
diff --git a/sources/pyside6/doc/images/Deployment.svg b/sources/pyside6/doc/images/Deployment.svg
new file mode 100644
index 000000000..cd5a63d2a
--- /dev/null
+++ b/sources/pyside6/doc/images/Deployment.svg
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="38px" height="38px" viewBox="0 0 38 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!-- Generator: Sketch 44.1 (41455) - http://www.bohemiancoding.com/sketch -->
+ <title>robot</title>
+ <desc>Created with Sketch.</desc>
+ <defs>
+ <linearGradient x1="100%" y1="100%" x2="-22.8515625%" y2="-33.2356771%" id="linearGradient-1">
+ <stop stop-color="#6FFF80" offset="0%"></stop>
+ <stop stop-color="#43CE57" offset="37.2587344%"></stop>
+ <stop stop-color="#425FD0" offset="100%"></stop>
+ </linearGradient>
+ </defs>
+ <g id="Mainpage" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+ <g id="Mainpage_Layout_V4_Megamenu" transform="translate(-832.000000, -3701.000000)" fill="url(#linearGradient-1)">
+ <g id="Content" transform="translate(-44.000000, 1530.000000)">
+ <g id="Deliver" transform="translate(62.000000, 1032.000000)">
+ <g id="Product" transform="translate(776.000000, 967.000000)">
+ <g id="Auto" transform="translate(37.420728, 172.000000)">
+ <path d="M32.973961,22.1666667 L32.973961,27.2333333 C32.973961,28.9794333 31.5766823,30.4 29.8592069,30.4 L8.67887904,30.4 C6.96140363,30.4 5.56412494,28.9794333 5.56412494,27.2333333 L5.56412494,22.1666667 C5.56412494,21.8170667 5.84258395,21.5333333 6.18707576,21.5333333 C6.53156756,21.5333333 6.81002658,21.8170667 6.81002658,22.1666667 L6.81002658,27.2333333 C6.81002658,28.2808667 7.64851838,29.1333333 8.67887904,29.1333333 L29.8592069,29.1333333 C30.8895676,29.1333333 31.7280594,28.2808667 31.7280594,27.2333333 L31.7280594,22.1666667 C31.7280594,21.8170667 32.0065184,21.5333333 32.3510102,21.5333333 C32.695502,21.5333333 32.973961,21.8170667 32.973961,22.1666667 L32.973961,22.1666667 Z M37.9575676,19.6333333 C37.9575676,20.6808667 37.1190758,21.5333333 36.0887151,21.5333333 C35.2776331,21.5333333 34.5930102,21.0026 34.3351085,20.2666667 L32.3510102,20.2666667 C32.0065184,20.2666667 31.7280594,19.9829333 31.7280594,19.6333333 L31.7280594,13.3 C31.7280594,12.2524667 30.8895676,11.4 29.8592069,11.4 L16.1542889,11.4 C15.8097971,11.4 15.5313381,11.1162667 15.5313381,10.7666667 C15.5313381,10.4170667 15.8097971,10.1333333 16.1542889,10.1333333 L29.8592069,10.1333333 C31.5766823,10.1333333 32.973961,11.5539 32.973961,13.3 L32.973961,19 L34.3351085,19 C34.5930102,18.2640667 35.2776331,17.7333333 36.0887151,17.7333333 C37.1190758,17.7333333 37.9575676,18.5858 37.9575676,19.6333333 L37.9575676,19.6333333 Z M36.7116659,19.6333333 C36.7116659,19.2843667 36.432584,19 36.0887151,19 C35.7448462,19 35.4657643,19.2843667 35.4657643,19.6333333 C35.4657643,19.9823 35.7448462,20.2666667 36.0887151,20.2666667 C36.432584,20.2666667 36.7116659,19.9823 36.7116659,19.6333333 L36.7116659,19.6333333 Z M12.416584,19 C11.3862233,19 10.5477315,18.1475333 10.5477315,17.1 C10.5477315,16.0524667 11.3862233,15.2 12.416584,15.2 C13.4469446,15.2 14.2854364,16.0524667 14.2854364,17.1 C14.2854364,18.1475333 13.4469446,19 12.416584,19 L12.416584,19 Z M13.0395348,17.1 C13.0395348,16.7510333 12.7604528,16.4666667 12.416584,16.4666667 C12.0727151,16.4666667 11.7936331,16.7510333 11.7936331,17.1 C11.7936331,17.4489667 12.0727151,17.7333333 12.416584,17.7333333 C12.7604528,17.7333333 13.0395348,17.4489667 13.0395348,17.1 L13.0395348,17.1 Z M26.121502,19 C25.0911413,19 24.2526495,18.1475333 24.2526495,17.1 C24.2526495,16.0524667 25.0911413,15.2 26.121502,15.2 C27.1518626,15.2 27.9903544,16.0524667 27.9903544,17.1 C27.9903544,18.1475333 27.1518626,19 26.121502,19 L26.121502,19 Z M26.121502,17.7333333 C26.4653708,17.7333333 26.7444528,17.4489667 26.7444528,17.1 C26.7444528,16.7510333 26.4653708,16.4666667 26.121502,16.4666667 C25.7776331,16.4666667 25.4985512,16.7510333 25.4985512,17.1 C25.4985512,17.4489667 25.7776331,17.7333333 26.121502,17.7333333 L26.121502,17.7333333 Z M24.8756003,31.6666667 L13.6624856,31.6666667 C13.3179938,31.6666667 13.0395348,31.9504 13.0395348,32.3 C13.0395348,32.6496 13.3179938,32.9333333 13.6624856,32.9333333 L24.8756003,32.9333333 C25.2200921,32.9333333 25.4985512,32.6496 25.4985512,32.3 C25.4985512,31.9504 25.2200921,31.6666667 24.8756003,31.6666667 L24.8756003,31.6666667 Z M23.6296987,34.2 L14.9083872,34.2 C14.5638954,34.2 14.2854364,34.4837333 14.2854364,34.8333333 C14.2854364,35.1829333 14.5638954,35.4666667 14.9083872,35.4666667 L23.6296987,35.4666667 C23.9741905,35.4666667 24.2526495,35.1829333 24.2526495,34.8333333 C24.2526495,34.4837333 23.9741905,34.2 23.6296987,34.2 L23.6296987,34.2 Z M23.6296987,36.7333333 L14.9083872,36.7333333 C14.5638954,36.7333333 14.2854364,37.0170667 14.2854364,37.3666667 C14.2854364,37.7162667 14.5638954,38 14.9083872,38 L23.6296987,38 C23.9741905,38 24.2526495,37.7162667 24.2526495,37.3666667 C24.2526495,37.0170667 23.9741905,36.7333333 23.6296987,36.7333333 L23.6296987,36.7333333 Z M24.8756003,22.8 C25.2200921,22.8 25.4985512,23.0837333 25.4985512,23.4333333 L25.4985512,25.9666667 C25.4985512,26.3162667 25.2200921,26.6 24.8756003,26.6 L13.6624856,26.6 C13.3179938,26.6 13.0395348,26.3162667 13.0395348,25.9666667 L13.0395348,23.4333333 C13.0395348,23.0837333 13.3179938,22.8 13.6624856,22.8 L24.8756003,22.8 L24.8756003,22.8 Z M18.0231413,25.3333333 L20.5149446,25.3333333 L20.5149446,24.0666667 L18.0231413,24.0666667 L18.0231413,25.3333333 Z M14.2854364,25.3333333 L16.7772397,25.3333333 L16.7772397,24.0666667 L14.2854364,24.0666667 L14.2854364,25.3333333 Z M21.7608462,25.3333333 L24.2526495,25.3333333 L24.2526495,24.0666667 L21.7608462,24.0666667 L21.7608462,25.3333333 Z M4.20235444,20.2666667 C3.94382985,21.0026 3.2592069,21.5333333 2.44812494,21.5333333 C1.41776428,21.5333333 0.579272478,20.6808667 0.579272478,19.6333333 C0.579272478,18.5858 1.41776428,17.7333333 2.44812494,17.7333333 C3.2592069,17.7333333 3.94382985,18.2640667 4.20235444,19 L5.56287904,19 L5.56412494,13.3 C5.56412494,11.5539 6.96140363,10.1333333 8.67887904,10.1333333 L13.0812725,10.1333333 C13.442584,7.41443333 16.0789118,5.39473333 18.6460921,5.10593333 L18.6460921,3.68283333 C17.9228462,3.42063333 17.4001905,2.7246 17.4001905,1.9 C17.4001905,0.852466667 18.2386823,0 19.269043,0 C20.2994036,0 21.1378954,0.852466667 21.1378954,1.9 C21.1378954,2.7246 20.6152397,3.42063333 19.8919938,3.68346667 L19.8919938,5.10783333 C21.7222233,5.3048 23.5057315,6.34093333 24.5610102,7.87106667 C24.7591085,8.15733333 24.690584,8.5519 24.4090102,8.7533 C24.1268135,8.95406667 23.7387151,8.88376667 23.5412397,8.59813333 C22.6061905,7.24343333 20.889961,6.33333333 19.269043,6.33333333 C16.9647479,6.33333333 14.2854364,8.27006667 14.2854364,10.7666667 C14.2854364,11.1162667 14.0069774,11.4 13.6624856,11.4 L8.67887904,11.4 C7.64851838,11.4 6.81002658,12.2524667 6.81002658,13.3 L6.81002658,19.6333333 C6.81002658,19.9829333 6.53156756,20.2666667 6.18707576,20.2666667 L4.20235444,20.2666667 L4.20235444,20.2666667 Z M18.6460921,1.9 C18.6460921,2.24896667 18.9251741,2.53333333 19.269043,2.53333333 C19.6129118,2.53333333 19.8919938,2.24896667 19.8919938,1.9 C19.8919938,1.55103333 19.6129118,1.26666667 19.269043,1.26666667 C18.9251741,1.26666667 18.6460921,1.55103333 18.6460921,1.9 L18.6460921,1.9 Z M3.07107576,19.6333333 C3.07107576,19.2843667 2.79199379,19 2.44812494,19 C2.10425608,19 1.82517412,19.2843667 1.82517412,19.6333333 C1.82517412,19.9823 2.10425608,20.2666667 2.44812494,20.2666667 C2.79199379,20.2666667 3.07107576,19.9823 3.07107576,19.6333333 L3.07107576,19.6333333 Z" id="robot"></path>
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+</svg> \ No newline at end of file
diff --git a/sources/pyside6/doc/images/Desktop.svg b/sources/pyside6/doc/images/Desktop.svg
new file mode 100644
index 000000000..408786a61
--- /dev/null
+++ b/sources/pyside6/doc/images/Desktop.svg
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="38px" height="38px" viewBox="0 0 38 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!-- Generator: Sketch 44.1 (41455) - http://www.bohemiancoding.com/sketch -->
+ <title>imac copy</title>
+ <desc>Created with Sketch.</desc>
+ <defs>
+ <linearGradient x1="100%" y1="100%" x2="-22.8515625%" y2="-33.2356771%" id="linearGradient-1">
+ <stop stop-color="#6FFF80" offset="0%"></stop>
+ <stop stop-color="#43CE57" offset="37.2587344%"></stop>
+ <stop stop-color="#425FD0" offset="100%"></stop>
+ </linearGradient>
+ </defs>
+ <g id="Mainpage" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+ <g id="Mainpage_Layout_V4_Megamenu" transform="translate(-150.000000, -3059.000000)" fill="url(#linearGradient-1)">
+ <g id="Content" transform="translate(-44.000000, 1530.000000)">
+ <g id="Deliver" transform="translate(62.000000, 1032.000000)">
+ <g id="Solution" transform="translate(0.907344, 0.000000)">
+ <g id="Auto" transform="translate(130.982155, 497.000000)">
+ <path d="M38.110501,3.16666667 L38.110501,25.9666667 C38.110501,27.5943333 36.571501,29.1333333 34.9438344,29.1333333 L3.2771677,29.1333333 C1.64950103,29.1333333 0.11050103,27.5943333 0.11050103,25.9666667 L0.11050103,22.1666667 C0.11050103,21.8170667 0.394234363,21.5333333 0.743834363,21.5333333 L34.9438344,21.5333333 C35.2934344,21.5333333 35.5771677,21.8170667 35.5771677,22.1666667 C35.5771677,22.5162667 35.2934344,22.8 34.9438344,22.8 L1.3771677,22.8 L1.3771677,25.9666667 C1.3771677,26.8900667 2.3537677,27.8666667 3.2771677,27.8666667 L34.9438344,27.8666667 C35.8672344,27.8666667 36.8438344,26.8900667 36.8438344,25.9666667 L36.8438344,3.16666667 C36.8438344,2.24326667 35.8672344,1.26666667 34.9438344,1.26666667 L3.2771677,1.26666667 C2.3537677,1.26666667 1.3771677,2.24326667 1.3771677,3.16666667 L1.3771677,19.6333333 C1.3771677,19.9829333 1.09343436,20.2666667 0.743834363,20.2666667 C0.394234363,20.2666667 0.11050103,19.9829333 0.11050103,19.6333333 L0.11050103,3.16666667 C0.11050103,1.539 1.64950103,0 3.2771677,0 L34.9438344,0 C36.571501,0 38.110501,1.539 38.110501,3.16666667 L38.110501,3.16666667 Z M17.8438344,25.3333333 C17.8438344,26.0319 18.4119344,26.6 19.110501,26.6 C19.8090677,26.6 20.3771677,26.0319 20.3771677,25.3333333 C20.3771677,24.6347667 19.8090677,24.0666667 19.110501,24.0666667 C18.4119344,24.0666667 17.8438344,24.6347667 17.8438344,25.3333333 L17.8438344,25.3333333 Z M16.5961677,19.6333333 C16.5961677,19.2837333 16.3130677,19 15.9628344,19 L15.956501,19 C15.606901,19 15.3263344,19.2837333 15.3263344,19.6333333 C15.3263344,19.9829333 15.6132344,20.2666667 15.9628344,20.2666667 C16.3130677,20.2666667 16.5961677,19.9829333 16.5961677,19.6333333 L16.5961677,19.6333333 Z M19.129501,19.6333333 C19.129501,19.2837333 18.846401,19 18.4961677,19 L18.4898344,19 C18.1402344,19 17.8596677,19.2837333 17.8596677,19.6333333 C17.8596677,19.9829333 18.1465677,20.2666667 18.4961677,20.2666667 C18.846401,20.2666667 19.129501,19.9829333 19.129501,19.6333333 L19.129501,19.6333333 Z M21.6628344,19.6333333 C21.6628344,19.2837333 21.3797344,19 21.029501,19 L21.0231677,19 C20.6735677,19 20.393001,19.2837333 20.393001,19.6333333 C20.393001,19.9829333 20.679901,20.2666667 21.029501,20.2666667 C21.3797344,20.2666667 21.6628344,19.9829333 21.6628344,19.6333333 L21.6628344,19.6333333 Z M14.0628344,19.6333333 C14.0628344,19.2837333 13.7797344,19 13.429501,19 L13.4231677,19 C13.0735677,19 12.793001,19.2837333 12.793001,19.6333333 C12.793001,19.9829333 13.079901,20.2666667 13.429501,20.2666667 C13.7797344,20.2666667 14.0628344,19.9829333 14.0628344,19.6333333 L14.0628344,19.6333333 Z M11.529501,19.6333333 C11.529501,19.2837333 11.246401,19 10.8961677,19 L10.8898344,19 C10.5402344,19 10.2596677,19.2837333 10.2596677,19.6333333 C10.2596677,19.9829333 10.5465677,20.2666667 10.8961677,20.2666667 C11.246401,20.2666667 11.529501,19.9829333 11.529501,19.6333333 L11.529501,19.6333333 Z M27.9961677,19.6333333 C27.9961677,19.2837333 27.7130677,19 27.3628344,19 L27.356501,19 C27.006901,19 26.7263344,19.2837333 26.7263344,19.6333333 C26.7263344,19.9829333 27.0132344,20.2666667 27.3628344,20.2666667 C27.7130677,20.2666667 27.9961677,19.9829333 27.9961677,19.6333333 L27.9961677,19.6333333 Z M25.4628344,19.6333333 C25.4628344,19.2837333 25.1797344,19 24.829501,19 L24.8231677,19 C24.4735677,19 24.193001,19.2837333 24.193001,19.6333333 C24.193001,19.9829333 24.479901,20.2666667 24.829501,20.2666667 C25.1797344,20.2666667 25.4628344,19.9829333 25.4628344,19.6333333 L25.4628344,19.6333333 Z M26.0771677,36.7333333 L25.4438344,36.7333333 L25.4438344,36.1 C25.4438344,35.7504 25.160101,35.4666667 24.810501,35.4666667 C24.460901,35.4666667 24.1771677,35.7504 24.1771677,36.1 L24.1771677,36.7333333 L22.910501,36.7333333 L22.910501,36.1 C22.910501,35.7504 22.6267677,35.4666667 22.2771677,35.4666667 C21.9275677,35.4666667 21.6438344,35.7504 21.6438344,36.1 L21.6438344,36.7333333 L20.3771677,36.7333333 L20.3771677,36.1 C20.3771677,35.7504 20.0934344,35.4666667 19.7438344,35.4666667 C19.3942344,35.4666667 19.110501,35.7504 19.110501,36.1 L19.110501,36.7333333 L17.8438344,36.7333333 L17.8438344,36.1 C17.8438344,35.7504 17.560101,35.4666667 17.210501,35.4666667 C16.860901,35.4666667 16.5771677,35.7504 16.5771677,36.1 L16.5771677,36.7333333 L15.310501,36.7333333 L15.310501,36.1 C15.310501,35.7504 15.0267677,35.4666667 14.6771677,35.4666667 C14.3275677,35.4666667 14.0438344,35.7504 14.0438344,36.1 L14.0438344,36.7333333 L12.7771677,36.7333333 L12.7771677,36.1 C12.7771677,35.7504 12.4934344,35.4666667 12.1438344,35.4666667 C11.7942344,35.4666667 11.510501,35.7504 11.510501,36.1 L11.510501,36.7333333 L10.2438344,36.7333333 L10.2438344,36.1 C10.2438344,35.7504 9.96010103,35.4666667 9.61050103,35.4666667 C9.26090103,35.4666667 8.9771677,35.7504 8.9771677,36.1 L8.9771677,36.7333333 L7.71050103,36.7333333 L7.71050103,36.1 C7.71050103,35.7504 7.4267677,35.4666667 7.0771677,35.4666667 C6.7275677,35.4666667 6.44383436,35.7504 6.44383436,36.1 L6.44383436,36.7333333 L5.1771677,36.7333333 L5.1771677,36.1 C5.1771677,35.7504 4.89343436,35.4666667 4.54383436,35.4666667 C4.19423436,35.4666667 3.91050103,35.7504 3.91050103,36.1 L3.91050103,36.7333333 L3.2771677,36.7333333 C2.9275677,36.7333333 2.64383436,37.0170667 2.64383436,37.3666667 C2.64383436,37.7162667 2.9275677,38 3.2771677,38 L26.0771677,38 C26.4267677,38 26.710501,37.7162667 26.710501,37.3666667 C26.710501,37.0170667 26.4267677,36.7333333 26.0771677,36.7333333 L26.0771677,36.7333333 Z M16.5771677,33.5666667 L16.5771677,31.0333333 C16.5771677,30.6837333 16.2934344,30.4 15.9438344,30.4 C15.5942344,30.4 15.310501,30.6837333 15.310501,31.0333333 L15.310501,33.5666667 C15.310501,33.9162667 15.5942344,34.2 15.9438344,34.2 C16.2934344,34.2 16.5771677,33.9162667 16.5771677,33.5666667 L16.5771677,33.5666667 Z M22.2771677,34.2 C22.6267677,34.2 22.910501,33.9162667 22.910501,33.5666667 L22.910501,31.0333333 C22.910501,30.6837333 22.6267677,30.4 22.2771677,30.4 C21.9275677,30.4 21.6438344,30.6837333 21.6438344,31.0333333 L21.6438344,33.5666667 C21.6438344,33.9162667 21.9275677,34.2 22.2771677,34.2 L22.2771677,34.2 Z M35.5771677,36.7333333 L35.5771677,37.3666667 C35.5771677,37.7162667 35.2934344,38 34.9438344,38 L29.8771677,38 C29.5275677,38 29.2438344,37.7162667 29.2438344,37.3666667 L29.2438344,36.7333333 C29.2438344,35.3362 30.3800344,34.2 31.7771677,34.2 L33.0438344,34.2 C34.4409677,34.2 35.5771677,35.3362 35.5771677,36.7333333 L35.5771677,36.7333333 Z M34.310501,36.7333333 C34.310501,36.0347667 33.742401,35.4666667 33.0438344,35.4666667 L31.7771677,35.4666667 C31.078601,35.4666667 30.510501,36.0347667 30.510501,36.7333333 L34.310501,36.7333333 L34.310501,36.7333333 Z" id="imac-copy"></path>
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+</svg> \ No newline at end of file
diff --git a/sources/pyside6/doc/images/Dev.svg b/sources/pyside6/doc/images/Dev.svg
new file mode 100644
index 000000000..53e332718
--- /dev/null
+++ b/sources/pyside6/doc/images/Dev.svg
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="37px" height="37px" viewBox="0 0 37 37" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!-- Generator: Sketch 44.1 (41455) - http://www.bohemiancoding.com/sketch -->
+ <title>book-write</title>
+ <desc>Created with Sketch.</desc>
+ <defs>
+ <linearGradient x1="100%" y1="100%" x2="-22.8515625%" y2="-33.2356771%" id="linearGradient-1">
+ <stop stop-color="#6FFF80" offset="0%"></stop>
+ <stop stop-color="#43CE57" offset="37.2587344%"></stop>
+ <stop stop-color="#425FD0" offset="100%"></stop>
+ </linearGradient>
+ </defs>
+ <g id="Mainpage" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+ <g id="Mainpage_Layout_V4_Megamenu" transform="translate(-266.000000, -5715.000000)" fill="url(#linearGradient-1)">
+ <g id="Content" transform="translate(-44.000000, 1530.000000)">
+ <g id="Support" transform="translate(277.000000, 4042.000000)">
+ <g id="1" transform="translate(0.774880, 117.000000)">
+ <path d="M65.2327264,56.0069148 C65.5646029,56.0069148 65.8328647,55.7380528 65.8328647,55.4067765 L65.8328647,33.8017978 C65.8328647,33.4705215 65.5646029,33.2016596 65.2327264,33.2016596 C64.9008499,33.2016596 64.6325881,33.4705215 64.6325881,33.8017978 L64.6325881,55.4067765 C64.6325881,55.7380528 64.9008499,56.0069148 65.2327264,56.0069148 L65.2327264,56.0069148 Z M67.0331413,59.0076063 L67.0331413,58.407468 L65.2327264,58.407468 C64.9008499,58.407468 64.6325881,58.138606 64.6325881,57.8073297 C64.6325881,57.4760533 64.9008499,57.2071914 65.2327264,57.2071914 L67.0331413,57.2071914 L67.0331413,32.001383 L65.2327264,32.001383 C64.9008499,32.001383 64.6325881,31.732521 64.6325881,31.4012447 C64.6325881,31.0699683 64.9008499,30.8011064 65.2327264,30.8011064 L66.6622558,30.8011064 L65.2327264,27.9420475 L63.4323115,31.5428773 L63.4323115,59.0076063 C63.4323115,60.000235 64.2400976,60.8080212 65.2327264,60.8080212 C66.2253551,60.8080212 67.0331413,60.000235 67.0331413,59.0076063 L67.0331413,59.0076063 Z M68.2454206,31.4012447 C68.2454206,31.4420541 68.2412197,31.4822633 68.2334179,31.5212723 L68.2334179,59.0076063 C68.2334179,60.6621876 66.8873077,62.0082978 65.2327264,62.0082978 C63.5781451,62.0082978 62.2320349,60.6621876 62.2320349,59.0076063 L62.2320349,31.4012447 C62.2320349,31.3082232 62.2536399,31.2158019 62.2950494,31.1329828 L64.6956026,26.3318765 C64.8996496,25.9249827 65.5658031,25.9249827 65.7698502,26.3318765 L68.1217921,31.0363606 C68.19921,31.137784 68.2454206,31.263813 68.2454206,31.4012447 L68.2454206,31.4012447 Z M50.8294073,44.0041489 L44.8280243,44.0041489 C44.4961478,44.0041489 44.227886,44.2730108 44.227886,44.6042872 C44.227886,44.9355635 44.4961478,45.2044255 44.8280243,45.2044255 L50.8294073,45.2044255 C51.1612838,45.2044255 51.4295456,44.9355635 51.4295456,44.6042872 C51.4295456,44.2730108 51.1612838,44.0041489 50.8294073,44.0041489 L50.8294073,44.0041489 Z M44.8280243,42.8038723 L48.4288541,42.8038723 C48.7607306,42.8038723 49.0289924,42.5350103 49.0289924,42.203734 C49.0289924,41.8724577 48.7607306,41.6035957 48.4288541,41.6035957 L44.8280243,41.6035957 C44.4961478,41.6035957 44.227886,41.8724577 44.227886,42.203734 C44.227886,42.5350103 44.4961478,42.8038723 44.8280243,42.8038723 L44.8280243,42.8038723 Z M41.8273328,47.6049787 L53.8300988,47.6049787 L53.8300988,39.2030425 L41.8273328,39.2030425 L41.8273328,47.6049787 Z M40.6270563,48.205117 L40.6270563,38.6029042 C40.6270563,38.2716279 40.8953181,38.0027659 41.2271946,38.0027659 L54.4302371,38.0027659 C54.7621135,38.0027659 55.0303754,38.2716279 55.0303754,38.6029042 L55.0303754,48.205117 C55.0303754,48.5363933 54.7621135,48.8052552 54.4302371,48.8052552 L41.2271946,48.8052552 C40.8953181,48.8052552 40.6270563,48.5363933 40.6270563,48.205117 L40.6270563,48.205117 Z M33.4253967,31.4534567 L33.4253967,59.0076063 C33.4253967,59.9666273 34.2667906,60.8080212 35.2258116,60.8080212 L58.0310668,60.8080212 C58.9900878,60.8080212 59.8314817,59.9666273 59.8314817,59.0076063 L59.8314817,32.001383 L35.2258116,32.001383 C34.7318978,32.001383 34.0273354,31.8591502 33.4253967,31.4534567 L33.4253967,31.4534567 Z M60.43162,27.2002766 L34.6256733,27.2002766 C33.9637208,27.2002766 33.4253967,27.7386006 33.4253967,28.4005532 L33.4253967,29.0006915 C33.4253967,30.6948819 34.928143,30.7975055 35.2294124,30.8011064 L60.43162,30.8011064 C60.7634965,30.8011064 61.0317583,31.0699683 61.0317583,31.4012447 L61.0317583,59.0076063 C61.0317583,60.6339811 59.6574416,62.0082978 58.0310668,62.0082978 L35.2258116,62.0082978 C33.5994368,62.0082978 32.2251201,60.6339811 32.2251201,59.0076063 L32.2251201,28.4005532 C32.2251201,27.0766481 33.3017682,26 34.6256733,26 L60.43162,26 C60.7634965,26 61.0317583,26.268862 61.0317583,26.6001383 C61.0317583,26.9314146 60.7634965,27.2002766 60.43162,27.2002766 L60.43162,27.2002766 Z M35.2258116,59.6077446 C35.5576881,59.6077446 35.8259499,59.3388826 35.8259499,59.0076063 L35.8259499,33.8017978 C35.8259499,33.4705215 35.5576881,33.2016596 35.2258116,33.2016596 C34.8939351,33.2016596 34.6256733,33.4705215 34.6256733,33.8017978 L34.6256733,59.0076063 C34.6256733,59.3388826 34.8939351,59.6077446 35.2258116,59.6077446 L35.2258116,59.6077446 Z M59.2313434,28.4005532 C59.5632199,28.4005532 59.8314817,28.6694151 59.8314817,29.0006915 C59.8314817,29.3319678 59.5632199,29.6008298 59.2313434,29.6008298 L35.2258116,29.6008298 C34.8939351,29.6008298 34.6256733,29.3319678 34.6256733,29.0006915 C34.6256733,28.6694151 34.8939351,28.4005532 35.2258116,28.4005532 L59.2313434,28.4005532 Z" id="book-write"></path>
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+</svg> \ No newline at end of file
diff --git a/sources/pyside6/doc/images/Development.svg b/sources/pyside6/doc/images/Development.svg
new file mode 100644
index 000000000..2149ee8a0
--- /dev/null
+++ b/sources/pyside6/doc/images/Development.svg
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="41px" height="38px" viewBox="0 0 41 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!-- Generator: Sketch 44.1 (41455) - http://www.bohemiancoding.com/sketch -->
+ <title>globe-share</title>
+ <desc>Created with Sketch.</desc>
+ <defs>
+ <linearGradient x1="100%" y1="100%" x2="-22.8515625%" y2="-33.2356771%" id="linearGradient-1">
+ <stop stop-color="#6FFF80" offset="0%"></stop>
+ <stop stop-color="#43CE57" offset="37.2587344%"></stop>
+ <stop stop-color="#425FD0" offset="100%"></stop>
+ </linearGradient>
+ </defs>
+ <g id="Mainpage" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+ <g id="Mainpage_Layout_V4_Megamenu" transform="translate(-831.000000, -3529.000000)" fill="url(#linearGradient-1)">
+ <g id="Content" transform="translate(-44.000000, 1530.000000)">
+ <g id="Deliver" transform="translate(62.000000, 1032.000000)">
+ <g id="Product" transform="translate(776.000000, 967.000000)">
+ <g id="Auto" transform="translate(36.420728, 0.000000)">
+ <path d="M10.8786296,24.4285714 L14.7525939,24.4285714 C15.675451,27.47875 17.4736653,29.6847857 18.8301296,31.0052857 C15.2113082,30.29075 12.2371296,27.7725714 10.8786296,24.4285714 L10.8786296,24.4285714 Z M18.8301296,9.709 C17.4736653,11.0295 15.675451,13.2355357 14.7525939,16.2857143 L10.8786296,16.2857143 C12.2371296,12.9417143 15.2113082,10.4235357 18.8301296,9.709 L18.8301296,9.709 Z M30.994201,16.2857143 L27.1202368,16.2857143 C26.1973796,13.2355357 24.3984868,11.0295 23.0420225,9.709 C26.6615225,10.4235357 29.6350225,12.9417143 30.994201,16.2857143 L30.994201,16.2857143 Z M23.0420225,31.0052857 C24.3984868,29.6847857 26.1973796,27.47875 27.1202368,24.4285714 L30.994201,24.4285714 C29.635701,27.7725714 26.6615225,30.29075 23.0420225,31.0052857 L23.0420225,31.0052857 Z M20.2578439,24.4285714 L20.2578439,30.4678571 C19.076451,29.3991071 17.2063082,27.3471071 16.2006653,24.4285714 L20.2578439,24.4285714 Z M20.2578439,10.2464286 L20.2578439,16.2857143 L16.2006653,16.2857143 C17.2063082,13.3671786 19.076451,11.3151786 20.2578439,10.2464286 L20.2578439,10.2464286 Z M21.6149868,16.2857143 L21.6149868,10.2464286 C22.7963796,11.3151786 24.6665225,13.3671786 25.6714868,16.2857143 L21.6149868,16.2857143 Z M21.6149868,30.4678571 L21.6149868,24.4285714 L25.6714868,24.4285714 C24.6665225,27.3471071 22.7963796,29.3991071 21.6149868,30.4678571 L21.6149868,30.4678571 Z M26.3649868,20.3571429 C26.3649868,21.32275 26.2475939,22.2245714 26.058951,23.0714286 L21.6149868,23.0714286 L21.6149868,17.6428571 L26.058951,17.6428571 C26.2475939,18.4897143 26.3649868,19.3915357 26.3649868,20.3571429 L26.3649868,20.3571429 Z M31.7935582,20.3571429 C31.7935582,21.2956071 31.6605582,22.2021786 31.435951,23.0714286 L27.460201,23.0714286 C27.626451,22.2218571 27.7221296,21.3173214 27.7221296,20.3571429 C27.7221296,19.3969643 27.626451,18.4924286 27.460201,17.6428571 L31.435951,17.6428571 C31.6605582,18.5121071 31.7935582,19.4186786 31.7935582,20.3571429 L31.7935582,20.3571429 Z M15.5078439,20.3571429 C15.5078439,19.3915357 15.6252368,18.4897143 15.8138796,17.6428571 L20.2578439,17.6428571 L20.2578439,23.0714286 L15.8138796,23.0714286 C15.6252368,22.2245714 15.5078439,21.32275 15.5078439,20.3571429 L15.5078439,20.3571429 Z M10.0792725,20.3571429 C10.0792725,19.4186786 10.2115939,18.5121071 10.436201,17.6428571 L14.4126296,17.6428571 C14.245701,18.4924286 14.150701,19.3969643 14.150701,20.3571429 C14.150701,21.3173214 14.245701,22.2218571 14.4126296,23.0714286 L10.436201,23.0714286 C10.2115939,22.2021786 10.0792725,21.2956071 10.0792725,20.3571429 L10.0792725,20.3571429 Z M20.9377725,32.5714286 C26.3982368,32.57075 31.0308439,28.9682143 32.5895225,24.016 C32.590201,24.0139643 32.5908796,24.0126071 32.5915582,24.01125 C32.9539153,22.857 33.150701,21.6294643 33.150701,20.3571429 C33.150701,19.0848214 32.9539153,17.8572857 32.5915582,16.7030357 C32.5908796,16.7016786 32.590201,16.7003214 32.5895225,16.6982857 C31.0308439,11.7460714 26.3968796,8.14285714 20.9364153,8.14285714 C15.4752725,8.14285714 10.8413082,11.7460714 9.28262962,16.6989643 L9.28195105,16.7023571 C8.91891533,17.8566071 8.72212962,19.0841429 8.72212962,20.3571429 C8.72212962,21.6301429 8.91891533,22.8576786 9.28195105,24.0119286 L9.28262962,24.0153214 C10.8413082,28.9675357 15.4745939,32.57075 20.9343796,32.5714286 L20.9350582,32.5714286 L20.9357368,32.5714286 L20.9357368,32.5714286 L20.9364153,32.5714286 L20.9370939,32.5714286 L20.9377725,32.5714286 Z M31.7935582,36.6428571 C31.0450939,36.6428571 30.4364153,36.0341786 30.4364153,35.2857143 C30.4364153,34.53725 31.0450939,33.9285714 31.7935582,33.9285714 C32.5413439,33.9285714 33.150701,34.53725 33.150701,35.2857143 C33.150701,36.0341786 32.5413439,36.6428571 31.7935582,36.6428571 L31.7935582,36.6428571 Z M31.7935582,32.5714286 C31.4142368,32.5714286 31.0539153,32.6508214 30.7261653,32.7912857 L29.597701,31.4551786 C29.3561296,31.1688214 28.927951,31.1315 28.6415939,31.3744286 C28.3545582,31.616 28.3192725,32.0441786 28.5601653,32.3305357 L29.6574153,33.6306786 C29.3004868,34.0900714 29.0792725,34.6600714 29.0792725,35.2857143 C29.0792725,36.7826429 30.2966296,38 31.7935582,38 C33.2904868,38 34.5078439,36.7826429 34.5078439,35.2857143 C34.5078439,33.7887857 33.2904868,32.5714286 31.7935582,32.5714286 L31.7935582,32.5714286 Z M10.0792725,36.6428571 C9.33080819,36.6428571 8.72212962,36.0341786 8.72212962,35.2857143 C8.72212962,34.53725 9.33080819,33.9285714 10.0792725,33.9285714 C10.8277368,33.9285714 11.4364153,34.53725 11.4364153,35.2857143 C11.4364153,36.0341786 10.8277368,36.6428571 10.0792725,36.6428571 L10.0792725,36.6428571 Z M12.3022725,31.3846071 L11.096451,32.7729643 C10.7815939,32.6453929 10.4395939,32.5714286 10.0792725,32.5714286 C8.58234391,32.5714286 7.36498676,33.7887857 7.36498676,35.2857143 C7.36498676,36.7826429 8.58234391,38 10.0792725,38 C11.5755225,38 12.7935582,36.7826429 12.7935582,35.2857143 C12.7935582,34.64175 12.5587725,34.0575 12.1828439,33.592 L13.3269153,32.2742143 C13.5725582,31.99125 13.542701,31.5623929 13.2590582,31.31675 C12.9760939,31.0711071 12.5472368,31.1009643 12.3022725,31.3846071 L12.3022725,31.3846071 Z M38.5792725,16.2857143 C37.8308082,16.2857143 37.2221296,15.6770357 37.2221296,14.9285714 C37.2221296,14.1801071 37.8308082,13.5714286 38.5792725,13.5714286 C39.3270582,13.5714286 39.9364153,14.1801071 39.9364153,14.9285714 C39.9364153,15.6770357 39.3270582,16.2857143 38.5792725,16.2857143 L38.5792725,16.2857143 Z M38.5792725,12.2142857 C37.0823439,12.2142857 35.8649868,13.4316429 35.8649868,14.9285714 C35.8649868,15.0133929 35.881951,15.0941429 35.8900939,15.1776071 L34.5885939,15.6804286 C34.238451,15.8161429 34.0647368,16.2090357 34.200451,16.5585 C34.3042725,16.8272143 34.5607725,16.9927857 34.8328796,16.9927857 C34.9143082,16.9927857 34.9970939,16.9778571 35.0778439,16.9466429 L36.3399868,16.4580714 C36.8292368,17.1726071 37.6496296,17.6428571 38.5792725,17.6428571 C40.076201,17.6428571 41.2935582,16.4255 41.2935582,14.9285714 C41.2935582,13.4316429 40.076201,12.2142857 38.5792725,12.2142857 L38.5792725,12.2142857 Z M3.29355819,16.2857143 C2.54509391,16.2857143 1.93641533,15.6770357 1.93641533,14.9285714 C1.93641533,14.1801071 2.54509391,13.5714286 3.29355819,13.5714286 C4.04202248,13.5714286 4.65070105,14.1801071 4.65070105,14.9285714 C4.65070105,15.6770357 4.04202248,16.2857143 3.29355819,16.2857143 L3.29355819,16.2857143 Z M7.71173676,16.5781786 C7.84745105,16.2287143 7.67441533,15.8358214 7.32495105,15.7001071 L5.98273676,15.1782857 C5.99020105,15.0948214 6.00784391,15.0140714 6.00784391,14.9285714 C6.00784391,13.4316429 4.78980819,12.2142857 3.29355819,12.2142857 C1.79662962,12.2142857 0.579272478,13.4316429 0.579272478,14.9285714 C0.579272478,16.4255 1.79662962,17.6428571 3.29355819,17.6428571 C4.22184391,17.6428571 5.04223676,17.1732857 5.53216533,16.4594286 L6.83366533,16.9649643 C6.91441533,16.9961786 6.99720105,17.0111071 7.07930819,17.0111071 C7.35073676,17.0111071 7.60723676,16.8468929 7.71173676,16.5781786 L7.71173676,16.5781786 Z M20.9364153,1.35714286 C21.684201,1.35714286 22.2935582,1.96582143 22.2935582,2.71428571 C22.2935582,3.46275 21.684201,4.07142857 20.9364153,4.07142857 C20.187951,4.07142857 19.5792725,3.46275 19.5792725,2.71428571 C19.5792725,1.96582143 20.187951,1.35714286 20.9364153,1.35714286 L20.9364153,1.35714286 Z M20.2578439,5.33221429 L20.2578439,6.44642857 C20.2578439,6.821 20.5618439,7.125 20.9364153,7.125 C21.3109868,7.125 21.6149868,6.821 21.6149868,6.44642857 L21.6149868,5.33221429 C22.7821296,5.02889286 23.650701,3.97507143 23.650701,2.71428571 C23.650701,1.21735714 22.4333439,0 20.9364153,0 C19.4394868,0 18.2221296,1.21735714 18.2221296,2.71428571 C18.2221296,3.97507143 19.090701,5.02889286 20.2578439,5.33221429 L20.2578439,5.33221429 Z" id="globe-share"></path>
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+</svg>
+
diff --git a/sources/pyside6/doc/images/Examples.svg b/sources/pyside6/doc/images/Examples.svg
new file mode 100644
index 000000000..a506e7798
--- /dev/null
+++ b/sources/pyside6/doc/images/Examples.svg
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 75 75" style="enable-background:new 0 0 75 75;" xml:space="preserve">
+<style type="text/css">
+ .st0{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_1_);}
+ .st1{fill:none;}
+</style>
+<g id="icon">
+ <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="87.5133" y1="87.5133" x2="-26.0279" y2="-26.0279">
+ <stop offset="0" style="stop-color:#6FFE80"/>
+ <stop offset="0.3726" style="stop-color:#43CE58"/>
+ <stop offset="1" style="stop-color:#425FCF"/>
+ </linearGradient>
+ <path class="st0" d="M75,6.2v62.5c0,3.4-2.8,6.2-6.2,6.2H6.2C2.8,75,0,72.2,0,68.8v-50c0-0.7,0.6-1.2,1.2-1.2s1.2,0.6,1.2,1.2v50
+ c0,2.1,1.7,3.8,3.8,3.8h62.5c2.1,0,3.8-1.7,3.8-3.8V6.2c0-2.1-1.7-3.8-3.8-3.8H6.2c-2.1,0-3.8,1.7-3.8,3.8v6.2h66.2
+ c0.7,0,1.2,0.6,1.2,1.2S69.4,15,68.8,15H1.2C0.6,15,0,14.4,0,13.8V6.2C0,2.8,2.8,0,6.2,0h62.5C72.2,0,75,2.8,75,6.2L75,6.2z
+ M7.5,7.5C7.5,8.9,8.6,10,10,10s2.5-1.1,2.5-2.5S11.4,5,10,5S7.5,6.1,7.5,7.5L7.5,7.5z M15,7.5c0,1.4,1.1,2.5,2.5,2.5
+ S20,8.9,20,7.5S18.9,5,17.5,5S15,6.1,15,7.5L15,7.5z M22.5,7.5c0,1.4,1.1,2.5,2.5,2.5s2.5-1.1,2.5-2.5S26.4,5,25,5
+ S22.5,6.1,22.5,7.5L22.5,7.5z M63.8,53.7H51.2V41.2c0-0.7-0.6-1.2-1.2-1.2c-8.3,0-15,6.7-15,15s6.7,15,15,15s15-6.7,15-15
+ C65,54.3,64.4,53.7,63.8,53.7z M50,67.5c-6.9,0-12.5-5.6-12.5-12.5c0-6.5,4.9-11.8,11.2-12.4v13.7h13.7
+ C61.8,62.6,56.5,67.5,50,67.5z M55,35c-0.7,0-1.2,0.6-1.2,1.2v15h15c0.7,0,1.2-0.6,1.2-1.2C70,41.7,63.3,35,55,35z M56.2,48.7V37.6
+ c5.9,0.6,10.6,5.3,11.2,11.2H56.2z M38.7,24.9l-6.3,16.7c-0.2,0.5-0.6,0.8-1.1,0.8c-0.5,0-1-0.3-1.2-0.8l-2.5-5.9l-7.6,19.6
+ c-0.2,0.5-0.7,0.8-1.2,0.8c0,0,0,0-0.1,0c-0.5,0-1-0.4-1.1-0.9L9.9,26.8l-2.4,7.3c-0.2,0.7-0.9,1-1.6,0.8c-0.7-0.2-1-0.9-0.8-1.6
+ l3.8-11.2c0.2-0.5,0.7-0.9,1.2-0.9c0.6,0,1,0.4,1.2,0.9L19,51L26.3,32c0.2-0.5,0.6-0.8,1.1-0.8c0,0,0,0,0,0c0.5,0,1,0.3,1.1,0.8
+ l2.5,5.9l6.4-17.1c0.2-0.5,0.7-0.8,1.2-0.8c0.5,0,1,0.3,1.2,0.8l2.9,8.5l4.9-7.5c0.2-0.4,0.7-0.6,1.1-0.6c0.4,0,0.8,0.3,1.1,0.6
+ l3.9,6.9l2.7-4.4c0.2-0.4,0.6-0.6,1.1-0.6c0,0,0,0,0,0c0.4,0,0.8,0.2,1.1,0.6l2.5,4c0.4,0.6,0.2,1.4-0.4,1.7
+ c-0.6,0.4-1.4,0.2-1.7-0.4l-1.4-2.3l-2.7,4.5c-0.2,0.4-0.6,0.6-1.1,0.6c-0.4,0-0.9-0.2-1.1-0.6l-4-7l-5.1,7.9
+ c-0.3,0.4-0.7,0.6-1.2,0.6c-0.5-0.1-0.9-0.4-1-0.8L38.7,24.9z"/>
+</g>
+<g id="_x37_5px_frame">
+ <rect x="0" y="0" class="st1" width="75" height="75"/>
+</g>
+</svg>
diff --git a/sources/pyside6/doc/images/Support.svg b/sources/pyside6/doc/images/Support.svg
new file mode 100644
index 000000000..98b93d95c
--- /dev/null
+++ b/sources/pyside6/doc/images/Support.svg
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="38px" height="38px" viewBox="0 0 38 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!-- Generator: Sketch 44.1 (41455) - http://www.bohemiancoding.com/sketch -->
+ <title>website-fix</title>
+ <desc>Created with Sketch.</desc>
+ <defs>
+ <linearGradient x1="100%" y1="100%" x2="-22.8515625%" y2="-33.2356771%" id="linearGradient-1">
+ <stop stop-color="#6FFF80" offset="0%"></stop>
+ <stop stop-color="#43CE57" offset="37.2587344%"></stop>
+ <stop stop-color="#425FD0" offset="100%"></stop>
+ </linearGradient>
+ </defs>
+ <g id="Mainpage" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+ <g id="Mainpage_Layout_V4_Megamenu" transform="translate(-794.000000, -5715.000000)" fill="url(#linearGradient-1)">
+ <g id="Content" transform="translate(-44.000000, 1530.000000)">
+ <g id="Support" transform="translate(277.000000, 4042.000000)">
+ <g id="1" transform="translate(560.490048, 136.000000)">
+ <path d="M19.509952,37.4 C20.2085186,37.4 20.7766186,36.8319 20.7766186,36.1333333 C20.7766186,35.4347667 20.2085186,34.8666667 19.509952,34.8666667 C18.8113853,34.8666667 18.2432853,35.4347667 18.2432853,36.1333333 C18.2432853,36.8319 18.8113853,37.4 19.509952,37.4 L19.509952,37.4 Z M19.509952,38.6666667 C18.1128186,38.6666667 16.9766186,37.5304667 16.9766186,36.1333333 C16.9766186,34.7362 18.1128186,33.6 19.509952,33.6 C20.9070853,33.6 22.0432853,34.7362 22.0432853,36.1333333 C22.0432853,37.5304667 20.9070853,38.6666667 19.509952,38.6666667 L19.509952,38.6666667 Z M19.509952,41.2 C22.3035853,41.2 24.5766186,38.9269667 24.5766186,36.1333333 C24.5766186,33.3397 22.3035853,31.0666667 19.509952,31.0666667 C16.7163186,31.0666667 14.4432853,33.3397 14.4432853,36.1333333 C14.4432853,38.9269667 16.7163186,41.2 19.509952,41.2 L19.509952,41.2 Z M19.509952,42.4666667 C16.017752,42.4666667 13.1766186,39.6255333 13.1766186,36.1333333 C13.1766186,32.6411333 16.017752,29.8 19.509952,29.8 C23.002152,29.8 25.8432853,32.6411333 25.8432853,36.1333333 C25.8432853,39.6255333 23.002152,42.4666667 19.509952,42.4666667 L19.509952,42.4666667 Z M35.3432853,7 L3.67661862,7 C1.93051862,7 0.509951956,8.42056667 0.509951956,10.1666667 L0.509951956,13.9666667 C0.509951956,14.3162667 0.793685289,14.6 1.14328529,14.6 L35.3432853,14.6 C35.6928853,14.6 35.9766186,14.3162667 35.9766186,13.9666667 C35.9766186,13.6170667 35.6928853,13.3333333 35.3432853,13.3333333 L1.77661862,13.3333333 L1.77661862,10.1666667 C1.77661862,9.11913333 2.62908529,8.26666667 3.67661862,8.26666667 L35.3432853,8.26666667 C36.3908186,8.26666667 37.2432853,9.11913333 37.2432853,10.1666667 L37.2432853,41.8333333 C37.2432853,42.9163333 36.4262853,43.7333333 35.3432853,43.7333333 L30.5932853,43.7333333 L29.1796853,41.8479 C29.766152,41.0594 30.184152,40.1296667 30.4248186,39.3715667 C31.303252,39.1828333 32.1158186,39.0086667 32.304552,38.9700333 C33.0183186,38.8231 33.4439186,38.236 33.4439186,37.3993667 C33.4432853,36.9243667 33.4432853,35.3283667 33.4439186,34.8654 C33.442652,34.0357333 33.018952,33.4492667 32.310252,33.2966333 L30.429252,32.8938333 C30.203152,32.1306667 29.8985186,31.396 29.521052,30.6999667 C30.0080853,29.9469333 30.457752,29.2521667 30.5635186,29.0919333 C30.9637853,28.4833 30.8497853,27.7676333 30.258252,27.1761 L28.466552,25.3844 C27.8788186,24.7979333 27.165052,24.6826667 26.5545186,25.0766 L24.9414186,26.1209667 C24.2453853,25.7435 23.5100853,25.4388667 22.7469186,25.2134 C22.5588186,24.3375 22.3859186,23.5274667 22.346652,23.3387333 C22.200352,22.6256 21.6126186,22.2 20.7766186,22.2 L18.2432853,22.2 C17.4129853,22.2 16.8265186,22.6237 16.6738853,23.3336667 L16.2710853,25.2140333 C15.5079186,25.4401333 14.7726186,25.7441333 14.0765853,26.1222333 C13.3241853,25.6358333 12.6294186,25.1861667 12.468552,25.0797667 C11.8611853,24.6807667 11.1448853,24.7941333 10.553352,25.3856667 L8.76165196,27.1767333 C8.17518529,27.7632 8.05991862,28.4776 8.45385196,29.0881333 L9.49821862,30.7012333 C9.12011862,31.3966333 8.81611862,32.1325667 8.59001862,32.8957333 C7.71411862,33.0838333 6.90345196,33.2573667 6.71471862,33.2966333 C6.00221862,33.4442 5.57661862,34.0313 5.57661862,34.8673 L5.57661862,37.4 C5.57661862,38.2296667 6.00031862,38.8161333 6.71028529,38.9694 L8.59508529,39.3728333 C8.93328529,40.4444333 9.53051862,41.5439 10.1727186,42.2570333 C10.4064186,42.5173333 10.8066853,42.5376 11.0669853,42.3039 C11.3272853,42.0702 11.3481853,41.6699333 11.113852,41.4096333 C10.4406186,40.6610333 9.92445196,39.4963333 9.71165196,38.6742667 C9.65148529,38.4424667 9.46528529,38.2638667 9.23095196,38.2138333 L6.97628529,37.7306 C6.93005196,37.7204667 6.84328529,37.7021 6.84328529,37.4 L6.84328529,34.8666667 C6.84328529,34.5633 6.93638529,34.5436667 6.97058529,34.5367 C7.18655196,34.4923667 8.21635196,34.2719667 9.23095196,34.0534667 C9.46528529,34.0034333 9.65148529,33.8248333 9.71101862,33.5930333 C9.94725196,32.6791333 10.308252,31.8070333 10.7838853,31.0008 C10.9054853,30.7943333 10.9004186,30.5372 10.769952,30.3358 L9.51785196,28.4003333 C9.49188529,28.3604333 9.44375196,28.2857 9.65718529,28.0722667 L11.4488853,26.2805667 C11.6623186,26.0671333 11.7421186,26.1184333 11.7725186,26.1380667 C11.9561853,26.2590333 12.8403186,26.8309333 13.711152,27.3939667 C13.912552,27.5238 14.170952,27.5301333 14.3767853,27.4079 C15.1830186,26.9322667 16.0551186,26.5712667 16.9683853,26.3350333 C17.2008186,26.2748667 17.3787853,26.0886667 17.429452,25.8543333 L17.9126853,23.5990333 C17.9228186,23.5528 17.9411853,23.4666667 18.2432853,23.4666667 L20.7766186,23.4666667 C21.0799853,23.4666667 21.0989853,23.5591333 21.1065853,23.5939667 C21.1502853,23.8099333 21.3713186,24.8397333 21.5891853,25.8543333 C21.6392186,26.0886667 21.8178186,26.2748667 22.0496186,26.3344 C22.9635186,26.5706333 23.8356186,26.9316333 24.641852,27.4066333 C24.8483186,27.5288667 25.1060853,27.5231667 25.3074853,27.3927 L27.2416853,26.1406 C27.2815853,26.1152667 27.3575853,26.0658667 27.5710186,26.2799333 L29.363352,28.0716333 C29.5774186,28.2863333 29.524852,28.3655 29.5052186,28.3959 C29.384252,28.5795667 28.812352,29.4637 28.2486853,30.3345333 C28.118852,30.5359333 28.113152,30.7930667 28.2353853,31.0001667 C28.7110186,31.8057667 29.0720186,32.6778667 29.308252,33.5911333 C29.3684186,33.8235667 29.5539853,34.0015333 29.7883186,34.0522 L32.0436186,34.5354333 C32.089852,34.5455667 32.1766186,34.5639333 32.177252,34.8654 C32.1766186,35.3271 32.1766186,36.9256333 32.177252,37.4 C32.177252,37.7027333 32.084152,37.7223667 32.0486853,37.7293333 C31.833352,37.7736667 30.803552,37.9947 29.788952,38.2125667 C29.5546186,38.2626 29.3684186,38.4412 29.3088853,38.673 C29.0523853,39.6635333 28.500752,40.7389333 27.9028853,41.4128 C27.7033853,41.6382667 27.689452,41.9726667 27.869952,42.2133333 L29.769952,44.7466667 C29.889652,44.9062667 30.0771186,45 30.2766186,45 L35.3432853,45 C37.119152,45 38.509952,43.6092 38.509952,41.8333333 L38.509952,10.1666667 C38.509952,8.42056667 37.0893853,7 35.3432853,7 L35.3432853,7 Z M23.9432853,18.4 C24.2928853,18.4 24.5766186,18.1162667 24.5766186,17.7666667 C24.5766186,17.4170667 24.2928853,17.1333333 23.9432853,17.1333333 L21.409952,17.1333333 C21.060352,17.1333333 20.7766186,17.4170667 20.7766186,17.7666667 C20.7766186,18.1162667 21.060352,18.4 21.409952,18.4 L23.9432853,18.4 Z M34.0766186,18.4 C34.4262186,18.4 34.709952,18.1162667 34.709952,17.7666667 C34.709952,17.4170667 34.4262186,17.1333333 34.0766186,17.1333333 L31.5432853,17.1333333 C31.1936853,17.1333333 30.909952,17.4170667 30.909952,17.7666667 C30.909952,18.1162667 31.1936853,18.4 31.5432853,18.4 L34.0766186,18.4 Z M29.009952,18.4 C29.359552,18.4 29.6432853,18.1162667 29.6432853,17.7666667 C29.6432853,17.4170667 29.359552,17.1333333 29.009952,17.1333333 L26.4766186,17.1333333 C26.1270186,17.1333333 25.8432853,17.4170667 25.8432853,17.7666667 C25.8432853,18.1162667 26.1270186,18.4 26.4766186,18.4 L29.009952,18.4 Z M10.009952,18.4 C10.359552,18.4 10.6432853,18.1162667 10.6432853,17.7666667 C10.6432853,17.4170667 10.359552,17.1333333 10.009952,17.1333333 L4.94328529,17.1333333 C4.59368529,17.1333333 4.30995196,17.4170667 4.30995196,17.7666667 C4.30995196,18.1162667 4.59368529,18.4 4.94328529,18.4 L10.009952,18.4 Z M11.909952,10.8 C11.909952,11.4985667 12.478052,12.0666667 13.1766186,12.0666667 C13.8751853,12.0666667 14.4432853,11.4985667 14.4432853,10.8 C14.4432853,10.1014333 13.8751853,9.53333333 13.1766186,9.53333333 C12.478052,9.53333333 11.909952,10.1014333 11.909952,10.8 L11.909952,10.8 Z M8.10995196,10.8 C8.10995196,11.4985667 8.67805196,12.0666667 9.37661862,12.0666667 C10.0751853,12.0666667 10.6432853,11.4985667 10.6432853,10.8 C10.6432853,10.1014333 10.0751853,9.53333333 9.37661862,9.53333333 C8.67805196,9.53333333 8.10995196,10.1014333 8.10995196,10.8 L8.10995196,10.8 Z M4.30995196,10.8 C4.30995196,11.4985667 4.87805196,12.0666667 5.57661862,12.0666667 C6.27518529,12.0666667 6.84328529,11.4985667 6.84328529,10.8 C6.84328529,10.1014333 6.27518529,9.53333333 5.57661862,9.53333333 C4.87805196,9.53333333 4.30995196,10.1014333 4.30995196,10.8 L4.30995196,10.8 Z M27.7432853,44.3666667 C27.7432853,44.7162667 27.459552,45 27.109952,45 L3.67661862,45 C1.90075196,45 0.509951956,43.6092 0.509951956,41.8333333 L0.509951956,16.5 C0.509951956,16.1504 0.793685289,15.8666667 1.14328529,15.8666667 C1.49288529,15.8666667 1.77661862,16.1504 1.77661862,16.5 L1.77661862,41.8333333 C1.77661862,42.9163333 2.59361862,43.7333333 3.67661862,43.7333333 L27.109952,43.7333333 C27.459552,43.7333333 27.7432853,44.0170667 27.7432853,44.3666667 L27.7432853,44.3666667 Z" id="website-fix"></path>
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+</svg> \ No newline at end of file
diff --git a/sources/pyside6/doc/images/Tooling.svg b/sources/pyside6/doc/images/Tooling.svg
new file mode 100644
index 000000000..98116957e
--- /dev/null
+++ b/sources/pyside6/doc/images/Tooling.svg
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="49px" height="48px" viewBox="0 0 49 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!-- Generator: Sketch 44.1 (41455) - http://www.bohemiancoding.com/sketch -->
+ <title>web-development</title>
+ <desc>Created with Sketch.</desc>
+ <defs>
+ <linearGradient x1="100%" y1="100%" x2="-22.8515625%" y2="-33.2356771%" id="linearGradient-1">
+ <stop stop-color="#6FFF80" offset="0%"></stop>
+ <stop stop-color="#43CE57" offset="37.2587344%"></stop>
+ <stop stop-color="#425FD0" offset="100%"></stop>
+ </linearGradient>
+ </defs>
+ <g id="Mainpage" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+ <g id="Mainpage_Layout_V4_Megamenu" transform="translate(-1084.000000, -1756.000000)" fill="url(#linearGradient-1)">
+ <g id="Content" transform="translate(-44.000000, 1530.000000)">
+ <g id="WhatQtis" transform="translate(194.000000, 0.000000)">
+ <g id="Block3_Hover" transform="translate(726.316067, 114.000000)">
+ <path d="M214.4,115.2 C215.2816,115.2 216,115.9176 216,116.8 C216,117.6824 215.2816,118.4 214.4,118.4 C213.5176,118.4 212.8,117.6824 212.8,116.8 C212.8,115.9176 213.5176,115.2 214.4,115.2 L214.4,115.2 Z M217.6,116.8 C217.6,117.6824 218.3176,118.4 219.2,118.4 C220.0816,118.4 220.8,117.6824 220.8,116.8 C220.8,115.9176 220.0816,115.2 219.2,115.2 C218.3176,115.2 217.6,115.9176 217.6,116.8 L217.6,116.8 Z M222.4,116.8 C222.4,117.6824 223.1176,118.4 224,118.4 C224.8816,118.4 225.6,117.6824 225.6,116.8 C225.6,115.9176 224.8816,115.2 224,115.2 C223.1176,115.2 222.4,115.9176 222.4,116.8 L222.4,116.8 Z M215.2,128 L216.8,128 C217.2424,128 217.6,127.6416 217.6,127.2 C217.6,126.7584 217.2424,126.4 216.8,126.4 L215.2,126.4 C214.7576,126.4 214.4,126.7584 214.4,127.2 C214.4,127.6416 214.7576,128 215.2,128 L215.2,128 Z M215.2,131.2 L216.8,131.2 C217.2424,131.2 217.6,130.8416 217.6,130.4 C217.6,129.9584 217.2424,129.6 216.8,129.6 L215.2,129.6 C214.7576,129.6 214.4,129.9584 214.4,130.4 C214.4,130.8416 214.7576,131.2 215.2,131.2 L215.2,131.2 Z M215.2,134.4 L216.8,134.4 C217.2424,134.4 217.6,134.0416 217.6,133.6 C217.6,133.1584 217.2424,132.8 216.8,132.8 L215.2,132.8 C214.7576,132.8 214.4,133.1584 214.4,133.6 C214.4,134.0416 214.7576,134.4 215.2,134.4 L215.2,134.4 Z M215.2,137.6 L216.8,137.6 C217.2424,137.6 217.6,137.2416 217.6,136.8 C217.6,136.3584 217.2424,136 216.8,136 L215.2,136 C214.7576,136 214.4,136.3584 214.4,136.8 C214.4,137.2416 214.7576,137.6 215.2,137.6 L215.2,137.6 Z M215.2,140.8 L216.8,140.8 C217.2424,140.8 217.6,140.4416 217.6,140 C217.6,139.5584 217.2424,139.2 216.8,139.2 L215.2,139.2 C214.7576,139.2 214.4,139.5584 214.4,140 C214.4,140.4416 214.7576,140.8 215.2,140.8 L215.2,140.8 Z M215.2,144 L216.8,144 C217.2424,144 217.6,143.6416 217.6,143.2 C217.6,142.7584 217.2424,142.4 216.8,142.4 L215.2,142.4 C214.7576,142.4 214.4,142.7584 214.4,143.2 C214.4,143.6416 214.7576,144 215.2,144 L215.2,144 Z M215.2,147.2 L216.8,147.2 C217.2424,147.2 217.6,146.8416 217.6,146.4 C217.6,145.9584 217.2424,145.6 216.8,145.6 L215.2,145.6 C214.7576,145.6 214.4,145.9584 214.4,146.4 C214.4,146.8416 214.7576,147.2 215.2,147.2 L215.2,147.2 Z M215.2,150.4 L216.8,150.4 C217.2424,150.4 217.6,150.0416 217.6,149.6 C217.6,149.1584 217.2424,148.8 216.8,148.8 L215.2,148.8 C214.7576,148.8 214.4,149.1584 214.4,149.6 C214.4,150.0416 214.7576,150.4 215.2,150.4 L215.2,150.4 Z M215.2,153.6 L216.8,153.6 C217.2424,153.6 217.6,153.2416 217.6,152.8 C217.6,152.3584 217.2424,152 216.8,152 L215.2,152 C214.7576,152 214.4,152.3584 214.4,152.8 C214.4,153.2416 214.7576,153.6 215.2,153.6 L215.2,153.6 Z M242.4,128 C242.8424,128 243.2,127.6416 243.2,127.2 C243.2,126.7584 242.8424,126.4 242.4,126.4 L239.2,126.4 C238.7576,126.4 238.4,126.7584 238.4,127.2 C238.4,127.6416 238.7576,128 239.2,128 L242.4,128 L242.4,128 Z M235.2,130.4 C235.2,130.8416 235.5576,131.2 236,131.2 L244,131.2 C244.4424,131.2 244.8,130.8416 244.8,130.4 C244.8,129.9584 244.4424,129.6 244,129.6 L236,129.6 C235.5576,129.6 235.2,129.9584 235.2,130.4 L235.2,130.4 Z M220,131.2 L232.8,131.2 C233.2424,131.2 233.6,130.8416 233.6,130.4 C233.6,129.9584 233.2424,129.6 232.8,129.6 L220,129.6 C219.5576,129.6 219.2,129.9584 219.2,130.4 C219.2,130.8416 219.5576,131.2 220,131.2 L220,131.2 Z M220,128 L228,128 C228.4424,128 228.8,127.6416 228.8,127.2 C228.8,126.7584 228.4424,126.4 228,126.4 L220,126.4 C219.5576,126.4 219.2,126.7584 219.2,127.2 C219.2,127.6416 219.5576,128 220,128 L220,128 Z M236,126.4 L231.2,126.4 C230.7576,126.4 230.4,126.7584 230.4,127.2 C230.4,127.6416 230.7576,128 231.2,128 L236,128 C236.4424,128 236.8,127.6416 236.8,127.2 C236.8,126.7584 236.4424,126.4 236,126.4 L236,126.4 Z M248,133.6 C248,133.1584 247.6424,132.8 247.2,132.8 L234.4,132.8 C233.9576,132.8 233.6,133.1584 233.6,133.6 C233.6,134.0416 233.9576,134.4 234.4,134.4 L247.2,134.4 C247.6424,134.4 248,134.0416 248,133.6 L248,133.6 Z M242.4,137.6 C242.8424,137.6 243.2,137.2416 243.2,136.8 C243.2,136.3584 242.8424,136 242.4,136 L236,136 C235.5576,136 235.2,136.3584 235.2,136.8 C235.2,137.2416 235.5576,137.6 236,137.6 L242.4,137.6 L242.4,137.6 Z M220,137.6 L232.8,137.6 C233.2424,137.6 233.6,137.2416 233.6,136.8 C233.6,136.3584 233.2424,136 232.8,136 L220,136 C219.5576,136 219.2,136.3584 219.2,136.8 C219.2,137.2416 219.5576,137.6 220,137.6 L220,137.6 Z M220,134.4 L223.2,134.4 C223.6424,134.4 224,134.0416 224,133.6 C224,133.1584 223.6424,132.8 223.2,132.8 L220,132.8 C219.5576,132.8 219.2,133.1584 219.2,133.6 C219.2,134.0416 219.5576,134.4 220,134.4 L220,134.4 Z M226.4,132.8 C225.9576,132.8 225.6,133.1584 225.6,133.6 C225.6,134.0416 225.9576,134.4 226.4,134.4 L231.2,134.4 C231.6424,134.4 232,134.0416 232,133.6 C232,133.1584 231.6424,132.8 231.2,132.8 L226.4,132.8 L226.4,132.8 Z M237.6,146.4 C237.6,145.9584 237.2424,145.6 236.8,145.6 L234.4,145.6 C233.9576,145.6 233.6,145.9584 233.6,146.4 C233.6,146.8416 233.9576,147.2 234.4,147.2 L236.8,147.2 C237.2424,147.2 237.6,146.8416 237.6,146.4 L237.6,146.4 Z M220,147.2 L223.2,147.2 C223.6424,147.2 224,146.8416 224,146.4 C224,145.9584 223.6424,145.6 223.2,145.6 L220,145.6 C219.5576,145.6 219.2,145.9584 219.2,146.4 C219.2,146.8416 219.5576,147.2 220,147.2 L220,147.2 Z M231.2,145.6 L226.4,145.6 C225.9576,145.6 225.6,145.9584 225.6,146.4 C225.6,146.8416 225.9576,147.2 226.4,147.2 L231.2,147.2 C231.6424,147.2 232,146.8416 232,146.4 C232,145.9584 231.6424,145.6 231.2,145.6 L231.2,145.6 Z M220,150.4 L229.6,150.4 C230.0424,150.4 230.4,150.0416 230.4,149.6 C230.4,149.1584 230.0424,148.8 229.6,148.8 L220,148.8 C219.5576,148.8 219.2,149.1584 219.2,149.6 C219.2,150.0416 219.5576,150.4 220,150.4 L220,150.4 Z M232.8,150.4 L234.4,150.4 C234.8424,150.4 235.2,150.0416 235.2,149.6 C235.2,149.1584 234.8424,148.8 234.4,148.8 L232.8,148.8 C232.3576,148.8 232,149.1584 232,149.6 C232,150.0416 232.3576,150.4 232.8,150.4 L232.8,150.4 Z M220,153.6 L224.8,153.6 C225.2424,153.6 225.6,153.2416 225.6,152.8 C225.6,152.3584 225.2424,152 224.8,152 L220,152 C219.5576,152 219.2,152.3584 219.2,152.8 C219.2,153.2416 219.5576,153.6 220,153.6 L220,153.6 Z M227.2,152.8 C227.2,153.2416 227.5576,153.6 228,153.6 L236,153.6 C236.4424,153.6 236.8,153.2416 236.8,152.8 C236.8,152.3584 236.4424,152 236,152 L228,152 C227.5576,152 227.2,152.3584 227.2,152.8 L227.2,152.8 Z M244.8,140 C244.8,139.5584 244.4424,139.2 244,139.2 L231.2,139.2 C230.7576,139.2 230.4,139.5584 230.4,140 C230.4,140.4416 230.7576,140.8 231.2,140.8 L244,140.8 C244.4424,140.8 244.8,140.4416 244.8,140 L244.8,140 Z M239.2,143.2 C239.2,142.7584 238.8424,142.4 238.4,142.4 L232.8,142.4 C232.3576,142.4 232,142.7584 232,143.2 C232,143.6416 232.3576,144 232.8,144 L238.4,144 C238.8424,144 239.2,143.6416 239.2,143.2 L239.2,143.2 Z M220,144 L229.6,144 C230.0424,144 230.4,143.6416 230.4,143.2 C230.4,142.7584 230.0424,142.4 229.6,142.4 L220,142.4 C219.5576,142.4 219.2,142.7584 219.2,143.2 C219.2,143.6416 219.5576,144 220,144 L220,144 Z M220,140.8 L228,140.8 C228.4424,140.8 228.8,140.4416 228.8,140 C228.8,139.5584 228.4424,139.2 228,139.2 L220,139.2 C219.5576,139.2 219.2,139.5584 219.2,140 C219.2,140.4416 219.5576,140.8 220,140.8 L220,140.8 Z M256,149.6 L256,152.8 C256,153.2416 255.6424,153.6 255.2,153.6 L253.9816,153.6 C253.8976,153.8384 253.8008,154.072 253.692,154.3 L254.5528,155.1608 C254.8656,155.4736 254.8656,155.98 254.5528,156.292 L252.2904,158.5544 C252.1408,158.7048 251.9376,158.7888 251.7248,158.7888 C251.5128,158.7888 251.3096,158.7048 251.1592,158.5544 L250.2976,157.6928 C250.0704,157.8008 249.8376,157.8976 249.5992,157.9816 L249.5992,159.2 C249.5992,159.6416 249.2416,160 248.7992,160 L245.5992,160 C245.1568,160 244.7992,159.6416 244.7992,159.2 L244.7992,157.9816 C244.5616,157.8976 244.3288,157.8008 244.1008,157.692 L243.24,158.5528 C242.94,158.8528 242.4088,158.8528 242.1088,158.5528 L239.8464,156.2904 C239.5336,155.9784 239.5336,155.472 239.8464,155.1592 L240.7072,154.2984 C240.5992,154.0704 240.5024,153.8376 240.4184,153.6 L239.2,153.6 C238.7576,153.6 238.4,153.2416 238.4,152.8 L238.4,149.6 C238.4,149.1584 238.7576,148.8 239.2,148.8 L240.4184,148.8 C240.5024,148.5616 240.5992,148.328 240.708,148.1 L239.8472,147.2392 C239.5344,146.9264 239.5344,146.42 239.8472,146.108 L242.1088,143.8456 C242.4088,143.5456 242.94,143.5456 243.24,143.8456 L244.1016,144.7072 C244.3288,144.5984 244.5624,144.5016 244.8008,144.4176 L244.8008,143.2 C244.8008,142.7584 245.1584,142.4 245.6008,142.4 L248.8,142.4 C249.2424,142.4 249.6,142.7584 249.6,143.2 L249.6,144.4176 C249.8384,144.5016 250.072,144.5984 250.2984,144.7064 L251.16,143.8456 C251.4728,143.5344 251.9792,143.5336 252.2912,143.8464 L254.5536,146.1088 C254.8664,146.4208 254.8664,146.9272 254.5536,147.24 L253.6928,148.1008 C253.8016,148.3288 253.8976,148.5624 253.9816,148.8 L255.2,148.8 C255.6424,148.8 256,149.1584 256,149.6 L256,149.6 Z M254.4,150.4 L253.3896,150.4 C253.0248,150.4 252.7064,150.1528 252.6152,149.7992 C252.4848,149.2928 252.2848,148.8088 252.0192,148.3608 C251.8344,148.0464 251.8848,147.6464 252.1432,147.388 L252.8568,146.6744 L251.7256,145.5432 L251.012,146.2568 C250.7528,146.5144 250.352,146.5648 250.0392,146.3792 C249.5928,146.116 249.1088,145.916 248.6,145.784 C248.2472,145.6928 248,145.3744 248,145.0096 L248,144 L246.4008,144 L246.4008,145.0096 C246.4008,145.3744 246.1536,145.6928 245.8008,145.784 C245.292,145.916 244.8072,146.116 244.36,146.38 C244.0472,146.5656 243.6472,146.5152 243.388,146.256 L242.6744,145.5424 L241.544,146.6736 L242.2568,147.3872 C242.5152,147.6456 242.5656,148.0456 242.3808,148.36 C242.1152,148.8072 241.9152,149.292 241.7848,149.7992 C241.6936,150.1528 241.3752,150.4 241.0104,150.4 L240,150.4 L240,152 L241.0104,152 C241.3752,152 241.6936,152.2472 241.7848,152.6 C241.9152,153.1064 242.1152,153.5904 242.3808,154.0384 C242.5656,154.3528 242.5152,154.7528 242.2568,155.0112 L241.5432,155.7248 L242.6744,156.856 L243.388,156.1424 C243.6472,155.884 244.048,155.8336 244.3608,156.0192 C244.8112,156.2848 245.2944,156.4848 245.7976,156.6144 C246.152,156.7048 246.3992,157.024 246.3992,157.3888 L246.3992,158.4 L247.9992,158.4 L247.9992,157.3896 C247.9992,157.0248 248.2464,156.7056 248.6,156.6152 C249.1064,156.4848 249.5904,156.284 250.0384,156.02 C250.352,155.8344 250.7536,155.8848 251.0112,156.1432 L251.7248,156.8576 L252.856,155.7264 L252.1424,155.0128 C251.8832,154.7544 251.8336,154.3536 252.0192,154.0392 C252.2848,153.5912 252.4848,153.1072 252.6152,152.6008 C252.7064,152.2472 253.0248,152 253.3896,152 L254.4,152 L254.4,150.4 L254.4,150.4 Z M249.6,151.2 C249.6,152.5232 248.5232,153.6 247.2,153.6 C245.8768,153.6 244.8,152.5232 244.8,151.2 C244.8,149.8768 245.8768,148.8 247.2,148.8 C248.5232,148.8 249.6,149.8768 249.6,151.2 L249.6,151.2 Z M248,151.2 C248,150.7592 247.6416,150.4 247.2,150.4 C246.7584,150.4 246.4,150.7592 246.4,151.2 C246.4,151.6408 246.7584,152 247.2,152 C247.6416,152 248,151.6408 248,151.2 L248,151.2 Z M239.2,158.4 L212,158.4 C210.6768,158.4 209.6,157.3232 209.6,156 L209.6,124 C209.6,123.5584 209.2424,123.2 208.8,123.2 C208.3576,123.2 208,123.5584 208,124 L208,156 C208,158.2056 209.7944,160 212,160 L239.2,160 C239.6424,160 240,159.6416 240,159.2 C240,158.7584 239.6424,158.4 239.2,158.4 L239.2,158.4 Z M252,112 L212,112 C209.7944,112 208,113.7944 208,116 L208,120.8 C208,121.2416 208.3576,121.6 208.8,121.6 L252,121.6 C252.4424,121.6 252.8,121.2416 252.8,120.8 C252.8,120.3584 252.4424,120 252,120 L209.6,120 L209.6,116 C209.6,114.6768 210.6768,113.6 212,113.6 L252,113.6 C253.3232,113.6 254.4,114.6768 254.4,116 L254.4,143.2 C254.4,143.6416 254.7576,144 255.2,144 C255.6424,144 256,143.6416 256,143.2 L256,116 C256,113.7944 254.2056,112 252,112 L252,112 Z" id="web-development"></path>
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+</svg> \ No newline at end of file
diff --git a/sources/pyside6/doc/images/Training.svg b/sources/pyside6/doc/images/Training.svg
new file mode 100644
index 000000000..96ecf71ec
--- /dev/null
+++ b/sources/pyside6/doc/images/Training.svg
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="38px" height="38px" viewBox="0 0 38 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!-- Generator: Sketch 44.1 (41455) - http://www.bohemiancoding.com/sketch -->
+ <title>presentation-man</title>
+ <desc>Created with Sketch.</desc>
+ <defs>
+ <linearGradient x1="100%" y1="100%" x2="-22.8515625%" y2="-33.2356771%" id="linearGradient-1">
+ <stop stop-color="#6FFF80" offset="0%"></stop>
+ <stop stop-color="#43CE57" offset="37.2587344%"></stop>
+ <stop stop-color="#425FD0" offset="100%"></stop>
+ </linearGradient>
+ </defs>
+ <g id="Mainpage" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+ <g id="Mainpage_Layout_V4_Megamenu" transform="translate(-264.000000, -5885.000000)" fill="url(#linearGradient-1)">
+ <g id="Content" transform="translate(-44.000000, 1530.000000)">
+ <g id="Support" transform="translate(277.000000, 4042.000000)">
+ <g id="1" transform="translate(30.774880, 308.000000)">
+ <path d="M38.2251201,6.9 L38.2251201,9.43333333 C38.2251201,9.78293333 37.9413868,10.0666667 37.5917868,10.0666667 L36.9584534,10.0666667 L36.9584534,24.6333333 C36.9584534,24.9829333 36.6747201,25.2666667 36.3251201,25.2666667 C35.9755201,25.2666667 35.6917868,24.9829333 35.6917868,24.6333333 L35.6917868,9.43333333 C35.6917868,9.08373333 35.9755201,8.8 36.3251201,8.8 L36.9584534,8.8 L36.9584534,7.53333333 L1.49178678,7.53333333 L1.49178678,8.8 L33.7917868,8.8 C34.1413868,8.8 34.4251201,9.08373333 34.4251201,9.43333333 C34.4251201,9.78293333 34.1413868,10.0666667 33.7917868,10.0666667 L0.858453443,10.0666667 C0.508853443,10.0666667 0.22512011,9.78293333 0.22512011,9.43333333 L0.22512011,6.9 C0.22512011,6.5504 0.508853443,6.26666667 0.858453443,6.26666667 L18.5917868,6.26666667 L18.5917868,5.63333333 C18.5917868,5.28373333 18.8755201,5 19.2251201,5 C19.5747201,5 19.8584534,5.28373333 19.8584534,5.63333333 L19.8584534,6.26666667 L37.5917868,6.26666667 C37.9413868,6.26666667 38.2251201,6.5504 38.2251201,6.9 L38.2251201,6.9 Z M8.45845344,15.1333333 L13.5251201,15.1333333 C13.8747201,15.1333333 14.1584534,14.8496 14.1584534,14.5 C14.1584534,14.1504 13.8747201,13.8666667 13.5251201,13.8666667 L8.45845344,13.8666667 C8.10885344,13.8666667 7.82512011,14.1504 7.82512011,14.5 C7.82512011,14.8496 8.10885344,15.1333333 8.45845344,15.1333333 L8.45845344,15.1333333 Z M8.45845344,18.9333333 L19.8584534,18.9333333 C20.2080534,18.9333333 20.4917868,18.6496 20.4917868,18.3 C20.4917868,17.9504 20.2080534,17.6666667 19.8584534,17.6666667 L8.45845344,17.6666667 C8.10885344,17.6666667 7.82512011,17.9504 7.82512011,18.3 C7.82512011,18.6496 8.10885344,18.9333333 8.45845344,18.9333333 L8.45845344,18.9333333 Z M18.5917868,15.1333333 C18.9413868,15.1333333 19.2251201,14.8496 19.2251201,14.5 C19.2251201,14.1504 18.9413868,13.8666667 18.5917868,13.8666667 L16.0584534,13.8666667 C15.7088534,13.8666667 15.4251201,14.1504 15.4251201,14.5 C15.4251201,14.8496 15.7088534,15.1333333 16.0584534,15.1333333 L18.5917868,15.1333333 L18.5917868,15.1333333 Z M8.45845344,22.7333333 L10.3584534,22.7333333 C10.7080534,22.7333333 10.9917868,22.4496 10.9917868,22.1 C10.9917868,21.7504 10.7080534,21.4666667 10.3584534,21.4666667 L8.45845344,21.4666667 C8.10885344,21.4666667 7.82512011,21.7504 7.82512011,22.1 C7.82512011,22.4496 8.10885344,22.7333333 8.45845344,22.7333333 L8.45845344,22.7333333 Z M19.8584534,21.4666667 L13.5251201,21.4666667 C13.1755201,21.4666667 12.8917868,21.7504 12.8917868,22.1 C12.8917868,22.4496 13.1755201,22.7333333 13.5251201,22.7333333 L19.8584534,22.7333333 C20.2080534,22.7333333 20.4917868,22.4496 20.4917868,22.1 C20.4917868,21.7504 20.2080534,21.4666667 19.8584534,21.4666667 L19.8584534,21.4666667 Z M31.2996201,25.2749 C30.9690201,25.2742667 30.6757868,25.4953 30.6308201,25.8221 L28.7308201,39.7478333 C28.6839534,40.0942667 28.9258868,40.4134667 29.2729534,40.4609667 C29.3020868,40.4647667 29.3305868,40.4666667 29.3597201,40.4666667 C29.6713201,40.4666667 29.9423868,40.2367667 29.9860868,39.9188333 L31.8107201,26.5472667 C33.9976201,26.6023667 35.4935534,27.0178333 36.2611534,27.7841667 C36.7304534,28.2522 36.9584534,28.8792 36.9584534,29.7 L36.9584534,39.8333333 C36.9584534,40.1829333 37.2421868,40.4666667 37.5917868,40.4666667 C37.9413868,40.4666667 38.2251201,40.1829333 38.2251201,39.8333333 L38.2251201,29.7 C38.2251201,28.5416333 37.8653868,27.5954333 37.1560534,26.888 C36.0692534,25.8024667 34.1534201,25.2749 31.2996201,25.2749 L31.2996201,25.2749 Z M25.5527534,25.8145 L27.4527534,39.7478333 C27.4996201,40.0942667 27.2570534,40.4134667 26.9106201,40.4609667 C26.5654534,40.5097333 26.2443534,40.2659 26.1974868,39.9188333 L24.3722201,26.5333333 L14.1584534,26.5333333 L14.1584534,29.0666667 L21.1251201,29.0666667 C21.4506534,29.0666667 21.7229868,29.3130333 21.7552868,29.6366667 L23.0219534,42.3033333 C23.0567868,42.6516667 22.8028201,42.962 22.4551201,42.9968333 C22.4335868,42.9987333 22.4120534,43 22.3911534,43 C22.0694201,43 21.7945534,42.7561667 21.7616201,42.43 L20.5519534,30.3333333 L12.2584534,30.3333333 C9.30648678,30.3333333 7.82512011,27.4909333 7.82512011,25.9 C7.82512011,25.5504 8.10885344,25.2666667 8.45845344,25.2666667 L24.9251201,25.2666667 C25.2417868,25.2666667 25.5096868,25.501 25.5527534,25.8145 L25.5527534,25.8145 Z M12.8917868,26.5333333 L9.20135344,26.5333333 C9.51105344,27.5688333 10.4863868,29.0666667 12.2584534,29.0666667 L12.8917868,29.0666667 L12.8917868,26.5333333 L12.8917868,26.5333333 Z M29.3584534,26.5333333 C29.3584534,25.8347667 28.7903534,25.2666667 28.0917868,25.2666667 C27.3932201,25.2666667 26.8251201,25.8347667 26.8251201,26.5333333 C26.8251201,27.0001 27.0816201,27.4041667 27.4584534,27.6239333 L27.4584534,32.2333333 C27.4584534,32.5829333 27.7421868,32.8666667 28.0917868,32.8666667 C28.4413868,32.8666667 28.7251201,32.5829333 28.7251201,32.2333333 L28.7251201,27.6239333 C29.1019534,27.4041667 29.3584534,27.0001 29.3584534,26.5333333 L29.3584534,26.5333333 Z M33.1584534,15.1333333 L33.1584534,15.3037 C33.5365534,15.5228333 33.7917868,15.9319667 33.7917868,16.4 L33.7917868,17.6666667 C33.7917868,18.1442 33.5257868,18.5615667 33.1337534,18.7769 C33.0134201,19.9941667 32.4839534,21.0657667 32.4586201,21.1164333 C31.8841868,22.2646667 31.0165201,24 28.0917868,24 C25.1670534,24 24.2993868,22.2646667 23.7255868,21.1164333 C23.6996201,21.0657667 23.1701534,19.9941667 23.0498201,18.7769 C22.6577868,18.5615667 22.3917868,18.1442 22.3917868,17.6666667 L22.3917868,16.4 C22.3917868,15.9319667 22.6470201,15.5228333 23.0251201,15.3037 L23.0251201,15.1333333 C23.0251201,13.0376333 24.7294201,11.3333333 26.8251201,11.3333333 L29.3584534,11.3333333 C31.4541534,11.3333333 33.1584534,13.0376333 33.1584534,15.1333333 L33.1584534,15.1333333 Z M32.5251201,16.4 C32.1755201,16.4 31.8917868,16.1162667 31.8917868,15.7666667 L31.8917868,15.1333333 C31.8917868,13.7362 30.7555868,12.6 29.3584534,12.6 L26.8251201,12.6 C25.4279868,12.6 24.2917868,13.7362 24.2917868,15.1333333 L24.2917868,15.7666667 C24.2917868,16.1162667 24.0080534,16.4 23.6584534,16.4 L23.6584534,17.6666667 C24.0080534,17.6666667 24.2917868,17.9504 24.2917868,18.3 C24.2917868,19.3956667 24.8529201,20.5394667 24.8586201,20.5508667 C25.5179201,21.8688333 26.0993201,22.7333333 28.0917868,22.7333333 C30.0842534,22.7333333 30.6656534,21.8688333 31.3249534,20.5502333 C31.3306534,20.5394667 31.8917868,19.3956667 31.8917868,18.3 C31.8917868,17.9504 32.1755201,17.6666667 32.5251201,17.6666667 L32.5251201,16.4 L32.5251201,16.4 Z M29.9917868,16.4 L29.3584534,16.4 C29.0088534,16.4 28.7251201,16.6837333 28.7251201,17.0333333 C28.7251201,17.3829333 29.0088534,17.6666667 29.3584534,17.6666667 L29.9917868,17.6666667 C30.3413868,17.6666667 30.6251201,17.3829333 30.6251201,17.0333333 C30.6251201,16.6837333 30.3413868,16.4 29.9917868,16.4 L29.9917868,16.4 Z M26.8251201,16.4 L26.1917868,16.4 C25.8421868,16.4 25.5584534,16.6837333 25.5584534,17.0333333 C25.5584534,17.3829333 25.8421868,17.6666667 26.1917868,17.6666667 L26.8251201,17.6666667 C27.1747201,17.6666667 27.4584534,17.3829333 27.4584534,17.0333333 C27.4584534,16.6837333 27.1747201,16.4 26.8251201,16.4 L26.8251201,16.4 Z M33.7917868,32.8666667 C33.4421868,32.8666667 33.1584534,33.1504 33.1584534,33.5 L33.1584534,42.3666667 C33.1584534,42.7162667 33.4421868,43 33.7917868,43 C34.1413868,43 34.4251201,42.7162667 34.4251201,42.3666667 L34.4251201,33.5 C34.4251201,33.1504 34.1413868,32.8666667 33.7917868,32.8666667 L33.7917868,32.8666667 Z M19.2251201,32.8666667 L4.65845344,32.8666667 C3.57545344,32.8666667 2.75845344,32.0496667 2.75845344,30.9666667 L2.75845344,11.9666667 C2.75845344,11.6170667 2.47472011,11.3333333 2.12512011,11.3333333 C1.77552011,11.3333333 1.49178678,11.6170667 1.49178678,11.9666667 L1.49178678,30.9666667 C1.49178678,32.7425333 2.88258678,34.1333333 4.65845344,34.1333333 L19.2251201,34.1333333 C19.5747201,34.1333333 19.8584534,33.8496 19.8584534,33.5 C19.8584534,33.1504 19.5747201,32.8666667 19.2251201,32.8666667 L19.2251201,32.8666667 Z" id="presentation-man"></path>
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+</svg> \ No newline at end of file
diff --git a/sources/pyside6/doc/images/Tutorials.svg b/sources/pyside6/doc/images/Tutorials.svg
new file mode 100644
index 000000000..1bbf54e53
--- /dev/null
+++ b/sources/pyside6/doc/images/Tutorials.svg
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="38px" height="38px" viewBox="0 0 38 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!-- Generator: Sketch 44.1 (41455) - http://www.bohemiancoding.com/sketch -->
+ <title>design-skills</title>
+ <desc>Created with Sketch.</desc>
+ <defs>
+ <linearGradient x1="100%" y1="100%" x2="-22.8515625%" y2="-33.2356771%" id="linearGradient-1">
+ <stop stop-color="#6FFF80" offset="0%"></stop>
+ <stop stop-color="#43CE57" offset="37.2587344%"></stop>
+ <stop stop-color="#425FD0" offset="100%"></stop>
+ </linearGradient>
+ </defs>
+ <g id="Mainpage" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+ <g id="Mainpage_Layout_V4_Megamenu" transform="translate(-798.000000, -5886.000000)" fill="url(#linearGradient-1)">
+ <g id="Content" transform="translate(-44.000000, 1530.000000)">
+ <g id="Support" transform="translate(277.000000, 4042.000000)">
+ <g id="1" transform="translate(564.490048, 308.000000)">
+ <path d="M0.509951956,25.6333333 L0.509951956,9.16666667 C0.509951956,7.539 2.04895196,6 3.67661862,6 L7.47661862,6 C7.82621862,6 8.10995196,6.28373333 8.10995196,6.63333333 C8.10995196,6.98293333 7.82621862,7.26666667 7.47661862,7.26666667 L3.67661862,7.26666667 C2.75321862,7.26666667 1.77661862,8.24326667 1.77661862,9.16666667 L1.77661862,25.6333333 C1.77661862,25.9829333 1.49288529,26.2666667 1.14328529,26.2666667 C0.793685289,26.2666667 0.509951956,25.9829333 0.509951956,25.6333333 L0.509951956,25.6333333 Z M35.3432853,6 L29.009952,6 C28.660352,6 28.3766186,6.28373333 28.3766186,6.63333333 C28.3766186,6.98293333 28.660352,7.26666667 29.009952,7.26666667 L35.3432853,7.26666667 C36.2666853,7.26666667 37.2432853,8.24326667 37.2432853,9.16666667 L37.2432853,31.9666667 C37.2432853,32.8900667 36.2666853,33.8666667 35.3432853,33.8666667 L3.67661862,33.8666667 C2.75321862,33.8666667 1.77661862,32.8900667 1.77661862,31.9666667 L1.77661862,28.8 L35.3432853,28.8 C35.6928853,28.8 35.9766186,28.5162667 35.9766186,28.1666667 C35.9766186,27.8170667 35.6928853,27.5333333 35.3432853,27.5333333 L1.14328529,27.5333333 C0.793685289,27.5333333 0.509951956,27.8170667 0.509951956,28.1666667 L0.509951956,31.9666667 C0.509951956,33.5943333 2.04895196,35.1333333 3.67661862,35.1333333 L35.3432853,35.1333333 C36.970952,35.1333333 38.509952,33.5943333 38.509952,31.9666667 L38.509952,9.16666667 C38.509952,7.539 36.970952,6 35.3432853,6 L35.3432853,6 Z M18.2432853,31.3333333 C18.2432853,32.0319 18.8113853,32.6 19.509952,32.6 C20.2085186,32.6 20.7766186,32.0319 20.7766186,31.3333333 C20.7766186,30.6347667 20.2085186,30.0666667 19.509952,30.0666667 C18.8113853,30.0666667 18.2432853,30.6347667 18.2432853,31.3333333 L18.2432853,31.3333333 Z M26.4766186,42.7333333 L25.8432853,42.7333333 L25.8432853,42.1 C25.8432853,41.7504 25.559552,41.4666667 25.209952,41.4666667 C24.860352,41.4666667 24.5766186,41.7504 24.5766186,42.1 L24.5766186,42.7333333 L23.309952,42.7333333 L23.309952,42.1 C23.309952,41.7504 23.0262186,41.4666667 22.6766186,41.4666667 C22.3270186,41.4666667 22.0432853,41.7504 22.0432853,42.1 L22.0432853,42.7333333 L20.7766186,42.7333333 L20.7766186,42.1 C20.7766186,41.7504 20.4928853,41.4666667 20.1432853,41.4666667 C19.7936853,41.4666667 19.509952,41.7504 19.509952,42.1 L19.509952,42.7333333 L18.2432853,42.7333333 L18.2432853,42.1 C18.2432853,41.7504 17.959552,41.4666667 17.609952,41.4666667 C17.260352,41.4666667 16.9766186,41.7504 16.9766186,42.1 L16.9766186,42.7333333 L15.709952,42.7333333 L15.709952,42.1 C15.709952,41.7504 15.4262186,41.4666667 15.0766186,41.4666667 C14.7270186,41.4666667 14.4432853,41.7504 14.4432853,42.1 L14.4432853,42.7333333 L13.1766186,42.7333333 L13.1766186,42.1 C13.1766186,41.7504 12.8928853,41.4666667 12.5432853,41.4666667 C12.1936853,41.4666667 11.909952,41.7504 11.909952,42.1 L11.909952,42.7333333 L10.6432853,42.7333333 L10.6432853,42.1 C10.6432853,41.7504 10.359552,41.4666667 10.009952,41.4666667 C9.66035196,41.4666667 9.37661862,41.7504 9.37661862,42.1 L9.37661862,42.7333333 L8.10995196,42.7333333 L8.10995196,42.1 C8.10995196,41.7504 7.82621862,41.4666667 7.47661862,41.4666667 C7.12701862,41.4666667 6.84328529,41.7504 6.84328529,42.1 L6.84328529,42.7333333 L5.57661862,42.7333333 L5.57661862,42.1 C5.57661862,41.7504 5.29288529,41.4666667 4.94328529,41.4666667 C4.59368529,41.4666667 4.30995196,41.7504 4.30995196,42.1 L4.30995196,42.7333333 L3.67661862,42.7333333 C3.32701862,42.7333333 3.04328529,43.0170667 3.04328529,43.3666667 C3.04328529,43.7162667 3.32701862,44 3.67661862,44 L26.4766186,44 C26.8262186,44 27.109952,43.7162667 27.109952,43.3666667 C27.109952,43.0170667 26.8262186,42.7333333 26.4766186,42.7333333 L26.4766186,42.7333333 Z M16.9766186,39.5666667 L16.9766186,37.0333333 C16.9766186,36.6837333 16.6928853,36.4 16.3432853,36.4 C15.9936853,36.4 15.709952,36.6837333 15.709952,37.0333333 L15.709952,39.5666667 C15.709952,39.9162667 15.9936853,40.2 16.3432853,40.2 C16.6928853,40.2 16.9766186,39.9162667 16.9766186,39.5666667 L16.9766186,39.5666667 Z M22.6766186,40.2 C23.0262186,40.2 23.309952,39.9162667 23.309952,39.5666667 L23.309952,37.0333333 C23.309952,36.6837333 23.0262186,36.4 22.6766186,36.4 C22.3270186,36.4 22.0432853,36.6837333 22.0432853,37.0333333 L22.0432853,39.5666667 C22.0432853,39.9162667 22.3270186,40.2 22.6766186,40.2 L22.6766186,40.2 Z M35.9766186,42.7333333 L35.9766186,43.3666667 C35.9766186,43.7162667 35.6928853,44 35.3432853,44 L30.2766186,44 C29.9270186,44 29.6432853,43.7162667 29.6432853,43.3666667 L29.6432853,42.7333333 C29.6432853,41.3362 30.7794853,40.2 32.1766186,40.2 L33.4432853,40.2 C34.8404186,40.2 35.9766186,41.3362 35.9766186,42.7333333 L35.9766186,42.7333333 Z M34.709952,42.7333333 C34.709952,42.0347667 34.141852,41.4666667 33.4432853,41.4666667 L32.1766186,41.4666667 C31.478052,41.4666667 30.909952,42.0347667 30.909952,42.7333333 L34.709952,42.7333333 L34.709952,42.7333333 Z M22.6766186,26.2666667 C23.0262186,26.2666667 23.309952,25.9829333 23.309952,25.6333333 L23.309952,11.8817667 L25.8432853,7.82843333 L27.8674186,11.0666667 L25.209952,11.0666667 C24.860352,11.0666667 24.5766186,11.3504 24.5766186,11.7 C24.5766186,12.0496 24.860352,12.3333333 25.209952,12.3333333 L29.009952,12.3333333 C29.2404853,12.3333333 29.4520186,12.2085667 29.5641186,12.0071667 C29.6755853,11.8057667 29.669252,11.5594 29.5470186,11.3643333 L26.380352,6.29766667 C26.148552,5.92716667 25.5380186,5.92716667 25.3062186,6.29766667 L22.139552,11.3643333 C22.076852,11.4650333 22.0432853,11.5809333 22.0432853,11.7 L22.0432853,25.6333333 C22.0432853,25.9829333 22.3270186,26.2666667 22.6766186,26.2666667 L22.6766186,26.2666667 Z M10.009952,26.2666667 L13.809952,26.2666667 C14.159552,26.2666667 14.4432853,25.9829333 14.4432853,25.6333333 C14.4432853,25.2837333 14.159552,25 13.809952,25 L10.6432853,25 L10.6432853,23.7333333 L11.2766186,23.7333333 C11.6262186,23.7333333 11.909952,23.4496 11.909952,23.1 C11.909952,22.7504 11.6262186,22.4666667 11.2766186,22.4666667 L10.6432853,22.4666667 L10.6432853,21.2 L11.2766186,21.2 C11.6262186,21.2 11.909952,20.9162667 11.909952,20.5666667 C11.909952,20.2170667 11.6262186,19.9333333 11.2766186,19.9333333 L10.6432853,19.9333333 L10.6432853,18.6666667 L13.809952,18.6666667 C14.159552,18.6666667 14.4432853,18.3829333 14.4432853,18.0333333 C14.4432853,17.6837333 14.159552,17.4 13.809952,17.4 L10.6432853,17.4 L10.6432853,16.1333333 L11.2766186,16.1333333 C11.6262186,16.1333333 11.909952,15.8496 11.909952,15.5 C11.909952,15.1504 11.6262186,14.8666667 11.2766186,14.8666667 L10.6432853,14.8666667 L10.6432853,13.6 L11.2766186,13.6 C11.6262186,13.6 11.909952,13.3162667 11.909952,12.9666667 C11.909952,12.6170667 11.6262186,12.3333333 11.2766186,12.3333333 L10.6432853,12.3333333 L10.6432853,11.0666667 L13.809952,11.0666667 C14.159552,11.0666667 14.4432853,10.7829333 14.4432853,10.4333333 C14.4432853,10.0837333 14.159552,9.8 13.809952,9.8 L10.6432853,9.8 L10.6432853,7.26666667 L19.509952,7.26666667 L19.509952,25.6333333 C19.509952,25.9829333 19.7936853,26.2666667 20.1432853,26.2666667 C20.4928853,26.2666667 20.7766186,25.9829333 20.7766186,25.6333333 L20.7766186,6.63333333 C20.7766186,6.28373333 20.4928853,6 20.1432853,6 L10.009952,6 C9.66035196,6 9.37661862,6.28373333 9.37661862,6.63333333 L9.37661862,25.6333333 C9.37661862,25.9829333 9.66035196,26.2666667 10.009952,26.2666667 L10.009952,26.2666667 Z M29.009952,13.6 C28.660352,13.6 28.3766186,13.8837333 28.3766186,14.2333333 L28.3766186,25.6333333 C28.3766186,25.9829333 28.660352,26.2666667 29.009952,26.2666667 C29.359552,26.2666667 29.6432853,25.9829333 29.6432853,25.6333333 L29.6432853,14.2333333 C29.6432853,13.8837333 29.359552,13.6 29.009952,13.6 L29.009952,13.6 Z M25.209952,14.2333333 L25.209952,25.6333333 C25.209952,25.9829333 25.4936853,26.2666667 25.8432853,26.2666667 C26.1928853,26.2666667 26.4766186,25.9829333 26.4766186,25.6333333 L26.4766186,14.2333333 C26.4766186,13.8837333 26.1928853,13.6 25.8432853,13.6 C25.4936853,13.6 25.209952,13.8837333 25.209952,14.2333333 L25.209952,14.2333333 Z" id="design-skills"></path>
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+</svg> \ No newline at end of file
diff --git a/sources/pyside6/doc/images/cpp_python.svg b/sources/pyside6/doc/images/cpp_python.svg
new file mode 100644
index 000000000..163df9ee0
--- /dev/null
+++ b/sources/pyside6/doc/images/cpp_python.svg
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ width="38px"
+ height="38px"
+ viewBox="0 0 38 38"
+ version="1.1"
+ id="svg22"
+ sodipodi:docname="cpp_python.svg"
+ inkscape:version="1.1 (c4e8f9ed74, 2021-05-24)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <sodipodi:namedview
+ id="namedview24"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ showgrid="false"
+ inkscape:zoom="11.381579"
+ inkscape:cx="14.057803"
+ inkscape:cy="17.528324"
+ inkscape:window-width="1920"
+ inkscape:window-height="1062"
+ inkscape:window-x="0"
+ inkscape:window-y="18"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="chat-dialog" />
+ <!-- Generator: Sketch 44.1 (41455) - http://www.bohemiancoding.com/sketch -->
+ <title
+ id="title2">chat-dialog</title>
+ <desc
+ id="desc4">Created with Sketch.</desc>
+ <defs
+ id="defs13">
+ <linearGradient
+ x1="100%"
+ y1="100%"
+ x2="-22.8515625%"
+ y2="-33.2356771%"
+ id="linearGradient-1">
+ <stop
+ stop-color="#6FFF80"
+ offset="0%"
+ id="stop6" />
+ <stop
+ stop-color="#43CE57"
+ offset="37.2587344%"
+ id="stop8" />
+ <stop
+ stop-color="#425FD0"
+ offset="100%"
+ id="stop10" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient-1"
+ id="linearGradient4458"
+ x1="1"
+ y1="1"
+ x2="-0.22851562"
+ y2="-0.33235675"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(145.49943,77.584003)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient-1"
+ id="linearGradient11948"
+ x1="1"
+ y1="1"
+ x2="-0.22851562"
+ y2="-0.33235675"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(144.59116,75.64207)" />
+ </defs>
+ <g
+ id="Mainpage"
+ stroke="none"
+ stroke-width="1"
+ fill="none"
+ fill-rule="evenodd">
+ <g
+ id="Mainpage_Layout_V4_Megamenu"
+ transform="translate(-882.000000, -7064.000000)"
+ fill="url(#linearGradient-1)">
+ <g
+ id="Content"
+ transform="translate(-44.000000, 1530.000000)">
+ <g
+ id="Buynow"
+ transform="translate(68.000000, 3932.000000)">
+ <g
+ transform="translate(712.000000, 1527.000000)"
+ id="chat-dialog">
+ <path
+ d="m 184,78.166667 v 11.4 c 0,1.7461 -1.4212,3.166666 -3.1673,3.166666 h -15.2 c -1.74547,0 -3.16603,-1.420566 -3.16603,-3.166666 V 82.6 c 0,-0.3496 0.28373,-0.633333 0.63333,-0.633333 0.3496,0 0.63333,0.283733 0.63333,0.633333 v 6.966667 c 0,1.047533 0.85184,1.9 1.89937,1.9 h 15.2 c 1.04753,0 1.90063,-0.852467 1.90063,-1.9 v -11.4 c 0,-1.047534 -0.8531,-1.9 -1.90063,-1.9 h -20.0032 l 3.98557,3.985566 c 0.24763,0.247634 0.24763,0.6479 0,0.895534 -0.24764,0.247633 -0.6479,0.247633 -0.89554,0 L 158.85223,76.0811 C 158.6711,75.899967 158.61663,75.627633 158.7148,75.390767 158.81297,75.154533 159.04413,75 159.3,75 h 21.5327 C 182.5788,75 184,76.420567 184,78.166667 Z m -13.3,17.1 h -21.7664 c -1.61753,0 -2.9336,1.420566 -2.9336,3.166666 v 11.399997 c 0,1.7461 1.31607,3.16667 2.9336,3.16667 h 15.3995 c 1.70493,0 3.20023,-1.47947 3.20023,-3.16983 v -6.96604 c -0.002,-0.34896 -0.285,-0.6308 -0.63333,-0.6308 h -0.003 c -0.3496,0.002 -0.63206,0.2869 -0.63016,0.6365 v 6.9635 c 0,1.07034 -1.0393,1.9 -1.93357,1.9 h -15.3995 c -0.91897,0 -1.66693,-0.85246 -1.66693,-1.9 V 98.433333 c 0,-1.047533 0.74796,-1.9 1.66693,-1.9 h 20.2445 l -3.96087,3.986837 c -0.24636,0.24826 -0.2451,0.64916 0.003,0.89553 0.24827,0.247 0.64917,0.24573 0.89553,-0.003 l 5.0331,-5.06667 c 0.1805,-0.181767 0.2337,-0.453467 0.13554,-0.6897 -0.0975,-0.236233 -0.3287,-0.390133 -0.58457,-0.390133 z M 146,81.333333 v -1.266666 c 0,-0.468034 0.25523,-0.877167 0.63333,-1.0963 V 78.8 c 0,-2.0957 1.7043,-3.8 3.8,-3.8 h 2.53334 c 2.0957,0 3.8,1.7043 3.8,3.8 v 0.170367 c 0.3781,0.219133 0.63333,0.628266 0.63333,1.0963 v 1.266666 c 0,0.477534 -0.266,0.8949 -0.65803,1.110234 -0.12034,1.217266 -0.6498,2.288866 -0.67577,2.339533 -0.5738,1.148233 -1.44147,2.883567 -4.3662,2.883567 -2.92473,0 -3.7924,-1.735334 -4.36683,-2.883567 -0.0253,-0.05067 -0.55417,-1.122267 -0.67514,-2.339533 C 146.266,82.228233 146,81.810867 146,81.333333 Z m 1.26667,0 c 0.3496,0 0.63333,0.283734 0.63333,0.633334 0,1.095666 0.56113,2.239466 0.56683,2.250866 C 149.1255,85.5355 149.7069,86.4 151.7,86.4 c 1.99247,0 2.5745,-0.8645 3.23317,-2.1831 0.006,-0.01077 0.56683,-1.154567 0.56683,-2.250233 0,-0.3496 0.28373,-0.633334 0.63333,-0.633334 v -1.266666 c -0.3496,0 -0.63333,-0.283734 -0.63333,-0.633334 V 78.8 c 0,-1.397133 -1.1362,-2.533333 -2.53333,-2.533333 h -2.53334 c -1.39713,0 -2.53333,1.1362 -2.53333,2.533333 v 0.633333 c 0,0.3496 -0.28373,0.633334 -0.63333,0.633334 z m 5.7,0 H 153.6 c 0.3496,0 0.63333,-0.283733 0.63333,-0.633333 0,-0.3496 -0.28373,-0.633333 -0.63333,-0.633333 h -0.63333 c -0.3496,0 -0.63334,0.283733 -0.63334,0.633333 0,0.3496 0.28374,0.633333 0.63334,0.633333 z m -3.16667,0 h 0.63333 c 0.3496,0 0.63334,-0.283733 0.63334,-0.633333 0,-0.3496 -0.28374,-0.633333 -0.63334,-0.633333 H 149.8 c -0.3496,0 -0.63333,0.283733 -0.63333,0.633333 0,0.3496 0.28373,0.633333 0.63333,0.633333 z M 184,100.33333 V 101.6 c 0,0.47753 -0.266,0.8949 -0.6574,1.11023 -0.12097,1.21727 -0.65043,2.28887 -0.6764,2.33954 -0.5738,1.14823 -1.44147,2.88356 -4.3662,2.88356 -2.92473,0 -3.7924,-1.73533 -4.36683,-2.88356 -0.0253,-0.0507 -0.5548,-1.12227 -0.67577,-2.33954 C 172.866,102.4949 172.6,102.07753 172.6,101.6 v -1.26667 c 0,-0.46803 0.2546,-0.877163 0.63333,-1.096297 v -0.170366 c 0,-2.0957 1.7043,-3.8 3.8,-3.8 h 2.53334 c 2.0957,0 3.8,1.7043 3.8,3.8 v 0.170366 C 183.7454,99.456167 184,99.8653 184,100.33333 Z m -1.26667,0 C 182.3831,100.33333 182.1,100.0496 182.1,99.7 v -0.633333 c 0,-1.397134 -1.1362,-2.533334 -2.53333,-2.533334 h -2.53334 c -1.39713,0 -2.53333,1.1362 -2.53333,2.533334 V 99.7 c 0,0.3496 -0.2831,0.63333 -0.63333,0.63333 V 101.6 c 0.35023,0 0.63333,0.28373 0.63333,0.63333 0,1.09567 0.56113,2.23947 0.56683,2.25087 0.65867,1.31797 1.24007,2.18247 3.23317,2.18247 1.9931,0 2.5745,-0.8645 3.23317,-2.1831 0.006,-0.0108 0.56683,-1.15457 0.56683,-2.25024 0,-0.3496 0.2831,-0.63333 0.63333,-0.63333 z m -2.53333,0 h -0.63333 c -0.35024,0 -0.63334,0.28374 -0.63334,0.63334 0,0.3496 0.2831,0.63333 0.63334,0.63333 H 180.2 c 0.35023,0 0.63333,-0.28373 0.63333,-0.63333 0,-0.3496 -0.2831,-0.63334 -0.63333,-0.63334 z m -3.16667,0 H 176.4 c -0.35023,0 -0.63333,0.28374 -0.63333,0.63334 0,0.3496 0.2831,0.63333 0.63333,0.63333 h 0.63333 c 0.35024,0 0.63334,-0.28373 0.63334,-0.63333 0,-0.3496 -0.2831,-0.63334 -0.63334,-0.63334 z"
+ id="path15"
+ sodipodi:nodetypes="ssssssssssssssccscccsssssssssscsccssssssccccccssscsssscssccsccscscscsccssssssccssssssssssssssssccsccsscsssscscssssssccscscsccssssssssssssss" />
+ <text
+ xml:space="preserve"
+ style="font-style:italic;font-weight:bold;font-size:8px;line-height:1.25;font-family:'Open Sans';-inkscape-font-specification:'Open Sans Bold Italic';letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient4458)"
+ x="149.47179"
+ y="107.35308"
+ id="text4456"><tspan
+ sodipodi:role="line"
+ id="tspan4454"
+ x="149.47179"
+ y="107.35308"
+ style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-size:8px;font-family:'Open Sans';-inkscape-font-specification:'Open Sans Semi-Bold';fill:url(#linearGradient4458)">C++</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:italic;font-weight:bold;font-size:5.33333px;line-height:1.25;font-family:'Open Sans';-inkscape-font-specification:'Open Sans Bold Italic';letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient11948)"
+ x="164.67328"
+ y="85.527855"
+ id="text11946"><tspan
+ sodipodi:role="line"
+ id="tspan11944"
+ x="164.67328"
+ y="85.527855"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.33333px;font-family:'Open Sans';-inkscape-font-specification:'Open Sans';fill:url(#linearGradient11948)">Python</tspan></text>
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+ <metadata
+ id="metadata841">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:title>chat-dialog</dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+</svg>
diff --git a/sources/pyside6/doc/images/linux.svg b/sources/pyside6/doc/images/linux.svg
new file mode 100644
index 000000000..af05345a2
--- /dev/null
+++ b/sources/pyside6/doc/images/linux.svg
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ version="1.0"
+ viewBox="0 0 266 312"
+ id="svg4"
+ sodipodi:docname="linux.svg"
+ inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs8" />
+ <sodipodi:namedview
+ id="namedview6"
+ pagecolor="#ffffff"
+ bordercolor="#000000"
+ borderopacity="0.25"
+ inkscape:showpageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ inkscape:deskcolor="#d1d1d1"
+ showgrid="false"
+ inkscape:zoom="2.7916667"
+ inkscape:cx="119.46269"
+ inkscape:cy="156.35821"
+ inkscape:window-width="2552"
+ inkscape:window-height="1432"
+ inkscape:window-x="1924"
+ inkscape:window-y="4"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg4" />
+ <path
+ d="M128.6640625 79.2793c0 1-1 1-1 1h-1c-1 0-1-1-2-2 0 0-1-1-1-2s0-1 1-1l2 1c1 1 2 2 2 3m-18-10c0-5-2-8-5-8 0 0 0 1-1 1v2h3c0 2 1 3 1 5h2m35-5c2 0 3 2 4 5h2c-1-1-1-2-1-3s0-2-1-3-2-2-3-2c0 0-1 1-2 1 0 1 1 1 1 2m-30 16c-1 0-1 0-1-1s0-2 1-3c2 0 3-1 3-1 1 0 1 1 1 1 0 1-1 2-3 4h-1m-11-1c-4-2-5-5-5-10 0-3 0-5 2-7 1-2 3-3 5-3s3 1 5 3c1 3 2 6 2 9v2h1v-1c1 0 1-2 1-6 0-3 0-6-2-9s-4-5-8-5c-3 0-6 2-7 5-2 4-2.4 7-2.4 12 0 4 1.4 8 5.4 12 1-1 2-1 3-2m125 141c1 0 1-.4 1-1.3 0-2.2-1-4.8-4-7.7-3-3-8-4.9-14-5.7-1-.1-2-.1-2-.1-1-.2-1-.2-2-.2-1-.1-3-.3-4-.5 3-9.3 4-17.5 4-24.7 0-10-2-17-6-23s-8-9-13-10c-1 1-1 1-1 2 5 2 10 6 13 12 3 7 4 13 4 20 0 5.6-1 13.9-5 24.5-4 1.6-8 5.3-11 11.1 0 .9 0 1.4 1 1.4 0 0 1-.9 2-2.6 2-1.7 3-3.4 5-5.1 3-1.7 5-2.6 8-2.6 5 0 10 .7 13 2.1 4 1.3 6 2.7 7 4.3 1 1.5 2 2.9 3 4.2 0 1.3 1 1.9 1 1.9m-92-145c-1-1-1-3-1-5 0-4 0-6 2-9 2-2 4-3 6-3 3 0 5 2 7 4 1 3 2 5 2 8 0 5-2 8-6 9 0 0 1 1 2 1 2 0 3 1 5 2 1-6 2-10 2-15 0-6-1-10-3-13-3-3-6-4-10-4-3 0-6 1-9 3-2 3-3 5-3 8 0 5 1 9 3 13 1 0 2 1 3 1m12 16c-13 9-23 13-31 13-7 0-14-3-20-8 1 2 2 4 3 5l6 6c4 4 9 6 14 6 7 0 15-4 25-11l9-6c2-2 4-4 4-7 0-1 0-2-1-2-1-2-6-5-16-8-9-4-16-6-20-6-3 0-8 2-15 6-6 4-10 8-10 12 0 0 1 1 2 3 6 5 12 8 18 8 8 0 18-4 31-14v2c1 0 1 1 1 1m23 202c4 7.52 11 11.3 19 11.3 2 0 4-.3 6-.9 2-.4 4-1.1 5-1.9 1-.7 2-1.4 3-2.2 2-.7 2-1.2 3-1.7l17-14.7c4-3.19 8-5.98 13-8.4 4-2.4 8-4 10-4.9 3-.8 5-2 7-3.6 1-1.5 2-3.4 2-5.8 0-2.9-2-5.1-4-6.7s-4-2.7-6-3.4-4-2.3-7-5c-2-2.6-4-6.2-5-10.9l-1-5.8c-1-2.7-1-4.7-2-5.8 0-.3 0-.4-1-.4s-3 .9-4 2.6c-2 1.7-4 3.6-6 5.6-1 2-4 3.8-6 5.5-3 1.7-6 2.6-8 2.6-8 0-12-2.2-15-6.5-2-3.2-3-6.9-4-11.1-2-1.7-3-2.6-5-2.6-5 0-7 5.2-7 15.7v31.1c0 .9-1 2.9-1 6-1 3.1-1 6.62-1 10.6l-2 11.1v.17m-145-5.29c9.3 1.36 20 4.27 32.1 8.71 12.1 4.4 19.5 6.7 22.2 6.7 7 0 12.8-3.1 17.6-9.09 1-1.94 1-4.22 1-6.84 0-9.45-5.7-21.4-17.1-35.9l-6.8-9.1c-1.4-1.9-3.1-4.8-5.3-8.7-2.1-3.9-4-6.9-5.5-9-1.3-2.3-3.4-4.6-6.1-6.9-2.6-2.3-5.6-3.8-8.9-4.6-4.2.8-7.1 2.2-8.5 4.1s-2.2 4-2.4 6.2c-.3 2.1-.9 3.5-1.9 4.2-1 .6-2.7 1.1-5 1.6-.5 0-1.4 0-2.7.1h-2.7c-5.3 0-8.9.6-10.8 1.6-2.5 2.9-3.8 6.2-3.8 9.7 0 1.6.4 4.3 1.2 8.1.8 3.7 1.2 6.7 1.2 8.8 0 4.1-1.2 8.2-3.7 12.3-2.5 4.3-3.8 7.5-3.8 9.78 1 3.88 7.6 6.61 19.7 8.21m33.3-90.9c0-6.9 1.8-14.5 5.5-23.5 3.6-9 7.2-15 10.7-19-.2-1-.7-1-1.5-1l-1-1c-2.9 3-6.4 10-10.6 20-4.2 9-6.4 17.3-6.4 23.4 0 4.5 1.1 8.4 3.1 11.8 2.2 3.3 7.5 8.1 15.9 14.2l10.6 6.9c11.3 9.8 17.3 16.6 17.3 20.6 0 2.1-1 4.2-4 6.5-2 2.4-4.7 3.6-7 3.6-.2 0-.3.2-.3.7 0 .1 1 2.1 3.1 6 4.2 5.7 13.2 8.5 25.2 8.5 22 0 39-9 52-27 0-5 0-8.1-1-9.4v-3.7c0-6.5 1-11.4 3-14.6s4-4.7 7-4.7c2 0 4 .7 6 2.2 1-7.7 1-14.4 1-20.4 0-9.1 0-16.6-2-23.6-1-6-3-11-5-15l-6-9c-2-3-3-6-5-9-1-4-2-7-2-12-3-5-5-10-8-15-2-5-4-10-6-14l-9 7c-10 7-18 10-25 10-6 0-11-1-14-5l-6-5c0 3-1 7-3 11l-6.3 12c-2.8 7-4.3 11-4.6 14-.4 2-.7 4-.9 4l-7.5 15c-8.1 15-12.2 28.9-12.2 40.4 0 2.3.2 4.7.6 7.1-4.5-3.1-6.7-7.4-6.7-13m71.6 94.6c-13 0-23 1.76-30 5.25v-.3c-5 6-10.6 9.1-18.4 9.1-4.9 0-12.6-1.9-23-5.7-10.5-3.6-19.8-6.36-27.9-8.18-.8-.23-2.6-.57-5.5-1.03-2.8-.45-5.4-.91-7.7-1.37-2.1-.45-4.5-1.13-7.1-2.05-2.5-.79-4.5-1.82-6-3.07-1.38-1.26-2.06-2.68-2.06-4.27 0-1.6.34-3.31 1.02-5.13.64-1.1 1.34-2.2 2.04-3.2.7-1.1 1.3-2.1 1.7-3.1.6-.9 1-1.8 1.4-2.8.4-.9.8-1.8 1-2.9.2-1 .4-2 .4-3s-.4-4-1.2-9.3c-.8-5.2-1.2-8.5-1.2-9.9 0-4.4 1-7.9 3.2-10.4s4.3-3.8 6.5-3.8h11.5c.9 0 2.3-.5 4.4-1.7.7-1.6 1.3-2.9 1.7-4.1.5-1.2.7-2.1.9-2.5.2-.6.4-1.2.6-1.7.4-.7.9-1.5 1.6-2.3-.8-1-1.2-2.3-1.2-3.9 0-1.1 0-2.1.2-2.7 0-3.6 1.7-8.7 5.3-15.4l3.5-6.3c2.9-5.4 5.1-9.4 6.7-13.4 1.7-4 3.5-10 5.5-18 1.6-7 5.4-14 11.4-21l7.5-9c5.2-6 8.6-11 10.5-15s2.9-9 2.9-13c0-2-.5-8-1.6-18-1-10-1.5-20-1.5-29 0-7 .6-12 1.9-17s3.6-10 7-14c3-4 7-8 13-10s13-3 21-3c3 0 6 0 9 1 3 0 7 1 12 3 4 2 8 4 11 7 4 3 7 8 10 13 2 6 4 12 5 20 1 5 1 10 2 17 0 6 1 10 1 13 1 3 1 7 2 12 1 4 2 8 4 11 2 4 4 8 7 12 3 5 7 10 11 16 9 10 16 21 20 32 5 10 8 23 8 36.9 0 6.9-1 13.6-3 20.1 2 0 3 .8 4 2.2s2 4.4 3 9.1l1 7.4c1 2.2 2 4.3 5 6.1 2 1.8 4 3.3 7 4.5 2 1 5 2.4 7 4.2 2 2 3 4.1 3 6.3 0 3.4-1 5.9-3 7.7-2 2-4 3.4-7 4.3-2 1-6 3-12 5.82-5 2.96-10 6.55-15 10.8l-10 8.51c-4 3.9-8 6.7-11 8.4-3 1.8-7 2.7-11 2.7l-7-.8c-8-2.1-13-6.1-16-12.2-16-1.94-29-2.9-37-2.9"
+ id="path2"
+ style="fill:#53586b;fill-opacity:1" />
+</svg>
diff --git a/sources/pyside6/doc/images/macos.svg b/sources/pyside6/doc/images/macos.svg
new file mode 100644
index 000000000..01b8cb002
--- /dev/null
+++ b/sources/pyside6/doc/images/macos.svg
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ viewBox="0 0 4875 4875"
+ version="1.1"
+ id="svg4"
+ sodipodi:docname="macOS.svg"
+ inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs8" />
+ <sodipodi:namedview
+ id="namedview6"
+ pagecolor="#ffffff"
+ bordercolor="#000000"
+ borderopacity="0.25"
+ inkscape:showpageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ inkscape:deskcolor="#d1d1d1"
+ showgrid="false"
+ inkscape:zoom="0.17866667"
+ inkscape:cx="2056.9029"
+ inkscape:cy="2443.097"
+ inkscape:window-width="1920"
+ inkscape:window-height="1080"
+ inkscape:window-x="1920"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg4" />
+ <path
+ fill="#666"
+ d="m 4217.2809,3659.1573 c -67.1033,155.0227 -146.5318,297.7206 -238.5597,428.9145 -125.4425,178.8514 -228.1514,302.6507 -307.3064,371.3978 -122.7033,112.843 -254.1713,170.6343 -394.952,173.9209 -101.0661,0 -222.9479,-28.7587 -364.8238,-87.0974 -142.3418,-58.0655 -273.1524,-86.8235 -392.7608,-86.8235 -125.4424,0 -259.9782,28.758 -403.8809,86.8235 -144.1218,58.3387 -260.2248,88.7411 -348.9927,91.7538 -135.0014,5.7518 -269.5646,-53.6831 -403.8809,-178.5773 -85.7283,-74.7731 -192.9569,-202.9541 -321.4121,-384.5447 C 902.88949,3881.0097 789.58031,3656.1447 700.81195,3399.782 605.74429,3122.8775 558.08701,2854.7371 558.08701,2595.1424 c 0,-297.3638 64.25482,-553.8363 192.95678,-768.7591 101.14827,-172.6342 235.71135,-308.8131 404.12711,-408.7836 168.4162,-99.9703 350.3899,-150.914 546.3595,-154.1734 107.2285,0 247.8447,33.1682 422.5877,98.3545 174.25,65.4052 286.1345,98.5736 335.1882,98.5736 36.6747,0 160.9663,-38.7834 371.6716,-116.1026 199.256,-71.705 367.4256,-101.3949 505.1932,-89.7 373.3149,30.1284 653.78,177.2902 840.3002,442.4178 -333.8741,202.2962 -499.0309,485.6375 -495.7444,849.1192 3.0132,283.1218 105.7221,518.7232 307.5803,705.7915 91.4803,86.8235 193.6417,153.9273 307.3064,201.5844 -24.6494,71.4857 -50.6695,139.9584 -78.3327,205.6926 z M 3361.0953,290.01478 c 0,221.90982 -81.0722,429.10615 -242.6678,620.88525 -195.0111,227.98777 -430.8867,359.72937 -686.6746,338.94127 -3.2589,-26.6223 -5.1489,-54.6418 -5.1489,-84.085 0,-213.03328 92.7396,-441.02035 257.431,-627.43123 82.222,-94.38292 186.794,-172.86107 313.606,-235.46509 126.5378,-61.66949 246.2285,-95.77377 358.7983,-101.61416 3.2866,29.66615 4.656,59.3338 4.656,88.76593 z"
+ id="path2"
+ style="fill:#53586b;fill-opacity:1;stroke-width:4.43719" />
+</svg>
diff --git a/sources/pyside6/doc/images/stopwatch.svg b/sources/pyside6/doc/images/stopwatch.svg
new file mode 100644
index 000000000..12f313ae6
--- /dev/null
+++ b/sources/pyside6/doc/images/stopwatch.svg
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="49px" height="48px" viewBox="0 0 49 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!-- Generator: Sketch 44.1 (41455) - http://www.bohemiancoding.com/sketch -->
+ <title>stopwatch</title>
+ <desc>Created with Sketch.</desc>
+ <defs>
+ <linearGradient x1="100%" y1="100%" x2="-22.8515625%" y2="-33.2356771%" id="linearGradient-1">
+ <stop stop-color="#6FFF80" offset="0%"></stop>
+ <stop stop-color="#43CE57" offset="37.2587344%"></stop>
+ <stop stop-color="#425FD0" offset="100%"></stop>
+ </linearGradient>
+ </defs>
+ <g id="Mainpage" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+ <g id="Mainpage_Layout_V4_Megamenu" transform="translate(-695.000000, -1755.000000)" fill="url(#linearGradient-1)">
+ <g id="Content" transform="translate(-44.000000, 1530.000000)">
+ <g id="WhatQtis" transform="translate(194.000000, 0.000000)">
+ <g id="Block2" transform="translate(378.657594, 178.000000)">
+ <path d="M189.4002,50.2 C177.049,50.2 167.0002,60.2488 167.0002,72.6 C167.0002,73.4096 167.0474,74.2464 167.141,75.088 C167.1898,75.5272 167.5882,75.84 168.0242,75.7952 C168.4634,75.7464 168.7802,75.3504 168.7314,74.912 C168.6442,74.128 168.6002,73.3504 168.6002,72.6 C168.6002,61.1312 177.9314,51.8 189.4002,51.8 C200.8698,51.8 210.2002,61.1312 210.2002,72.6 C210.2002,84.0688 200.8698,93.4 189.4002,93.4 C185.5434,93.4 181.7762,92.3344 178.5058,90.3192 C178.1306,90.0864 177.637,90.204 177.405,90.58 C177.173,90.956 177.2906,91.4496 177.6666,91.6808 C181.189,93.852 185.2466,95 189.4002,95 C201.7514,95 211.8002,84.9512 211.8002,72.6 C211.8002,60.2488 201.7514,50.2 189.4002,50.2 L189.4002,50.2 Z M186.2002,87.8 C186.2002,87.3584 185.8418,87 185.4002,87 L171.0002,87 C170.5586,87 170.2002,87.3584 170.2002,87.8 C170.2002,88.2416 170.5586,88.6 171.0002,88.6 L185.4002,88.6 C185.8418,88.6 186.2002,88.2416 186.2002,87.8 L186.2002,87.8 Z M181.4002,83 C181.4002,82.5584 181.0418,82.2 180.6002,82.2 L167.8002,82.2 C167.3586,82.2 167.0002,82.5584 167.0002,83 C167.0002,83.4416 167.3586,83.8 167.8002,83.8 L180.6002,83.8 C181.0418,83.8 181.4002,83.4416 181.4002,83 L181.4002,83 Z M168.6002,78.2 C168.6002,78.6416 168.9586,79 169.4002,79 L175.8002,79 C176.2418,79 176.6002,78.6416 176.6002,78.2 C176.6002,77.7584 176.2418,77.4 175.8002,77.4 L169.4002,77.4 C168.9586,77.4 168.6002,77.7584 168.6002,78.2 L168.6002,78.2 Z M189.4002,71 C188.5178,71 187.8002,71.7176 187.8002,72.6 C187.8002,73.4824 188.5178,74.2 189.4002,74.2 C190.2826,74.2 191.0002,73.4824 191.0002,72.6 C191.0002,71.7176 190.2826,71 189.4002,71 L189.4002,71 Z M176.9426,59.0304 L187.7842,69.8536 C188.2602,69.5728 188.8082,69.4 189.4002,69.4 C191.165,69.4 192.6002,70.8352 192.6002,72.6 C192.6002,74.3648 191.165,75.8 189.4002,75.8 C187.6354,75.8 186.2002,74.3648 186.2002,72.6 C186.2002,72.0088 186.3722,71.4608 186.653,70.9848 L175.8122,60.1624 C175.5002,59.8504 175.4994,59.344 175.8114,59.0312 C176.1234,58.7168 176.6298,58.7168 176.9426,59.0304 L176.9426,59.0304 Z M193.1778,89.8096 L193.385,90.5816 C193.4818,90.9384 193.805,91.1736 194.157,91.1736 C194.2258,91.1736 194.2962,91.1648 194.3658,91.1464 C194.7922,91.0312 195.0458,90.592 194.9306,90.1656 L194.7226,89.3936 C194.6082,88.9672 194.1674,88.7128 193.7426,88.8288 C193.3162,88.944 193.0626,89.3832 193.1778,89.8096 L193.1778,89.8096 Z M197.5034,88.2448 L197.9042,88.9368 C198.0522,89.1928 198.3202,89.336 198.597,89.336 C198.733,89.336 198.8714,89.3008 198.997,89.228 C199.3802,89.0072 199.5106,88.5176 199.2882,88.1352 L198.8874,87.4432 C198.6658,87.0608 198.1762,86.9304 197.7946,87.1512 C197.4122,87.3728 197.2818,87.8624 197.5034,88.2448 L197.5034,88.2448 Z M201.2754,85.6128 L201.8418,86.1784 C201.9978,86.3344 202.2026,86.4128 202.4074,86.4128 C202.6122,86.4128 202.817,86.3344 202.9738,86.1776 C203.285,85.8656 203.285,85.3584 202.973,85.0464 L202.4066,84.4808 C202.0938,84.1688 201.5866,84.168 201.2746,84.4816 C200.9626,84.7944 200.9626,85.3008 201.2754,85.6128 L201.2754,85.6128 Z M205.0386,80.7096 C204.6554,80.4888 204.1666,80.6192 203.9458,81.0024 C203.7242,81.3848 203.8554,81.8744 204.2386,82.0952 L204.9314,82.4952 C205.057,82.568 205.1946,82.6024 205.3306,82.6024 C205.6074,82.6024 205.8762,82.4592 206.0242,82.2024 C206.2458,81.8192 206.1146,81.3304 205.7314,81.1096 L205.0386,80.7096 Z M206.9634,78.1376 C207.033,78.156 207.1026,78.1656 207.1714,78.1656 C207.5242,78.1656 207.8482,77.9296 207.9434,77.572 C208.057,77.1448 207.8042,76.7064 207.3778,76.592 L206.6042,76.3848 C206.1794,76.2704 205.7386,76.524 205.6242,76.9504 C205.5106,77.3776 205.7634,77.8168 206.1898,77.9304 L206.9634,78.1376 Z M204.6018,73.4024 L207.8002,73.4024 C208.2426,73.4024 208.6002,73.044 208.6002,72.6024 C208.6002,72.1608 208.2426,71.8024 207.8002,71.8024 L204.6018,71.8024 C204.1594,71.8024 203.8018,72.1608 203.8018,72.6024 C203.8018,73.044 204.1594,73.4024 204.6018,73.4024 L204.6018,73.4024 Z M205.6258,68.2536 C205.721,68.6112 206.045,68.8472 206.3978,68.8472 C206.4666,68.8472 206.5362,68.8384 206.6058,68.8192 L207.3794,68.6128 C207.8058,68.4984 208.0586,68.06 207.945,67.6328 C207.8306,67.2064 207.3914,66.9528 206.965,67.0672 L206.1914,67.2744 C205.765,67.388 205.5122,67.8272 205.6258,68.2536 L205.6258,68.2536 Z M204.9354,62.7088 L204.2418,63.1088 C203.8586,63.3296 203.7266,63.8184 203.9482,64.2008 C204.0954,64.4584 204.365,64.6016 204.6418,64.6016 C204.777,64.6016 204.9146,64.5672 205.0402,64.4944 L205.7338,64.0944 C206.117,63.8736 206.249,63.3848 206.0274,63.0016 C205.8074,62.6192 205.3186,62.4872 204.9354,62.7088 L204.9354,62.7088 Z M201.8442,60.956 C202.049,60.956 202.2522,60.8784 202.409,60.7224 L202.9762,60.1568 C203.289,59.8448 203.289,59.3384 202.9778,59.0256 C202.6658,58.7136 202.1594,58.712 201.8466,59.024 L201.2794,59.5896 C200.9658,59.9016 200.9658,60.408 201.2778,60.7208 C201.4338,60.8776 201.6386,60.956 201.8442,60.956 L201.8442,60.956 Z M184.8434,56.4008 C184.9114,56.4008 184.981,56.392 185.0498,56.3736 C185.4762,56.2608 185.7306,55.8224 185.617,55.3952 L185.4114,54.6224 C185.2978,54.196 184.8586,53.9408 184.433,54.0552 C184.0058,54.168 183.7514,54.6064 183.8658,55.0336 L184.0706,55.8064 C184.1666,56.1648 184.4898,56.4008 184.8434,56.4008 L184.8434,56.4008 Z M180.601,58.1584 C180.7362,58.1584 180.8738,58.124 181.0002,58.0512 C181.3826,57.8304 181.5138,57.3416 181.293,56.9584 L180.893,56.2656 C180.6714,55.8832 180.1826,55.7512 179.8002,55.9728 C179.4178,56.1936 179.2866,56.6832 179.5074,57.0656 L179.9074,57.7584 C180.0554,58.0152 180.3242,58.1584 180.601,58.1584 L180.601,58.1584 Z M197.7986,58.0504 C197.9242,58.124 198.0626,58.1584 198.1986,58.1584 C198.4746,58.1584 198.7434,58.016 198.8914,57.7592 L199.2922,57.0672 C199.5146,56.6848 199.3834,56.1952 199.001,55.9744 C198.6194,55.752 198.129,55.8832 197.9082,56.2656 L197.5074,56.9576 C197.285,57.34 197.4162,57.8296 197.7986,58.0504 L197.7986,58.0504 Z M193.7474,56.3728 C193.817,56.3912 193.8866,56.4 193.9554,56.4 C194.3082,56.4 194.6314,56.1648 194.7274,55.808 L194.9354,55.0352 C195.0498,54.6088 194.797,54.1696 194.3706,54.0544 C193.9466,53.9408 193.5058,54.1928 193.3898,54.6192 L193.1826,55.392 C193.0674,55.8184 193.3202,56.2576 193.7474,56.3728 L193.7474,56.3728 Z M188.6002,87.8 L188.6002,91 C188.6002,91.4416 188.9586,91.8 189.4002,91.8 C189.8418,91.8 190.2002,91.4416 190.2002,91 L190.2002,87.8 C190.2002,87.3584 189.8418,87 189.4002,87 C188.9586,87 188.6002,87.3584 188.6002,87.8 L188.6002,87.8 Z M190.2002,57.4 L190.2002,54.2 C190.2002,53.7584 189.8418,53.4 189.4002,53.4 C188.9586,53.4 188.6002,53.7584 188.6002,54.2 L188.6002,57.4 C188.6002,57.8416 188.9586,58.2 189.4002,58.2 C189.8418,58.2 190.2002,57.8416 190.2002,57.4 L190.2002,57.4 Z M168.9314,55.8 L169.4002,56.2688 L173.069,52.6 L172.6002,52.1312 L168.9314,55.8 Z M167.2346,56.3656 C166.9218,56.0528 166.9218,55.5472 167.2346,55.2344 L172.0346,50.4344 C172.3474,50.1216 172.853,50.1216 173.1658,50.4344 L174.7658,52.0344 C175.0786,52.3472 175.0786,52.8528 174.7658,53.1656 L169.9658,57.9656 C169.8098,58.1216 169.605,58.2 169.4002,58.2 C169.1954,58.2 168.9906,58.1216 168.8346,57.9656 L167.2346,56.3656 Z M187.0002,48.6 L191.8002,48.6 C192.2426,48.6 192.6002,48.2416 192.6002,47.8 C192.6002,47.3584 192.2426,47 191.8002,47 L187.0002,47 C186.5586,47 186.2002,47.3584 186.2002,47.8 C186.2002,48.2416 186.5586,48.6 187.0002,48.6 L187.0002,48.6 Z M207.2074,55.924 L210.7658,52.3656 C211.0786,52.0528 211.0786,51.5472 210.7658,51.2344 C210.453,50.9216 209.9474,50.9216 209.6346,51.2344 L206.0762,54.7928 C205.7634,55.1056 205.7634,55.612 206.0762,55.924 C206.2322,56.0808 206.437,56.1584 206.6418,56.1584 C206.8466,56.1584 207.0506,56.0808 207.2074,55.924 L207.2074,55.924 Z M215.0002,51.8 C215.0002,54.4472 212.8474,56.6 210.2002,56.6 C209.7578,56.6 209.4002,56.2416 209.4002,55.8 C209.4002,55.3584 209.7578,55 210.2002,55 C211.965,55 213.4002,53.5648 213.4002,51.8 C213.4002,50.0352 211.965,48.6 210.2002,48.6 C208.4354,48.6 207.0002,50.0352 207.0002,51.8 C207.0002,52.2416 206.6426,52.6 206.2002,52.6 C205.7578,52.6 205.4002,52.2416 205.4002,51.8 C205.4002,49.1528 207.553,47 210.2002,47 C212.8474,47 215.0002,49.1528 215.0002,51.8 L215.0002,51.8 Z" id="stopwatch"></path>
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+</svg> \ No newline at end of file
diff --git a/sources/pyside6/doc/images/windows.svg b/sources/pyside6/doc/images/windows.svg
new file mode 100644
index 000000000..a40519bb0
--- /dev/null
+++ b/sources/pyside6/doc/images/windows.svg
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ viewBox="0 0 4875 4875"
+ version="1.1"
+ id="svg4"
+ sodipodi:docname="windows.svg"
+ inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs8" />
+ <sodipodi:namedview
+ id="namedview6"
+ pagecolor="#ffffff"
+ bordercolor="#000000"
+ borderopacity="0.25"
+ inkscape:showpageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ inkscape:deskcolor="#d1d1d1"
+ showgrid="false"
+ inkscape:zoom="0.17866667"
+ inkscape:cx="2224.8134"
+ inkscape:cy="2437.5"
+ inkscape:window-width="2552"
+ inkscape:window-height="1432"
+ inkscape:window-x="1924"
+ inkscape:window-y="4"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg4" />
+ <path
+ fill="#0078d4"
+ d="M0 0h2311v2310H0zm2564 0h2311v2310H2564zM0 2564h2311v2311H0zm2564 0h2311v2311H2564"
+ id="path2"
+ style="fill:#53586b;fill-opacity:1" />
+</svg>
diff --git a/sources/pyside6/doc/import_inheritance.py b/sources/pyside6/doc/import_inheritance.py
new file mode 100644
index 000000000..e694941c9
--- /dev/null
+++ b/sources/pyside6/doc/import_inheritance.py
@@ -0,0 +1,152 @@
+import inspect
+import sys
+
+"""Helpers for determining base classes by importing the class.
+When passed something like:
+ PySide6.QtCore.QStateMachine.SignalEvent
+try to import the underlying module and return a
+handle to the object. In a loop, import
+ PySide6.QtCore.QStateMachine.SignalEvent
+ PySide6.QtCore.QStateMachine
+ PySide6.QtCore
+until the import succeeds and walk up the attributes
+to obtain the object."""
+
+
+TEST_DRIVER_USAGE = """Usage: import_inheritance.py class_name [current_module]
+
+Example:
+python import_inheritance.py PySide6.QtWidgets.QWizard PySide6.QtWidgets
+"""
+
+
+class InheritanceException(Exception):
+ pass
+
+
+def _importClassOrModule(name):
+ components = name.split('.')
+ for i in range(len(components), 0, -1):
+ importPath = '.'.join(components[: i])
+ try:
+ __import__(importPath)
+ except ImportError:
+ continue
+ if i == len(components):
+ return sys.modules[importPath]
+ remaining = components[i:]
+ cls = sys.modules[importPath]
+ for component in remaining:
+ try:
+ cls = getattr(cls, component)
+ except Exception: # No such attribute
+ return None
+ return cls
+ return None
+
+
+def _import_class_or_module(name, currmodule):
+ """
+ Import a class using its fully-qualified *name*.
+ """
+ todoc = _importClassOrModule(name)
+ if not todoc and currmodule is not None:
+ todoc = _importClassOrModule(f"{currmodule}.{name}")
+ if not todoc:
+ moduleStr = f'(module {currmodule})' if currmodule else ''
+ raise InheritanceException(f'Could not import class {name} specified for '
+ f'inheritance diagram {moduleStr}.')
+ if inspect.isclass(todoc):
+ return [todoc]
+ elif inspect.ismodule(todoc):
+ classes = []
+ for cls in todoc.__dict__.values():
+ if inspect.isclass(cls) and cls.__module__ == todoc.__name__:
+ classes.append(cls)
+ return classes
+ raise InheritanceException(f'{name} specified for inheritance diagram is '
+ 'not a class or module')
+
+
+def _import_classes(class_names, currmodule):
+ """Import a list of classes."""
+ classes = []
+ for name in class_names:
+ classes.extend(_import_class_or_module(name, currmodule))
+ return classes
+
+
+def _class_name(cls, parts=0):
+ """Given a class object, return a fully-qualified name.
+
+ This works for things I've tested in matplotlib so far, but may not be
+ completely general.
+ """
+ module = cls.__module__
+ if module == '__builtin__':
+ fullname = cls.__name__
+ else:
+ fullname = f"{module}.{cls.__qualname__}"
+ if parts == 0:
+ return fullname
+ name_parts = fullname.split('.')
+ return '.'.join(name_parts[-parts:])
+
+
+def _class_info(classes, builtins=None, show_builtins=False, parts=0):
+ """Return name and bases for all classes that are ancestors of
+ *classes*.
+
+ *parts* gives the number of dotted name parts that is removed from the
+ displayed node names.
+ """
+ all_classes = {}
+ builtins_list = builtins.values() if builtins else []
+
+ def recurse(cls):
+ if not show_builtins and cls in builtins_list:
+ return
+
+ nodename = _class_name(cls, parts)
+ fullname = _class_name(cls, 0)
+
+ baselist = []
+ all_classes[cls] = (nodename, fullname, baselist)
+ for base in cls.__bases__:
+ if not show_builtins and base in builtins_list:
+ continue
+ if base.__name__ == "Object" and base.__module__ == "Shiboken":
+ continue
+ baselist.append(_class_name(base, parts))
+ if base not in all_classes:
+ recurse(base)
+
+ for cls in classes:
+ recurse(cls)
+
+ return list(all_classes.values())
+
+
+def get_inheritance_entries_by_import(class_names, currmodule,
+ builtins=None,
+ show_builtins=False, parts=0):
+ classes = _import_classes(class_names, currmodule)
+ class_info = _class_info(classes, builtins, show_builtins, parts)
+ if not class_info:
+ raise InheritanceException('No classes found for '
+ 'inheritance diagram')
+ return class_info
+
+
+if __name__ == "__main__":
+ module = None
+ if len(sys.argv) < 2:
+ print(TEST_DRIVER_USAGE)
+ sys.exit(-1)
+ class_name = sys.argv[1]
+ if len(sys.argv) >= 3:
+ module = sys.argv[2]
+ entries = get_inheritance_entries_by_import([class_name], module, None,
+ False, 2)
+ for e in entries:
+ print(e)
diff --git a/sources/pyside6/doc/index.rst b/sources/pyside6/doc/index.rst
index c982c7c3b..1bb28f9c1 100644
--- a/sources/pyside6/doc/index.rst
+++ b/sources/pyside6/doc/index.rst
@@ -3,8 +3,9 @@
.. ifconfig:: output_format == 'html'
- **Qt for Python** offers the official Python bindings for `Qt`_, and
- has two main components:
+ **Qt for Python** offers the official Python bindings for `Qt`_,
+ which enables you to use Python to write your Qt applications.
+ The project has two main components:
* `PySide6`_, so that you can use Qt6 APIs in your Python applications, and
* `Shiboken6 <shiboken6/index.html>`__, a binding generator tool, which can
@@ -13,8 +14,9 @@
.. ifconfig:: output_format == 'qthelp'
- **Qt for Python** offers the official Python bindings for `Qt`_, and
- has two main components:
+ **Qt for Python** offers the official Python bindings for `Qt`_,
+ which enables you to use Python to write your Qt applications.
+ The project has two main components:
* `PySide6`_, so that you can use Qt6 APIs in your Python applications, and
* `Shiboken6 <../shiboken6/index.html>`__, a binding generator tool, which can
@@ -29,136 +31,184 @@ This project is available under the LGPLv3/GPLv3 and the `Qt commercial license`
.. _Qt: https://doc.qt.io
.. _PySide6: quickstart.html
.. _`Qt commercial license`: https://www.qt.io/licensing/
-.. _`Porting from PySide2 to PySide6`: porting_from2.html
+.. _`Porting from PySide2 to PySide6`: gettingstarted/porting_from2.html
+Quick Start
+===========
+You can obtain the latest stable version by running ``pip install pyside6``.
+If you want to build it yourself, check the `getting started guide`_.
+
+To learn how to use it, check out `write your first application`_,
+and to learn what is installed with the ``pyside6``, check the
+`package content, structure, and tools`_ page.
+
+
+.. _`getting started guide`: gettingstarted/index.html
+.. _`write your first application`: quickstart.html
+.. _`package content, structure, and tools`: gettingstarted/package_details.html
Documentation
=============
-.. ifconfig:: output_format == 'html'
+.. grid:: 1 3 3 3
+ :gutter: 2
- .. panels::
- :body: text-center
- :container: container-lg pb-3
- :column: col-lg-4 col-md-4 col-sm-6 col-xs-12 p-2
+ .. grid-item-card::
+ :img-top: images/Desktop.svg
+ :class-item: text-center
Write your first Qt application.
+ +++
+ .. button-ref:: quick-start
+ :color: primary
+ :outline:
+ :expand:
+
+ Start here!
+ .. grid-item-card::
+ :img-top: images/Support.svg
+ :class-item: text-center
+
+ Modules, docs, and cross compilation.
+++
+ .. button-ref:: gettingstarted/index
+ :color: primary
+ :outline:
+ :expand:
- .. link-button:: quickstart
- :type: ref
- :text: Check it out!
- :classes: btn-qt btn-block stretched-link
- ---
+ Build Instructions
- Install and build from source.
+ .. grid-item-card::
+ :img-top: images/Commercial.svg
+ :class-item: text-center
+ Packages, installation, and details.
+++
+ .. button-ref:: commercial-page
+ :color: primary
+ :outline:
+ :expand:
- .. link-button:: gettingstarted
- :type: ref
- :text: Getting Started
- :classes: btn-qt btn-block stretched-link
- ---
+ Commercial
- PySide API reference.
+ .. grid-item-card::
+ :img-top: images/Dev.svg
+ :class-item: text-center
+ PySide API reference.
+++
+ .. button-ref:: pyside-api
+ :color: primary
+ :outline:
+ :expand:
- .. link-button:: api
- :type: ref
- :text: API Docs
- :classes: btn-qt btn-block stretched-link
+ API Docs
- ---
+ .. grid-item-card::
+ :img-top: images/Tutorials.svg
+ :class-item: text-center
Learn with step-by-step guides.
-
+++
+ .. button-ref:: tutorials/index
+ :color: primary
+ :outline:
+ :expand:
- .. link-button:: tutorials/index
- :type: ref
- :text: Tutorials
- :classes: btn-qt btn-block stretched-link
- ---
+ Tutorials
- Check all the available examples.
+ .. grid-item-card::
+ :img-top: images/Examples.svg
+ :class-item: text-center
+ Check all the available examples.
+++
+ .. button-ref:: examples/index
+ :color: primary
+ :outline:
+ :expand:
- .. link-button:: examples/index
- :type: ref
- :text: Examples
- :classes: btn-qt btn-block stretched-link
- ---
+ Examples
+
+ .. grid-item-card::
+ :img-top: images/Training.svg
+ :class-item: text-center
Watch webinars, talks, and more.
+ +++
+ .. button-ref:: videos
+ :color: primary
+ :outline:
+ :expand:
+
+ Videos
+ .. grid-item-card::
+ :img-top: images/Tooling.svg
+ :class-item: text-center
+
+ Discover the tools included.
+++
+ .. button-ref:: package_tools
+ :color: primary
+ :outline:
+ :expand:
- .. link-button:: videos
- :type: ref
- :text: Videos
- :classes: btn-qt btn-block stretched-link
+ Tooling
- ---
+ .. grid-item-card::
+ :img-top: images/Deployment.svg
+ :class-item: text-center
Learn to deploy your applications.
-
+++
+ .. button-ref:: deployment-guides
+ :color: primary
+ :outline:
+ :expand:
- .. link-button:: deployment-guides
- :type: ref
- :text: Deployment
- :classes: btn-qt btn-block stretched-link
- ---
+ Deployment
- API differences and known issues.
+ .. grid-item-card::
+ :img-top: images/cpp_python.svg
+ :class-item: text-center
+ Generate C++ to Python bindings.
+++
+ .. button-link:: shiboken6/index.html
+ :color: primary
+ :outline:
+ :expand:
- .. link-button:: considerations
- :type: ref
- :text: Considerations
- :classes: btn-qt btn-block stretched-link
- ---
+ Shiboken
- Generate C++ to Python bindings.
+ .. grid-item-card::
+ :img-top: images/stopwatch.svg
+ :class-item: text-center
+ API differences and known issues.
+++
+ .. button-ref:: considerations
+ :color: primary
+ :outline:
+ :expand:
- .. link-button:: shiboken6/index.html
- :text: Shiboken
- :classes: btn-qt btn-block stretched-link
+ Considerations
-.. ifconfig:: output_format == 'qthelp'
+ .. grid-item-card::
+ :img-top: images/Development.svg
+ :class-item: text-center
+
+ Notes for Developers.
+ +++
+ .. button-ref:: developer-notes
+ :color: primary
+ :outline:
+ :expand:
- .. raw:: html
-
- <table class="special">
- <colgroup>
- <col style="width: 33%" />
- <col style="width: 33%" />
- <col style="width: 33%" />
- </colgroup>
- <tr>
- <td><a href="quickstart.html"><p><strong>Check It Out!</strong><br/>Write your first Qt app.</p></a></td>
- <td><a href="gettingstarted.html"><p><strong>Getting Started</strong><br/>Install and build from source.</p></a></td>
- <td><a href="api.html"><p><strong>API Docs</strong><br/>Qt for Python API reference.</p></a></td>
- </tr>
- <tr>
- <td><a href="tutorials/index.html"><p><strong>Tutorials</strong><br/>Learn with step-by-step guides.</p></a></td>
- <td><a href="examples/index.html"><p><strong>Examples</strong><br/>Check all the available examples.</p></a></td>
- <td><a href="videos.html"><p><strong>Videos</strong><br/>Watch webinars, Talks, and more.</p></a></td>
- </tr>
- <tr>
- <td><a href="deployment.html" style="display: block;"><p><strong>Deployment</strong><br/>Learn to deploy your apps.</p></a></td>
- <td><a href="considerations.html" style="display: block;"><p><strong>Considerations</strong><br/>API differences and known issues.</p></a></td>
- <td><a href="../shiboken6/index.html" style="display: block;"><p><strong>Shiboken</strong><br/>Generate C++ to Python binding.</p></a></td>
- </tr>
- </table>
+ Developers
We have also a `wiki page`_ where you can find how to report bugs, contribute or contact the community.
@@ -170,5 +220,3 @@ We have also a `wiki page`_ where you can find how to report bugs, contribute or
:glob:
contents.rst
- gettingstarted*
- overviews/*
diff --git a/sources/pyside6/doc/inheritance_diagram.py b/sources/pyside6/doc/inheritance_diagram.py
index 5889abb6f..e972fac4c 100644
--- a/sources/pyside6/doc/inheritance_diagram.py
+++ b/sources/pyside6/doc/inheritance_diagram.py
@@ -37,10 +37,6 @@ r"""
:license: BSD, see LICENSE for details.
"""
-import os
-import re
-import sys
-import inspect
try:
from hashlib import md5
except ImportError:
@@ -51,211 +47,8 @@ from docutils.parsers.rst import directives, Directive
from sphinx.ext.graphviz import render_dot_html, render_dot_latex
-class InheritanceException(Exception):
- pass
-
-# When passed something like:
-# PySide6.QtCore.QStateMachine.SignalEvent
-# try to import the underlying module and return a
-# handle to the object. In a loop, import
-# PySide6.QtCore.QStateMachine.SignalEvent
-# PySide6.QtCore.QStateMachine
-# PySide6.QtCore
-# until the import succeeds and walk up the attributes
-# to obtain the object
-
-def importClassOrModule(name):
- components = name.split('.')
- for i in range(len(components), 0, -1):
- importPath = '.'.join(components[: i])
- try:
- __import__(importPath)
- except ImportError:
- continue
- if i == len(components):
- return sys.modules[importPath]
- remaining = components[i :]
- cls = sys.modules[importPath]
- for component in remaining:
- try:
- cls = getattr(cls, component)
- except Exception: # No such attribute
- return None
- return cls
- return None
-
-class InheritanceGraph(object):
- """
- Given a list of classes, determines the set of classes that they inherit
- from all the way to the root "object", and then is able to generate a
- graphviz dot graph from them.
- """
- def __init__(self, class_names, currmodule, show_builtins=False, parts=0):
- """
- *class_names* is a list of child classes to show bases from.
-
- If *show_builtins* is True, then Python builtins will be shown
- in the graph.
- """
- self.class_names = class_names
- classes = self._import_classes(class_names, currmodule)
- self.class_info = self._class_info(classes, show_builtins, parts)
- if not self.class_info:
- raise InheritanceException('No classes found for '
- 'inheritance diagram')
-
- def _import_class_or_module(self, name, currmodule):
- """
- Import a class using its fully-qualified *name*.
- """
- todoc = importClassOrModule(name)
- if not todoc and currmodule is not None:
- todoc = importClassOrModule(f"{currmodule}.{name}")
- if not todoc:
- moduleStr = f'(module {currmodule})' if currmodule else ''
- raise InheritanceException(f'Could not import class {name} specified for '
- f'inheritance diagram {moduleStr}.')
- if inspect.isclass(todoc):
- return [todoc]
- elif inspect.ismodule(todoc):
- classes = []
- for cls in todoc.__dict__.values():
- if inspect.isclass(cls) and cls.__module__ == todoc.__name__:
- classes.append(cls)
- return classes
- raise InheritanceException(f'{name} specified for inheritance diagram is '
- 'not a class or module')
-
- def _import_classes(self, class_names, currmodule):
- """Import a list of classes."""
- classes = []
- for name in class_names:
- classes.extend(self._import_class_or_module(name, currmodule))
- return classes
-
- def _class_info(self, classes, show_builtins, parts):
- """Return name and bases for all classes that are ancestors of
- *classes*.
-
- *parts* gives the number of dotted name parts that is removed from the
- displayed node names.
- """
- all_classes = {}
- builtins = __builtins__.values()
-
- def recurse(cls):
- if not show_builtins and cls in builtins:
- return
-
- nodename = self.class_name(cls, parts)
- fullname = self.class_name(cls, 0)
-
- baselist = []
- all_classes[cls] = (nodename, fullname, baselist)
- for base in cls.__bases__:
- if not show_builtins and base in builtins:
- continue
- if base.__name__ == "Object" and base.__module__ == "Shiboken":
- continue
- baselist.append(self.class_name(base, parts))
- if base not in all_classes:
- recurse(base)
-
- for cls in classes:
- recurse(cls)
-
- return list(all_classes.values())
-
- def class_name(self, cls, parts=0):
- """Given a class object, return a fully-qualified name.
-
- This works for things I've tested in matplotlib so far, but may not be
- completely general.
- """
- module = cls.__module__
- if module == '__builtin__':
- fullname = cls.__name__
- else:
- fullname = f"{module}.{cls.__qualname__}"
- if parts == 0:
- return fullname
- name_parts = fullname.split('.')
- return '.'.join(name_parts[-parts:])
-
- def get_all_class_names(self):
- """
- Get all of the class names involved in the graph.
- """
- return [fullname for (_, fullname, _) in self.class_info]
-
- # These are the default attrs for graphviz
- default_graph_attrs = {
- 'rankdir': 'LR',
- 'size': '"8.0, 12.0"',
- }
- default_node_attrs = {
- 'shape': 'box',
- 'fontsize': 10,
- 'height': 0.25,
- 'fontname': '"Vera Sans, DejaVu Sans, Liberation Sans, '
- 'Arial, Helvetica, sans"',
- 'style': '"setlinewidth(0.5)"',
- }
- default_edge_attrs = {
- 'arrowsize': 0.5,
- 'style': '"setlinewidth(0.5)"',
- }
-
- def _format_node_attrs(self, attrs):
- return ','.join(['%s=%s' % x for x in attrs.items()])
-
- def _format_graph_attrs(self, attrs):
- return ''.join([f"{x[0]}={x[1]};\n" for x in attrs.items()])
-
- def generate_dot(self, name, urls={}, env=None,
- graph_attrs={}, node_attrs={}, edge_attrs={}):
- """
- Generate a graphviz dot graph from the classes that
- were passed in to __init__.
-
- *name* is the name of the graph.
-
- *urls* is a dictionary mapping class names to HTTP URLs.
-
- *graph_attrs*, *node_attrs*, *edge_attrs* are dictionaries containing
- key/value pairs to pass on as graphviz properties.
- """
- g_attrs = self.default_graph_attrs.copy()
- n_attrs = self.default_node_attrs.copy()
- e_attrs = self.default_edge_attrs.copy()
- g_attrs.update(graph_attrs)
- n_attrs.update(node_attrs)
- e_attrs.update(edge_attrs)
- if env:
- g_attrs.update(env.config.inheritance_graph_attrs)
- n_attrs.update(env.config.inheritance_node_attrs)
- e_attrs.update(env.config.inheritance_edge_attrs)
-
- res = []
- res.append('digraph %s {\n' % name)
- res.append(self._format_graph_attrs(g_attrs))
-
- for name, fullname, bases in self.class_info:
- # Write the node
- this_node_attrs = n_attrs.copy()
- url = urls.get(fullname)
- if url is not None:
- this_node_attrs['URL'] = '"%s"' % url
- res.append(' "%s" [%s];\n' %
- (name, self._format_node_attrs(this_node_attrs)))
-
- # Write the edges
- for base_name in bases:
- res.append(' "%s" -> "%s" [%s];\n' %
- (base_name, name,
- self._format_node_attrs(e_attrs)))
- res.append('}\n')
- return ''.join(res)
+from inheritance_graph import InheritanceGraph
+from import_inheritance import (InheritanceException)
class inheritance_diagram(nodes.General, nodes.Element):
@@ -291,7 +84,7 @@ class InheritanceDiagram(Directive):
try:
graph = InheritanceGraph(
class_names, env.temp_data.get('py:module'),
- parts=node['parts'])
+ __builtins__, parts=node['parts'])
except InheritanceException as err:
return [node.document.reporter.warning(err.args[0],
line=self.lineno)]
@@ -301,8 +94,8 @@ class InheritanceDiagram(Directive):
# references to real URLs later. These nodes will eventually be
# removed from the doctree after we're done with them.
for name in graph.get_all_class_names():
- refnodes, x = class_role(
- 'class', ':class:`%s`' % name, name, 0, self.state)
+ refnodes, x = class_role('class', f':class:`{name}`', name,
+ 0, self.state)
node.extend(refnodes)
# Store the graph object so we can use it to generate the
# dot file later
@@ -323,15 +116,15 @@ def html_visit_inheritance_diagram(self, node):
graph = node['graph']
graph_hash = get_graph_hash(node)
- name = 'inheritance%s' % graph_hash
+ name = f'inheritance{graph_hash}'
# Create a mapping from fully-qualified class names to URLs.
urls = {}
for child in node:
- if child.get('refuri') is not None:
- urls[child['reftitle']] = child.get('refuri')
- elif child.get('refid') is not None:
- urls[child['reftitle']] = '#' + child.get('refid')
+ ref_title = child.get('reftitle')
+ uri = child.get('refuri')
+ if uri and ref_title:
+ urls[ref_title] = uri
dotcode = graph.generate_dot(name, urls, env=self.builder.env)
render_dot_html(self, node, dotcode, {}, 'inheritance', 'inheritance',
@@ -346,7 +139,7 @@ def latex_visit_inheritance_diagram(self, node):
graph = node['graph']
graph_hash = get_graph_hash(node)
- name = 'inheritance%s' % graph_hash
+ name = f'inheritance{graph_hash}'
dotcode = graph.generate_dot(name, env=self.builder.env,
graph_attrs={'size': '"6.0,6.0"'})
diff --git a/sources/pyside6/doc/inheritance_diagram.pyproject b/sources/pyside6/doc/inheritance_diagram.pyproject
new file mode 100644
index 000000000..a44dc93b8
--- /dev/null
+++ b/sources/pyside6/doc/inheritance_diagram.pyproject
@@ -0,0 +1,6 @@
+{
+ "files": ["inheritance_diagram.py",
+ "import_inheritance.py",
+ "inheritance_graph.py",
+ "json_inheritance.py"]
+}
diff --git a/sources/pyside6/doc/inheritance_graph.py b/sources/pyside6/doc/inheritance_graph.py
new file mode 100644
index 000000000..00e0ac486
--- /dev/null
+++ b/sources/pyside6/doc/inheritance_graph.py
@@ -0,0 +1,145 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+import sys
+
+from import_inheritance import (get_inheritance_entries_by_import)
+from json_inheritance import (is_inheritance_from_json_enabled,
+ get_inheritance_entries_from_json)
+
+
+TEST_DRIVER_USAGE = """Usage: inheritance_graph.py [module] [class]
+
+Example:
+python inheritance_graph.py PySide6.QtWidgets PySide6.QtWidgets.QWizard
+"""
+
+
+def format_dict(d):
+ """Format the URL dict for error message."""
+ result = '{'
+ n = 0
+ for k, v in d.items():
+ n += 1
+ if n > 10:
+ result += "..."
+ break
+ if n > 1:
+ result += ", "
+ result += f'"{k}": "{v}"'
+ result += '}'
+ return result
+
+
+class InheritanceGraph(object):
+ """
+ Given a list of classes, determines the set of classes that they inherit
+ from all the way to the root "object", and then is able to generate a
+ graphviz dot graph from them.
+ """
+ def __init__(self, class_names, currmodule, builtins=None, show_builtins=False, parts=0):
+ """
+ *class_names* is a list of child classes to show bases from.
+
+ If *show_builtins* is True, then Python builtins will be shown
+ in the graph.
+ """
+ self.class_names = class_names
+ if is_inheritance_from_json_enabled():
+ self.class_info = get_inheritance_entries_from_json(class_names)
+ else:
+ self.class_info = get_inheritance_entries_by_import(class_names,
+ currmodule,
+ builtins,
+ show_builtins,
+ parts)
+
+ def get_all_class_names(self):
+ """
+ Get all of the class names involved in the graph.
+ """
+ return [fullname for (_, fullname, _) in self.class_info]
+
+ # These are the default attrs for graphviz
+ default_graph_attrs = {
+ 'rankdir': 'LR',
+ 'size': '"8.0, 12.0"',
+ }
+ default_node_attrs = {
+ 'shape': 'box',
+ 'fontsize': 10,
+ 'height': 0.25,
+ 'fontname': '"Vera Sans, DejaVu Sans, Liberation Sans, '
+ 'Arial, Helvetica, sans"',
+ 'style': '"setlinewidth(0.5)"',
+ }
+ default_edge_attrs = {
+ 'arrowsize': 0.5,
+ 'style': '"setlinewidth(0.5)"',
+ }
+
+ def _format_node_attrs(self, attrs):
+ return ','.join([f'{x[0]}={x[1]}' for x in attrs.items()])
+
+ def _format_graph_attrs(self, attrs):
+ return ''.join([f"{x[0]}={x[1]};\n" for x in attrs.items()])
+
+ def generate_dot(self, name, urls={}, env=None,
+ graph_attrs={}, node_attrs={}, edge_attrs={}):
+ """
+ Generate a graphviz dot graph from the classes that
+ were passed in to __init__.
+
+ *name* is the name of the graph.
+
+ *urls* is a dictionary mapping class names to HTTP URLs.
+
+ *graph_attrs*, *node_attrs*, *edge_attrs* are dictionaries containing
+ key/value pairs to pass on as graphviz properties.
+ """
+ g_attrs = self.default_graph_attrs.copy()
+ n_attrs = self.default_node_attrs.copy()
+ e_attrs = self.default_edge_attrs.copy()
+ g_attrs.update(graph_attrs)
+ n_attrs.update(node_attrs)
+ e_attrs.update(edge_attrs)
+ if env:
+ g_attrs.update(env.config.inheritance_graph_attrs)
+ n_attrs.update(env.config.inheritance_node_attrs)
+ e_attrs.update(env.config.inheritance_edge_attrs)
+
+ res = []
+ res.append(f'digraph {name} {{\n')
+ res.append(self._format_graph_attrs(g_attrs))
+
+ for name, fullname, bases in self.class_info:
+ # Write the node
+ this_node_attrs = n_attrs.copy()
+ url = urls.get(fullname)
+ if url is not None:
+ this_node_attrs['URL'] = f'"{url}"'
+ this_node_attrs['target'] = '"_top"' # Browser target frame attribute (same page)
+ else:
+ urls_str = format_dict(urls)
+ print(f'inheritance_graph.py: No URL found for {name} ({fullname}) in {urls_str}.',
+ file=sys.stderr)
+ attribute = self._format_node_attrs(this_node_attrs)
+ res.append(f' "{name}" [{attribute}];\n')
+
+ # Write the edges
+ for base_name in bases:
+ attribute = self._format_node_attrs(e_attrs)
+ res.append(f' "{base_name}" -> "{name}" [{attribute}];\n')
+ res.append('}\n')
+ return ''.join(res)
+
+
+if __name__ == "__main__":
+ if len(sys.argv) < 2:
+ print(TEST_DRIVER_USAGE)
+ sys.exit(-1)
+ module = sys.argv[1]
+ class_names = sys.argv[2:]
+ graph = InheritanceGraph(class_names, module)
+ dot = graph.generate_dot("test")
+ print(dot)
diff --git a/sources/pyside6/doc/json_inheritance.py b/sources/pyside6/doc/json_inheritance.py
new file mode 100644
index 000000000..06be33ea4
--- /dev/null
+++ b/sources/pyside6/doc/json_inheritance.py
@@ -0,0 +1,74 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+import json
+import os
+import sys
+from pathlib import Path
+
+
+"""Helpers for determining base classes by reading a JSON
+ file written by shiboken's doc generator."""
+
+
+TEST_DRIVER_USAGE = """Usage: json_inheritance.py class_name json_file
+
+Example:
+python json_inheritance.py PySide6.QtWidgets.QWizard ~/inheritance.json
+"""
+
+
+ENV_VAR = "INHERITANCE_FILE"
+
+
+def strip_module(class_name):
+ return class_name[8:] if class_name.startswith("PySide") else class_name
+
+
+def get_inheritance_entries_recursion(json_dict, class_name):
+ """Get all edges of the inheritance graph of class_name."""
+ result = []
+ bases_entry = json_dict.get(class_name)
+ bases = bases_entry if bases_entry else []
+ node_name = strip_module(class_name)
+ base_list = [strip_module(b) for b in bases]
+ result.append((node_name, class_name, base_list))
+ for b in bases:
+ nested_bases = get_inheritance_entries_recursion(json_dict, b)
+ if nested_bases:
+ result.extend(nested_bases)
+ return result
+
+
+def _get_inheritance_entries_from_json(json_file, class_names):
+ """Get all edges of the inheritance graph of class_name
+ from the JSON file generated by shiboken."""
+ result = []
+ try:
+ with Path(json_file).open("r") as f:
+ json_dict = json.load(f)
+ for c in class_names:
+ result.extend(get_inheritance_entries_recursion(json_dict, c))
+ except (json.JSONDecodeError, KeyError) as e:
+ print(f"Error reading {json_file}: {e}")
+ raise
+ return result
+
+
+def is_inheritance_from_json_enabled():
+ return os.environ.get(ENV_VAR)
+
+
+def get_inheritance_entries_from_json(class_names):
+ json_file = os.environ[ENV_VAR]
+ return _get_inheritance_entries_from_json(json_file, class_names)
+
+
+if __name__ == "__main__":
+ if len(sys.argv) < 2:
+ print(TEST_DRIVER_USAGE)
+ sys.exit(-1)
+ class_name = sys.argv[1]
+ json_file = sys.argv[2]
+ for e in _get_inheritance_entries_from_json(json_file, [class_name]):
+ print(e)
diff --git a/sources/pyside6/doc/modules.rst b/sources/pyside6/doc/modules.rst
index 31937f291..8e77a4616 100644
--- a/sources/pyside6/doc/modules.rst
+++ b/sources/pyside6/doc/modules.rst
@@ -1,5 +1,5 @@
-Qt Modules
-===========
+Qt Modules Supported by Qt for Python
+=====================================
.. toctree::
:hidden:
@@ -7,79 +7,228 @@ Qt Modules
PySide6/Qt*/index
-.. list-table::
- :widths: 150, 150
- :align: left
+.. grid:: 1 3 3 3
+ :gutter: 2
+
+ .. grid-item-card:: :mod:`QtBluetooth <PySide6.QtBluetooth>`
+
+ The Bluetooth API provides connectivity between Bluetooth enabled
+ devices.
+
+
+ .. grid-item-card:: :mod:`QtCharts <PySide6.QtCharts>`
- * - :mod:`Qt Charts <PySide6.QtCharts>`
Provides a set of easy to use chart components.
- - :mod:`QtConcurrent <PySide6.QtConcurrent>`
- Provides high-level APIs that make it possible
- to write multi-threaded programs without using low-level threading
- primitives such as mutexes, read-write locks, wait conditions, or semaphores.
- * - :mod:`QtCore <PySide6.QtCore>`
+
+ .. grid-item-card:: :mod:`QtConcurrent <PySide6.QtConcurrent>`
+
+ Provides high-level APIs that make it possible to write multi-threaded
+ programs without using low-level threading primitives such as mutexes,
+ read-write locks, wait conditions, or semaphores.
+
+
+ .. grid-item-card:: :mod:`QtCore <PySide6.QtCore>`
+
Provides core non-GUI functionality.
- - :mod:`Qt DataVisualization <PySide6.QtDataVisualization>`
- Provides a way to visualize data in 3D as bar, scatter, and surface graphs.
- * - :mod:`QtDesigner <PySide6.QtDesigner>`
- Provides classes to extend Qt Designer.
- - :mod:`QtGui <PySide6.QtGui>`
+
+ .. grid-item-card:: :mod:`QtDataVisualization <PySide6.QtDataVisualization>`
+
+ Provides a way to visualize data in 3D as bar, scatter, and surface
+ graphs.
+
+ .. grid-item-card:: :mod:`QtDBus <PySide6.QtDBus>`
+
+ D-Bus is an Inter-Process Communication (IPC) and Remote Procedure
+ Calling (RPC) mechanism originally developed for Linux to replace
+ existing and competing IPC solutions with one unified protocol
+
+ .. grid-item-card:: :mod:`QtDesigner <PySide6.QtDesigner>`
+
+ Provides classes to extend *Qt Widgets Designer*.
+
+ .. grid-item-card:: :mod:`QtGui <PySide6.QtGui>`
+
Extends QtCore with GUI functionality.
- * - :mod:`QtHelp <PySide6.QtHelp>`
+
+ .. grid-item-card:: :mod:`QtHelp <PySide6.QtHelp>`
+
Provides classes for integrating online documentation in applications.
- - :mod:`QtNetwork <PySide6.QtNetwork>`
+
+ .. grid-item-card:: :mod:`Qt Multimedia <PySide6.QtMultimedia>`
+
+ Provides API for multimedia-specific use cases.
+
+ .. grid-item-card:: :mod:`Qt Multimedia Widgets <PySide6.QtMultimediaWidgets>`
+
+ Provides the widget-based multimedia API.
+
+ .. grid-item-card:: :mod:`QtNetwork <PySide6.QtNetwork>`
+
Offers classes that let you to write TCP/IP clients and servers.
- * - :mod:`QtOpenGL <PySide6.QtOpenGL>`
+
+ .. grid-item-card:: :mod:`Qt Network Authorization <PySide6.QtNetworkAuth>`
+
+ Provides a set of APIs that enable Qt applications to obtain limited
+ access to online accounts and HTTP services without exposing users'
+ passwords.
+
+ .. grid-item-card:: :mod:`QtNfc <PySide6.QtNfc>`
+
+ The NFC API provides connectivity between NFC enabled devices.
+
+ .. grid-item-card:: :mod:`QtOpenGL <PySide6.QtOpenGL>`
+
Offers classes that make it easy to use OpenGL in Qt applications.
- - :mod:`QtOpenGLFunctions <PySide6.QtOpenGLFunctions>`
- The QOpenGLFunctions class provides cross-platform access to the OpenGL ES 2.0 API.
- * - :mod:`QtOpenGLWidgets <PySide6.QtOpenGLWidgets>`
- The QOpenGLWidget class is a widget for rendering OpenGL graphics.
- - :mod:`QtPrintSupport <PySide6.QtPrintSupport>`
+
+ .. grid-item-card:: :mod:`QtOpenGL Widgets <PySide6.QtOpenGLWidgets>`
+
+ Provides the OpenGLWidget class enabling OpenGL rendering for
+ a certain part of the widget tree.
+
+ .. grid-item-card:: :mod:`Qt Positioning <PySide6.QtPositioning>`
+
+ Provides access to position, satellite info and area monitoring
+ classes.
+
+ .. grid-item-card:: :mod:`Qt PDF <PySide6.QtPdf>`
+
+ Classes and functions for rendering PDF documents.
+
+ .. grid-item-card:: :mod:`Qt PDF Widgets <PySide6.QtPdfWidgets>`
+
+ A PDF viewer widget.
+
+ .. grid-item-card:: :mod:`QtPrintSupport <PySide6.QtPrintSupport>`
+
Provides extensive cross-platform support for printing.
- * - :mod:`QtQml <PySide6.QtQml>`
+
+ .. grid-item-card:: :mod:`QtQml <PySide6.QtQml>`
+
Python API for Qt QML.
- - :mod:`QtQuick <PySide6.QtQuick>`
+
+ .. grid-item-card:: :mod:`QtQuick <PySide6.QtQuick>`
+
Provides classes for embedding Qt Quick in Qt applications.
- * - :mod:`QtQuickControls2 <PySide6.QtQuickControls2>`
+
+ .. grid-item-card:: :mod:`QtQuickControls2 <PySide6.QtQuickControls2>`
+
Provides classes for setting up the controls from C++.
- - :mod:`QtQuickWidgets <PySide6.QtQuickWidgets>`
+
+ .. grid-item-card:: :mod:`QtQuickTest <PySide6.QtQuickTest>`
+
+ A unit test framework for QML applications where test cases are written as JavaScript functions.
+
+ .. grid-item-card:: :mod:`QtQuickWidgets <PySide6.QtQuickWidgets>`
+
Provides the QQuickWidget class for embedding Qt Quick in widget-based applications.
- * - :mod:`Qt Scxml <PySide6.QtScxml>`
+
+ .. grid-item-card:: :mod:`QtRemoteObjects <PySide6.QtRemoteObjects>`
+
+ Inter-Process Communication (IPC) module developed for Qt. This module
+ extends Qt's existing functionalities to enable information exchange
+ between processes or computers, easily.
+
+ .. grid-item-card:: :mod:`Qt Scxml <PySide6.QtScxml>`
+
Provides classes to create and use state machines from SCXML files.
- - :mod:`QtSql <PySide6.QtSql>`
- Helps you provide seamless database integration to your Qt applications.
- * - :mod:`QtStateMachine <PySide6.QtStateMachine>`
+
+ .. grid-item-card:: :mod:`Qt Sensors <PySide6.QtSensors>`
+
+ Provides access to sensor hardware.
+
+ .. grid-item-card:: :mod:`Qt Serial Bus <PySide6.QtSerialBus>`
+
+ Provides access to serial industrial bus interfaces. Currently, the
+ module supports the CAN bus and Modbus protocols.
+
+ .. grid-item-card:: :mod:`Qt Serial Port <PySide6.QtSerialPort>`
+
+ Provides classes to interact with hardware and virtual serial ports.
+
+ .. grid-item-card:: :mod:`Qt Spatial Audio <PySide6.QtSpatialAudio>`
+
+ Provides APIs for modeling sound source and their surrounds in 3D
+ space.
+
+ .. grid-item-card:: :mod:`QtSql <PySide6.QtSql>`
+
+ Helps you provide seamless database integration to your Qt
+ applications.
+
+ .. grid-item-card:: :mod:`QtStateMachine <PySide6.QtStateMachine>`
+
Provides classes for creating and executing state graphs.
- - :mod:`QtSvg <PySide6.QtSvg>`
+
+ .. grid-item-card:: :mod:`QtSvg <PySide6.QtSvg>`
+
Provides classes for displaying the contents of SVG files.
- * - :mod:`QtSvgWidgets <PySide6.QtSvgWidgets>`
+
+ .. grid-item-card:: :mod:`QtSvgWidgets <PySide6.QtSvgWidgets>`
+
Provides a widget that is used to display the contents of SVG files.
- - :mod:`QtTest <PySide6.QtTest>`
+
+ .. grid-item-card:: :mod:`QtTest <PySide6.QtTest>`
+
Provides classes for unit testing Qt applications and libraries.
- * - :mod:`QtUiTools <PySide6.QtUiTools>`
- Provides classes to handle forms created with Qt Designer.
- - :mod:`QtWidgets <PySide6.QtWidgets>`
+
+ .. grid-item-card:: :mod:`QtUiTools <PySide6.QtUiTools>`
+
+ Provides classes to handle forms created with *Qt Widgets Designer*.
+
+ .. grid-item-card:: :mod:`Qt WebChannel <PySide6.QtWebChannel>`
+
+ Provides access to QObject or QML objects from HTML clients for
+ seamless integration of Qt applications with HTML/JavaScript clients.
+
+ .. grid-item-card:: :mod:`QtWebEngine Core C++ Classes <PySide6.QtWebEngineCore>`
+
+ Provides public API shared by both QtWebEngine and QtWebEngineWidgets.
+
+ .. grid-item-card:: :mod:`QtWebEngine Widgets C++ Classes <PySide6.QtWebEngineWidgets>`
+
+ Provides C++ classes for rendering web content in a QWidget based
+ application.
+
+ .. grid-item-card:: :mod:`QtWebEngine QML Types <PySide6.QtWebEngineQuick>`
+
+ Provides QML types for rendering web content within a QML application.
+
+ .. grid-item-card:: :mod:`Qt WebSockets <PySide6.QtWebSockets>`
+
+ Provides WebSocket communication compliant with RFC 6455.
+
+ .. grid-item-card:: :mod:`QtWidgets <PySide6.QtWidgets>`
+
Extends Qt GUI with C++ widget functionality.
- * - :mod:`QtXml <PySide6.QtXml>`
+
+ .. grid-item-card:: :mod:`QtXml <PySide6.QtXml>`
+
Provides a C++ implementation of DOM.
- - :mod:`Qt 3D Animation <PySide6.Qt3DAnimation>`
+
+ .. grid-item-card:: :mod:`Qt3DAnimation <PySide6.Qt3DAnimation>`
+
Provides basic elements required to animate 3D objects.
- * - :mod:`Qt WebEngine Core C++ Classes <PySide6.QtWebEngineCore>`
- Provides public API shared by both QtWebEngine and QtWebEngineWidgets.
- - :mod:`Qt WebEngine Widgets C++ Classes <PySide6.QtWebEngineWidgets>`
- Provides C++ classes for rendering web content in a QWidget based application.
- * - :mod:`Qt WebEngine QML Types <PySide6.QtWebEngineQuick>`
- Provides QML types for rendering web content within a QML application.
- -
- * - :mod:`Qt 3D Core <PySide6.Qt3DCore>`
+
+ .. grid-item-card:: :mod:`Qt3D Core <PySide6.Qt3DCore>`
+
Contains functionality to support near-realtime simulation systems.
- - :mod:`Qt 3D Extras <PySide6.Qt3DExtras>`
+
+ .. grid-item-card:: :mod:`Qt3D Extras <PySide6.Qt3DExtras>`
+
Provides a set of prebuilt elements to help you get started with Qt 3D.
- * - :mod:`Qt 3D Input <PySide6.Qt3DInput>`
+
+ .. grid-item-card:: :mod:`Qt3D Input <PySide6.Qt3DInput>`
+
Provides classes for handling user input in applications using Qt 3D.
- - :mod:`Qt 3D Logic <PySide6.Qt3DLogic>`
+
+ .. grid-item-card:: :mod:`Qt3D Logic <PySide6.Qt3DLogic>`
+
Enables synchronizing frames with the Qt 3D backend.
- * - :mod:`Qt 3D Render <PySide6.Qt3DRender>`
+
+ .. grid-item-card:: :mod:`Qt3D Render <PySide6.Qt3DRender>`
+
Contains functionality to support 2D and 3D rendering using Qt 3D.
- -
+
+ .. grid-item-card:: :mod:`QtAsyncio <PySide6.QtAsyncio>`
+
+ Provides integration between asyncio and Qt's event loop.
diff --git a/sources/pyside6/doc/porting_from2.rst b/sources/pyside6/doc/porting_from2.rst
deleted file mode 100644
index aa3e41780..000000000
--- a/sources/pyside6/doc/porting_from2.rst
+++ /dev/null
@@ -1,100 +0,0 @@
-Porting Applications from PySide2 to PySide6
-============================================
-
-Module Availability
--------------------
-
-Qt for Python 6.0.0 initially ships with the essential
-`Modules <https://doc.qt.io/qt-6/qtmodules.html>`_ and some
-add-ons (Qt 3D, Qt Concurrent, Qt Help, Qt OpenGL, Qt Print Support
-Qt Quick Widgets, Qt SQL, Qt SVG, Qt UI Tools and Qt XML).
-
-More modules will follow in subsequent releases as they
-are added to Qt.
-
-For Qt for Python 6.1, Active Qt, Qt Charts, Qt Data Visualization,
-Qt StateMachine and Qt SCXML are planned.
-
-Module-Level Changes
---------------------
-
-* *Qt Quick Controls 1* have been removed.
-* ``QStateMachine`` and related classes have been extracted to a new
- *QtStateMachine* module.
-* ``QXmlReader`` and related classes (*SAX API*) have been removed.
-* The content of the *QtOpenGL* module has been replaced. The class
- ``QGLWidget`` and related classes (``QGLContext``, ``QGLFunctions``,
- ``QGLShaderProgram``) have been removed. Parts of the *Open GL*
- functionality from *QtGui* have been extracted into this module, for example
- ``QOpenGLBuffer`` and ``QOpenGLShaderProgram``.
- There is a new module *QtOpenGLWidgets* which contains the class
- ``QOpenGLWidget``, a replacement for ``QGLWidget``.
-
-As *Open GL* is phasing out,
-`QRhi <https://doc.qt.io/qt-6/topics-graphics.html>`_ should be considered
-for graphics applications.
-
-Imports
--------
-
-The first thing to do when porting applications is to replace the
-import statements:
-
-.. code-block:: python
-
- from PySide2.QtWidgets import QApplication...
- from PySide2 import QtCore
-
-needs to be changed to:
-
-.. code-block:: python
-
- from PySide6.QtWidgets import QApplication...
- from PySide6 import QtCore
-
-
-Some classes are in a different module now, for example
-``QAction`` and ``QShortcut`` have been moved from ``QtWidgets`` to ``QtGui``.
-
-For *Qt Charts* and *Qt Data Visualization*, the additional namespaces have been
-removed. It is now possible to use:
-
-.. code-block:: python
-
- from PySide6.QtCharts import QChartView
-
-directly.
-
-
-Class/Function Deprecations
----------------------------
-
-Then, the code base needs to be checked for usage of deprecated API and adapted
-accordingly. For example:
-
- * The High DPI scaling attributes ``Qt.AA_EnableHighDpiScaling``,
- ``Qt.AA_DisableHighDpiScaling`` and ``Qt.AA_UseHighDpiPixmaps`` are
- deprecated. High DPI is by default enabled in Qt 6 and cannot be turned off.
- * ``QDesktopWidget`` has been removed. ``QScreen`` should be used instead,
- which can be retrieved using ``QWidget.screen()``,
- ``QGuiApplication.primaryScreen()`` or ``QGuiApplication.screens()``.
- * ``QFontMetrics.width()`` has been renamed to ``horizontalAdvance()``.
- * ``QMouseEvent.pos()`` and ``QMouseEvent.globalPos()`` returning a ``QPoint``
- as well as ``QMouseEvent.x()`` and ``QMouseEvent.y()`` returning ``int``
- are now deprecated. ``QMouseEvent.position()`` and
- ``QMouseEvent.globalPosition()`` returning a ``QPointF`` should be used
- instead.
- * ``Qt.MidButton`` has been renamed to ``Qt.MiddleButton``.
- * ``QOpenGLVersionFunctionsFactory.get()`` instead of
- ``QOpenGLContext.versionFunctions()`` should be used to obtain
- *Open GL* functions.
- * ``QRegExp`` has been replaced by ``QRegularExpression``.
- * ``QWidget.mapToGlobal()`` and ``QWidget.mapFromGlobal()`` now also accept
- and return ``QPointF``.
- * Functions named ``exec_`` (classes ``QCoreApplication``, ``QDialog``,
- ``QEventLoop``) have been renamed to ``exec`` which became possible
- in Python 3.
-
-More information can be found in the
-`Porting to Qt 6 <https://doc.qt.io/qt-6/portingguide.html>`_ Guide
-and the `Qt 6.0 Documentation <https://doc.qt.io/qt-6/index.html>`_ .
diff --git a/sources/pyside6/doc/pysideinclude.py b/sources/pyside6/doc/pysideinclude.py
index 91fffe115..8e2834cce 100644
--- a/sources/pyside6/doc/pysideinclude.py
+++ b/sources/pyside6/doc/pysideinclude.py
@@ -11,9 +11,9 @@ from os import path
from docutils import nodes
from docutils.parsers.rst import Directive, directives
-from sphinx import addnodes
from sphinx.util import parselinenos
+
class PySideInclude(Directive):
"""
Like ``.. include:: :literal:``, but only warns if the include file is
@@ -68,7 +68,7 @@ class PySideInclude(Directive):
codec_info = codecs.lookup(encoding)
try:
f = codecs.StreamReaderWriter(open(fn, 'Ub'),
- codec_info[2], codec_info[3], 'strict')
+ codec_info[2], codec_info[3], 'strict')
lines = f.readlines()
f.close()
except (IOError, OSError):
@@ -91,7 +91,7 @@ class PySideInclude(Directive):
'Object named %r not found in include file %r' %
(objectname, filename), line=self.lineno)]
else:
- lines = lines[tags[objectname][1]-1 : tags[objectname][2]-1]
+ lines = lines[tags[objectname][1] - 1: tags[objectname][2] - 1]
linespec = self.options.get('lines')
if linespec is not None:
@@ -102,10 +102,10 @@ class PySideInclude(Directive):
lines = [lines[i] for i in linelist]
startafter = self.options.get('start-after')
- endbefore = self.options.get('end-before')
- prepend = self.options.get('prepend')
- append = self.options.get('append')
- snippet = self.options.get('snippet')
+ endbefore = self.options.get('end-before')
+ prepend = self.options.get('prepend')
+ append = self.options.get('append')
+ snippet = self.options.get('snippet')
if snippet:
startafter = "//![%s]" % snippet
@@ -126,9 +126,9 @@ class PySideInclude(Directive):
lines = res
if prepend:
- lines.insert(0, prepend + '\n')
+ lines.insert(0, prepend + '\n')
if append:
- lines.append(append + '\n')
+ lines.append(append + '\n')
text = ''.join(lines)
if self.options.get('tab-width'):
@@ -143,5 +143,6 @@ class PySideInclude(Directive):
document.settings.env.note_dependency(rel_fn)
return [retnode]
+
def setup(app):
app.add_directive('pysideinclude', PySideInclude)
diff --git a/sources/pyside6/doc/qdoc_spawner.py.in b/sources/pyside6/doc/qdoc_spawner.py.in
new file mode 100644
index 000000000..d9d434366
--- /dev/null
+++ b/sources/pyside6/doc/qdoc_spawner.py.in
@@ -0,0 +1,105 @@
+# Copyright (C) 2024 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+import argparse
+import subprocess
+import os
+import sys
+import time
+from multiprocessing import Pool, cpu_count
+from pathlib import Path
+
+
+def run_qdoc(file, qdoc_args, args):
+ env = os.environ
+ env["BUILDDIR"] = args.build_dir
+ env["QT_INSTALL_DOCS"] = args.qt_install_docs
+ env["QT_VERSION"] = args.qt_version
+ env["QT_VER"] = ".".join(args.qt_version.split(".")[:2])
+ env["QT_VERSION_TAG"] = args.qt_version
+
+ command = [
+ args.qdoc_bin,
+ file,
+ *qdoc_args,
+ "-installdir",
+ args.doc_data_dir,
+ "-outputdir",
+ args.doc_data_dir,
+ ]
+
+ start_time = time.time()
+ _ = subprocess.Popen(command, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ out, err = _.communicate()
+ returncode = _.wait()
+ duration = round(time.time() - start_time)
+
+ if args.verbose or returncode != 0 or err:
+ cmd_str = " ".join(command)
+ print(f"> Output of: {cmd_str}")
+ if out:
+ print(out.decode("utf-8"), file=sys.stdout)
+ if err:
+ print(err.decode("utf-8"), file=sys.stderr)
+ print(f"> Finished: {file} {duration}s (exit code {returncode})")
+
+ if returncode != 0:
+ raise Exception(f"Failing executing the command {command} ({returncode})")
+
+
+def get_qdocconf_files():
+ if not Path("pyside.qdocconf").exists():
+ print("ERROR: the working dir doesn't include a 'pyside.qdocconf' file")
+ sys.exit(-1)
+
+ # Generate the temporary qdocconf files
+ # This is necessary because using a file like 'pyside-qtcore.qtdocconf'
+ # will generate an error, because inside we call functions like 'include()'
+ files_single_exec = []
+ files_prepare = []
+ with open("pyside.qdocconf") as f:
+ for i in f.read().splitlines():
+ _p = Path(i)
+ _name = f"_{_p.stem}.qdocconf"
+ with open(_name, "w", encoding="utf-8") as f:
+ f.write(i)
+ files_single_exec.append(_name)
+ files_prepare.append(i.strip())
+
+ return files_prepare, files_single_exec
+
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(prog="qdoc spawner")
+ parser.add_argument("--qt", dest="qt_version", action="store", required=True)
+ parser.add_argument("--doc-data-dir", dest="doc_data_dir", action="store", required=True)
+ parser.add_argument("--qdoc-binary", dest="qdoc_bin", action="store", required=True)
+ parser.add_argument("--build-dir", dest="build_dir", action="store", required=True)
+ parser.add_argument("--qt-install-docs", dest="qt_install_docs", action="store", required=True)
+ parser.add_argument("--parallel", dest="parallel", action="store", default="4")
+ parser.add_argument("--verbose", dest="verbose", action="store_true", default=False)
+
+ args = parser.parse_args()
+
+ core_index = Path(args.doc_data_dir) / "webxml" / "qtcore-index.webxml"
+ if core_index.is_file():
+ print(f"qdoc_spawner: {core_index} already exists, bailing out")
+ sys.exit(0)
+
+ files_prepare, files_single_exec = get_qdocconf_files()
+
+ parallel = args.parallel
+ if parallel == "auto":
+ parallel = cpu_count()
+
+ try:
+ # mode: -prepare -no-link-errors
+ with Pool(int(parallel)) as p:
+ p.starmap(run_qdoc, [(str(f), ["-prepare", "-no-link-errors"], args) for f in files_prepare])
+
+ # mode: -single-exec
+ with Pool(int(parallel)) as p:
+ p.starmap(run_qdoc, [(str(f), ["-single-exec"], args) for f in files_single_exec])
+ except Exception as e:
+ print(f"qdoc_spawner: error: {e}", file=sys.stderr)
+ sys.exit(-1)
diff --git a/sources/pyside6/doc/qtattributionsscannertorst.py b/sources/pyside6/doc/qtattributionsscannertorst.py
index dbc8040d0..677371c45 100644
--- a/sources/pyside6/doc/qtattributionsscannertorst.py
+++ b/sources/pyside6/doc/qtattributionsscannertorst.py
@@ -1,41 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2018 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
"""
Tool to run qtattributionsscanner and convert its output to rst
@@ -44,18 +8,25 @@ Tool to run qtattributionsscanner and convert its output to rst
import os
import json
import subprocess
-import sys
import warnings
+from argparse import ArgumentParser, RawTextHelpFormatter
from pathlib import Path
+USAGE = "Usage: qtattributionsscannertorst [directory] [file]'"
+
+
+libexec_dir = None
+
+
def indent(lines, indent):
result = ''
- for l in lines:
- result = f"{result}{indent}{l}\n"
+ for line in lines:
+ result = f"{result}{indent}{line}\n"
return result
-rstHeader="""Licenses Used in Qt for Python
+
+rstHeader = """Licenses Used in Qt for Python
******************************
Qt for Python contains some code that is not provided under the
@@ -75,35 +46,43 @@ Third-party Licenses
The licenses for the third-party sources used by Qt itself are listed
in
-`Qt documentation <http://doc.qt.io/qt-5/licenses-used-in-qt.html>`_.
+`Qt documentation <https://doc.qt.io/qt-5/licenses-used-in-qt.html>`_.
The following table lists parts of Qt for Python that incorporates
code licensed under third-party opensource licenses:
"""
+
def rstHeadline(title):
return f"{title}\n{'-' * len(title)}\n"
+
def rstUrl(title, url):
return f"`{title} <{url}>`_"
+
def rstLiteralBlock(lines):
return f"::\n\n{indent(lines, ' ')}\n\n"
+
def rstLiteralBlockFromText(text):
return rstLiteralBlock(text.strip().split('\n'))
+
def readFile(fileName):
with open(fileName, 'r') as file:
return file.readlines()
-def runScanner(directory, targetFileName):
+
+def get_libexec_dir():
+ libexec_b = subprocess.check_output("qtpaths6 -query QT_INSTALL_LIBEXECS", shell=True)
+ return libexec_b.decode('utf-8').strip()
+
+
+def runScanner(directory, targetFileName, libexec_dir):
# qtattributionsscanner recursively searches for qt_attribution.json files
# and outputs them in JSON with the paths of the 'LicenseFile' made absolute
- libexec_b = subprocess.check_output('qtpaths -query QT_INSTALL_LIBEXECS',
- shell=True)
- libexec = libexec_b.decode('utf-8').strip()
- scanner = os.path.join(libexec, 'qtattributionsscanner')
+ scanner = os.path.join(libexec_dir, 'qtattributionsscanner')
command = f'{scanner} --output-format json {directory}'
jsonS = subprocess.check_output(command, shell=True)
if not jsonS:
@@ -116,7 +95,7 @@ def runScanner(directory, targetFileName):
url = entry['Homepage']
version = entry['Version']
if url and version:
- content = f"{content}{rstUrl('Project Homepage', url)}, upstream version: {version}\n\n"
+ content = f"{content}{rstUrl('Project Homepage', url)}, upstream version: {version}\n\n" # noqa E:501
copyright = entry['Copyright']
if copyright:
content += rstLiteralBlockFromText(copyright)
@@ -129,10 +108,16 @@ def runScanner(directory, targetFileName):
warnings.warn(f'"{licenseFile}" is not a file', RuntimeWarning)
targetFile.write(content)
-if len(sys.argv) < 3:
- print("Usage: qtattributionsscannertorst [directory] [file]'")
- sys.exit(0)
-directory = sys.argv[1]
-targetFileName = sys.argv[2]
-runScanner(directory, targetFileName)
+if __name__ == '__main__':
+ parser = ArgumentParser(description=USAGE, formatter_class=RawTextHelpFormatter)
+ parser.add_argument("-l", "--libexec", type=str, help="libexec directory of Qt")
+ parser.add_argument('directory')
+ parser.add_argument('target')
+ options = parser.parse_args()
+ directory = options.directory
+ targetFileName = options.target
+ libexec_dir = options.libexec
+ if not libexec_dir:
+ libexec_dir = get_libexec_dir()
+ runScanner(directory, targetFileName, libexec_dir)
diff --git a/sources/pyside6/doc/qtmodules/pyside-qtbluetooth.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtbluetooth.qdocconf.in
new file mode 100644
index 000000000..0867ff0c2
--- /dev/null
+++ b/sources/pyside6/doc/qtmodules/pyside-qtbluetooth.qdocconf.in
@@ -0,0 +1,2 @@
+include(@QT_SRC_DIR@/../qtconnectivity/src/bluetooth/doc/qtbluetooth.qdocconf)
+include(../pyside-config.qdocconf)
diff --git a/sources/pyside6/doc/qtmodules/pyside-qtdbus.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtdbus.qdocconf.in
new file mode 100644
index 000000000..d291d92bd
--- /dev/null
+++ b/sources/pyside6/doc/qtmodules/pyside-qtdbus.qdocconf.in
@@ -0,0 +1,2 @@
+include(@QT_SRC_DIR@/src/dbus/doc/qtdbus.qdocconf)
+include(../pyside-config.qdocconf)
diff --git a/sources/pyside6/doc/qtmodules/pyside-qtdoc.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtdoc.qdocconf.in
new file mode 100644
index 000000000..88cc3eac4
--- /dev/null
+++ b/sources/pyside6/doc/qtmodules/pyside-qtdoc.qdocconf.in
@@ -0,0 +1,2 @@
+include(@QT_SRC_DIR@/../qtdoc/doc/config/qtdoc.qdocconf)
+include(../pyside-config.qdocconf)
diff --git a/sources/pyside6/doc/qtmodules/pyside-qtlocation.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtlocation.qdocconf.in
deleted file mode 100644
index 5536e0c8b..000000000
--- a/sources/pyside6/doc/qtmodules/pyside-qtlocation.qdocconf.in
+++ /dev/null
@@ -1,3 +0,0 @@
-include(@QT_SRC_DIR@/../qtlocation/src/location/doc/qtlocation.qdocconf)
-includepaths += -I @QT_SRC_DIR@/../qtlocation/src/location/doc
-include(../pyside-config.qdocconf)
diff --git a/sources/pyside6/doc/qtmodules/pyside-qtmacextras.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtmacextras.qdocconf.in
deleted file mode 100644
index 3e0e40019..000000000
--- a/sources/pyside6/doc/qtmodules/pyside-qtmacextras.qdocconf.in
+++ /dev/null
@@ -1,2 +0,0 @@
-include(@QT_SRC_DIR@/../qtmacextras/src/macextras/doc/qtmacextras.qdocconf)
-include(../pyside-config.qdocconf)
diff --git a/sources/pyside6/doc/qtmodules/pyside-qtnetworkauth.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtnetworkauth.qdocconf.in
new file mode 100644
index 000000000..45a20bdd9
--- /dev/null
+++ b/sources/pyside6/doc/qtmodules/pyside-qtnetworkauth.qdocconf.in
@@ -0,0 +1,2 @@
+include(@QT_SRC_DIR@/../qtnetworkauth/src/oauth/doc/qtnetworkauth.qdocconf)
+include(../pyside-config.qdocconf)
diff --git a/sources/pyside6/doc/qtmodules/pyside-qtnfc.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtnfc.qdocconf.in
new file mode 100644
index 000000000..833bbc019
--- /dev/null
+++ b/sources/pyside6/doc/qtmodules/pyside-qtnfc.qdocconf.in
@@ -0,0 +1,2 @@
+include(@QT_SRC_DIR@/../qtconnectivity/src/nfc/doc/qtnfc.qdocconf)
+include(../pyside-config.qdocconf)
diff --git a/sources/pyside6/doc/qtmodules/pyside-qtpdf.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtpdf.qdocconf.in
new file mode 100644
index 000000000..43eb302af
--- /dev/null
+++ b/sources/pyside6/doc/qtmodules/pyside-qtpdf.qdocconf.in
@@ -0,0 +1,3 @@
+include(@QT_SRC_DIR@/../qtwebengine/src/pdf/doc/qtpdf.qdocconf)
+includepaths += -I @QT_SRC_DIR@/../qtwebengine/src/pdf/doc
+include(../pyside-config.qdocconf)
diff --git a/sources/pyside6/doc/qtmodules/pyside-qtpositioning.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtpositioning.qdocconf.in
index 4a2c677d5..f08a1ec07 100644
--- a/sources/pyside6/doc/qtmodules/pyside-qtpositioning.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtpositioning.qdocconf.in
@@ -1,3 +1,3 @@
-include(@QT_SRC_DIR@/../qtlocation/src/positioning/doc/qtpositioning.qdocconf)
-includepaths += -I @QT_SRC_DIR@/../qtlocation/src/positioning/doc
+include(@QT_SRC_DIR@/../qtpositioning/src/positioning/doc/qtpositioning.qdocconf)
+includepaths += -I @QT_SRC_DIR@/../qtpositioning/src/positioning/doc
include(../pyside-config.qdocconf)
diff --git a/sources/pyside6/doc/qtmodules/pyside-qtquickcontrols2.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtquickcontrols2.qdocconf.in
index 936aacb93..4d0a55946 100644
--- a/sources/pyside6/doc/qtmodules/pyside-qtquickcontrols2.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtquickcontrols2.qdocconf.in
@@ -1,3 +1,3 @@
-include(@QT_SRC_DIR@/../qtquickcontrols2/src/quickcontrols2/doc/qtquickcontrols.qdocconf)
-includepaths += -I @QT_SRC_DIR@/../qtquickcontrols2/src/quickcontrols2
+include(@QT_SRC_DIR@/../qtdeclarative/src/quickcontrols/doc/qtquickcontrols.qdocconf)
+includepaths += -I @QT_SRC_DIR@/../qtdeclarative/src/quickcontrols
include(../pyside-config.qdocconf)
diff --git a/sources/pyside6/doc/qtmodules/pyside-qtquicktest.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtquicktest.qdocconf.in
new file mode 100644
index 000000000..1d8397537
--- /dev/null
+++ b/sources/pyside6/doc/qtmodules/pyside-qtquicktest.qdocconf.in
@@ -0,0 +1,3 @@
+include(@QT_SRC_DIR@/../qtdeclarative/src/qmltest/doc/qtqmltest.qdocconf)
+includepaths += -I @QT_SRC_DIR@/../qtdeclarative/src/qmltest
+include(../pyside-config.qdocconf)
diff --git a/sources/pyside6/doc/qtmodules/pyside-qtremoteobjects.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtremoteobjects.qdocconf.in
new file mode 100644
index 000000000..dfad130e6
--- /dev/null
+++ b/sources/pyside6/doc/qtmodules/pyside-qtremoteobjects.qdocconf.in
@@ -0,0 +1,2 @@
+include(@QT_SRC_DIR@/../qtremoteobjects/src/remoteobjects/doc/qtremoteobjects.qdocconf)
+include(../pyside-config.qdocconf)
diff --git a/sources/pyside6/doc/qtmodules/pyside-qtserialbus.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtserialbus.qdocconf.in
new file mode 100644
index 000000000..4c67664a5
--- /dev/null
+++ b/sources/pyside6/doc/qtmodules/pyside-qtserialbus.qdocconf.in
@@ -0,0 +1,2 @@
+include(@QT_SRC_DIR@/../qtserialbus/src/serialbus/doc/qtserialbus.qdocconf)
+include(../pyside-config.qdocconf)
diff --git a/sources/pyside6/doc/qtmodules/pyside-qtserialport.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtserialport.qdocconf.in
new file mode 100644
index 000000000..da1b75f7d
--- /dev/null
+++ b/sources/pyside6/doc/qtmodules/pyside-qtserialport.qdocconf.in
@@ -0,0 +1,2 @@
+include(@QT_SRC_DIR@/../qtserialport/src/serialport/doc/qtserialport.qdocconf)
+include(../pyside-config.qdocconf)
diff --git a/sources/pyside6/doc/qtmodules/pyside-qtspatialaudio.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtspatialaudio.qdocconf.in
new file mode 100644
index 000000000..be64648a5
--- /dev/null
+++ b/sources/pyside6/doc/qtmodules/pyside-qtspatialaudio.qdocconf.in
@@ -0,0 +1,3 @@
+include(@QT_SRC_DIR@/../qtmultimedia/src/spatialaudio/doc/qtspatialaudio.qdocconf)
+includepaths += -I @QT_SRC_DIR@/../qtmultimedia/src/spatialaudio/doc
+include(../pyside-config.qdocconf)
diff --git a/sources/pyside6/doc/qtmodules/pyside-qttexttospeech.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qttexttospeech.qdocconf.in
index ed49121c1..175b0f4f8 100644
--- a/sources/pyside6/doc/qtmodules/pyside-qttexttospeech.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qttexttospeech.qdocconf.in
@@ -1,3 +1,3 @@
-include(@QT_SRC_DIR@/../qtspeech/src/doc/qtspeech.qdocconf)
-includepaths += -I @QT_SRC_DIR@/../qtspeech/src/doc
+include(@QT_SRC_DIR@/../qtspeech/src/tts/doc/qttexttospeech.qdocconf)
+includepaths += -I @QT_SRC_DIR@/../qtspeech/src/tts/doc
include(../pyside-config.qdocconf)
diff --git a/sources/pyside6/doc/qtmodules/pyside-qtuitools.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtuitools.qdocconf.in
index 7bd3941f7..a950a0b4b 100644
--- a/sources/pyside6/doc/qtmodules/pyside-qtuitools.qdocconf.in
+++ b/sources/pyside6/doc/qtmodules/pyside-qtuitools.qdocconf.in
@@ -1,2 +1,2 @@
-include(@QT_SRC_DIR@/../qttools/src/designer/src/uitools/doc/qtuitools.qdocconf)
+include(@QT_SRC_DIR@/../qttools/src/uitools/doc/qtuitools.qdocconf)
include(../pyside-config.qdocconf)
diff --git a/sources/pyside6/doc/qtmodules/pyside-qtwinextras.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtwinextras.qdocconf.in
deleted file mode 100644
index d2c1d5be7..000000000
--- a/sources/pyside6/doc/qtmodules/pyside-qtwinextras.qdocconf.in
+++ /dev/null
@@ -1,2 +0,0 @@
-include(@QT_SRC_DIR@/../qtwinextras/src/winextras/doc/qtwinextras.qdocconf)
-include(../pyside-config.qdocconf)
diff --git a/sources/pyside6/doc/qtmodules/pyside-qtx11extras.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-qtx11extras.qdocconf.in
deleted file mode 100644
index 9315fa58c..000000000
--- a/sources/pyside6/doc/qtmodules/pyside-qtx11extras.qdocconf.in
+++ /dev/null
@@ -1,2 +0,0 @@
-include(@QT_SRC_DIR@/../qtx11extras/src/x11extras/doc/qtx11extras.qdocconf)
-include(../pyside-config.qdocconf)
diff --git a/sources/pyside6/doc/quickstart.rst b/sources/pyside6/doc/quickstart.rst
index 3764e8269..7e1a210f2 100644
--- a/sources/pyside6/doc/quickstart.rst
+++ b/sources/pyside6/doc/quickstart.rst
@@ -1,44 +1,80 @@
-|project| Quick start
-======================
+.. _quick-start:
+
+Quick start
+===========
+
+New to Qt? Check also the :ref:`faq-section` section at the end of this page.
+In case you own a Qt License, please refer to :ref:`commercial-page`.
+
+.. note:: Having Qt installed in your system will not interfere with your
+ PySide6 installation if you do it via ``pip install``, because the Python
+ packages (wheels) include already Qt binaries. Most notably, style plugins
+ from the system won't have any effect on PySide applications.
Requirements
------------
Before you can install |project|, first you must install the following software:
- * Python 3.6+,
- * We recommend using a virtual environment, such as
- `venv <https://docs.python.org/3/library/venv.html>`_ or
- `virtualenv <https://virtualenv.pypa.io/en/latest>`_
+* Python 3.7+,
+* We **highly** recommend using a virtual environment, such as
+ `venv <https://docs.python.org/3/library/venv.html>`_ or
+ `virtualenv <https://virtualenv.pypa.io/en/latest>`_
+ and avoid installing PySide6 via ``pip`` in your system.
+
+.. note:: For Windows users, please use the interpreter from https://python.org/download
+ rather than the one installed from the Microsoft Store.
Installation
------------
-
-.. raw:: html
-
- <img src="https://qt-wiki-uploads.s3.amazonaws.com/images/8/8a/Pyside6_install.gif"
- style="float: right; width: 35%; padding-left: 20px;"
- alt="PySide6 installation animation" />
+.. note:: For a commercial installation, refer to :ref:`commercial-page`.
* **Creating and activating an environment**
You can do this by running the following on a terminal:
- * :command:`python -m venv env`, (Your Python executable might be called ``python3``)
- * :command:`source env/bin/activate` for Linux and macOS
- * :command:`env\\\Scripts\\\activate.bat` for Windows
+ * Create environment (Your Python executable might be called ``python3``)::
+
+ python -m venv env
-* **Installation**
+ * Activate the environment (Linux and macOS)::
+
+ source env/bin/activate
+
+ * Activate the environment (Windows)::
+
+ env\Scripts\activate.bat
+
+ Check this animation on how to do it:
+
+ .. image:: https://qt-wiki-uploads.s3.amazonaws.com/images/8/8a/Pyside6_install.gif
+ :alt: Installation GIF
+
+* **Installing PySide6**
Now you are ready to install the |project| packages using ``pip``.
From the terminal, run the following command:
- * :command:`pip install pyside6`, for the latest version.
- * :command:`pip install pyside6==6.0`, for the version ``6.0`` specifically.
+ * For the latest version::
+
+ pip install pyside6
+
+ * For a specific version, like 6.4.1::
+
+ pip install pyside6==6.4.1
+
* It is also possible to install a specific snapshot from our servers.
To do so, you can use the following command::
- pip install --index-url=http://download.qt.io/snapshots/ci/pyside/6.0.0/latest pyside6 --trusted-host download.qt.io
+ pip install --index-url=https://download.qt.io/snapshots/ci/pyside/6.4/latest pyside6 --trusted-host download.qt.io
+
+ .. note:: Starting with 6.4.3, PySide6 can be used from inside a
+ `conda <https://conda.io>`_ environment, but any manual changes you make to
+ the ``qt.conf`` file will be ignored. If you want to set custom values to
+ the Qt configuration, set them in a ``qt6.conf`` file instead.
+ Read more about `qt.conf`_.
+
+.. _`qt.conf`: https://doc.qt.io/qt-6/qt-conf.html
* **Test your installation**
@@ -53,8 +89,11 @@ Installation
# Prints the Qt version used to compile PySide6
print(PySide6.QtCore.__version__)
-Create a Simple Application
----------------------------
+.. note:: For more information about what's included in the ``pyside6``
+ package, check :ref:`package_details`.
+
+Create a Simple Qt Widgets Application
+--------------------------------------
Your |project| setup is ready. You can explore it further by developing a simple application
that prints "Hello World" in several languages. The following instructions will
@@ -69,12 +108,12 @@ guide you through the development process:
from PySide6 import QtCore, QtWidgets, QtGui
The |pymodname| Python module provides access to the Qt APIs as its submodule.
- In this case, you are importing the :code:`QtCore`, :code:`QtWidgets`, and :code:`QtGui` submodules.
+ In this case, you are importing the :ref:`QtCore`, :ref:`QtWidgets`, and :ref:`QtGui` submodules.
* **Main Class**
- Define a class named :code:`MyWidget`, which extends QWidget and includes a QPushButton and
- QLabel.::
+ Define a class named :code:`MyWidget`, which extends :ref:`QWidget` and
+ includes a :ref:`QPushButton` and :ref:`QLabel`.::
class MyWidget(QtWidgets.QWidget):
def __init__(self):
@@ -96,8 +135,9 @@ guide you through the development process:
def magic(self):
self.text.setText(random.choice(self.hello))
- The MyWidget class has the :code:`magic` member function that randomly chooses an item from the
- :code:`hello` list. When you click the button, the :code:`magic` function is called.
+ The ``MyWidget`` class has the :code:`magic` member function that randomly
+ chooses an item from the :code:`hello` list. When you click the button, the
+ :code:`magic` function is called.
* **Application execution**
@@ -118,3 +158,130 @@ guide you through the development process:
.. image:: images/screenshot_hello.png
:alt: Hello World application
+
+Create a Simple Quick Application
+---------------------------------
+
+To do the same using Qt Quick:
+
+* **Imports**
+
+ Create a new file named :code:`hello_world_quick.py`, and add the following imports to it.::
+
+ import sys
+ from PySide6.QtGui import QGuiApplication
+ from PySide6.QtQml import QQmlApplicationEngine
+
+* **Declarative UI**
+
+ The UI can be described in the QML language (assigned to a Python variable)::
+
+ QML = """
+ import QtQuick
+ import QtQuick.Controls
+ import QtQuick.Layouts
+
+ Window {
+ width: 300
+ height: 200
+ visible: true
+ title: "Hello World"
+
+ readonly property list<string> texts: ["Hallo Welt", "Hei maailma",
+ "Hola Mundo", "Привет мир"]
+
+ function setText() {
+ var i = Math.round(Math.random() * 3)
+ text.text = texts[i]
+ }
+
+ ColumnLayout {
+ anchors.fill: parent
+
+ Text {
+ id: text
+ text: "Hello World"
+ Layout.alignment: Qt.AlignHCenter
+ }
+ Button {
+ text: "Click me"
+ Layout.alignment: Qt.AlignHCenter
+ onClicked: setText()
+ }
+ }
+ }
+ """
+
+ .. note:: Keep in mind ideally this content should go into
+ a ``qml`` file, but for simplicity, we are using a string variable.
+
+* **Application execution**
+
+ Now, add a main function where you instantiate a :ref:`QQmlApplicationEngine` and
+ load the QML::
+
+ if __name__ == "__main__":
+ app = QGuiApplication(sys.argv)
+ engine = QQmlApplicationEngine()
+ engine.loadData(QML.encode('utf-8'))
+ if not engine.rootObjects():
+ sys.exit(-1)
+ exit_code = app.exec()
+ del engine
+ sys.exit(exit_code)
+
+
+ .. note:: This is a simplified example. Normally, the QML code should be in a separate
+ :code:`.qml` file, which can be edited by design tools.
+
+.. _faq-section:
+
+Frequently Asked Questions
+--------------------------
+
+Here you can find a couple of common questions and situations that will
+clarify questions before you start programming.
+
+.. grid:: 1 3 3 3
+ :gutter: 2
+
+ .. grid-item-card:: What is Qt
+ :link: faq/whatisqt.html
+
+ Qt, QML, Widgets... What is the difference?
+
+ .. grid-item-card:: Compatible IDEs
+ :link: faq/whichide.html
+
+ Which IDEs are compatible with PySide?
+
+ .. grid-item-card:: Binding Generation
+ :link: faq/whatisshiboken.html
+
+ What is Shiboken?
+
+ .. grid-item-card:: File types
+ :link: faq/typesoffiles.html
+
+ File Types in PySide
+
+ .. grid-item-card:: App distribution
+ :link: faq/distribution.html
+
+ Distributing your application to other systems and platforms
+
+ .. grid-item-card:: Why Qt for Python?
+ :link: faq/whyqtforpython.html
+
+ As a Qt/C++ developer, why should I consider Qt for Python?
+
+.. toctree::
+ :hidden:
+
+ faq/whatisqt.rst
+ faq/whichide.rst
+ faq/whatisshiboken.rst
+ faq/typesoffiles.rst
+ faq/distribution.rst
+ faq/whyqtforpython.rst
+
diff --git a/sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_0.cpp.py b/sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_0.cpp.py
new file mode 100644
index 000000000..d21595041
--- /dev/null
+++ b/sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_0.cpp.py
@@ -0,0 +1,4 @@
+i, ok = QInputDialog.getInt(self, "QInputDialog::getInt()",
+ "Percentage:", 25, 0, 100, 1)
+if ok:
+ integerLabel.setText(f"{i}")
diff --git a/sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_1.cpp.py b/sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_1.cpp.py
new file mode 100644
index 000000000..4cb3dfdb3
--- /dev/null
+++ b/sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_1.cpp.py
@@ -0,0 +1,5 @@
+d, ok = QInputDialog.getDouble(self, "QInputDialog::getDouble()",
+ "Amount:", 37.56, -10000, 10000, 2,
+ Qt.WindowFlags(), 1)
+if ok:
+ doubleLabel.setText(f"${d}")
diff --git a/sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_2.cpp.py b/sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_2.cpp.py
new file mode 100644
index 000000000..7e3d27afb
--- /dev/null
+++ b/sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_2.cpp.py
@@ -0,0 +1,5 @@
+items = ["Spring", "Summer", "Fall", "Winter"]
+item, ok = QInputDialog.getItem(self, "QInputDialog::getItem()",
+ "Season:", items, 0, False)
+if ok and item:
+ itemLabel.setText(item)
diff --git a/sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_3.cpp.py b/sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_3.cpp.py
new file mode 100644
index 000000000..85a22a16c
--- /dev/null
+++ b/sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_3.cpp.py
@@ -0,0 +1,5 @@
+text, ok = QInputDialog.getText(self, "QInputDialog.getText()",
+ "User name:", QLineEdit.Normal,
+ QDir.home().dirName())
+if ok and text:
+ textLabel.setText(text)
diff --git a/sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_4.cpp.py b/sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_4.cpp.py
new file mode 100644
index 000000000..d16045141
--- /dev/null
+++ b/sources/pyside6/doc/snippets/qtbase/examples/widgets/dialogs/standarddialogs/dialog_4.cpp.py
@@ -0,0 +1,4 @@
+text, ok = QInputDialog.getMultiLineText(self, "QInputDialog.getMultiLineText()", ""
+ "Address:", "John Doe\nFreedom Street")
+if ok and text:
+ multiLineTextLabel.setText(text)
diff --git a/sources/pyside6/doc/snippets/qtbase/examples/widgets/itemviews/spinboxdelegate/delegate_0.h.py b/sources/pyside6/doc/snippets/qtbase/examples/widgets/itemviews/spinboxdelegate/delegate_0.h.py
new file mode 100644
index 000000000..de386a5ac
--- /dev/null
+++ b/sources/pyside6/doc/snippets/qtbase/examples/widgets/itemviews/spinboxdelegate/delegate_0.h.py
@@ -0,0 +1,18 @@
+class SpinBoxDelegate(QStyledItemDelegate):
+ """A delegate that allows the user to change integer values from the model
+ using a spin box widget. """
+
+ def __init__(self, parent=None):
+ ...
+
+ def createEditor(self, parent, option, index):
+ ...
+
+ def setEditorData(self, editor, index):
+ ...
+
+ def setModelData(self, editor, model, index):
+ ...
+
+ def updateEditorGeometry(self, editor, option, index):
+ ...
diff --git a/sources/pyside6/doc/snippets/qtbase/examples/widgets/tutorials/modelview/1_readonly/mymodel_Quoting_ModelView_Tutorial.h.py b/sources/pyside6/doc/snippets/qtbase/examples/widgets/tutorials/modelview/1_readonly/mymodel_Quoting_ModelView_Tutorial.h.py
new file mode 100644
index 000000000..231792c5d
--- /dev/null
+++ b/sources/pyside6/doc/snippets/qtbase/examples/widgets/tutorials/modelview/1_readonly/mymodel_Quoting_ModelView_Tutorial.h.py
@@ -0,0 +1,15 @@
+from PySide6.QtCore import QAbstractTableModel
+
+class MyModel(QAbstractTableModel):
+
+ def __init__(self, parent = None):
+ ...
+
+ def rowCount(self, parent = None):
+ ...
+
+ def columnCount(self, parent = None):
+ ...
+
+ def data(self, index, role = Qt.DisplayRole):
+ ...
diff --git a/sources/pyside6/doc/snippets/qtbase/examples/widgets/tutorials/modelview/5_edit/mymodel_Quoting_ModelView_Tutorial.h.py b/sources/pyside6/doc/snippets/qtbase/examples/widgets/tutorials/modelview/5_edit/mymodel_Quoting_ModelView_Tutorial.h.py
new file mode 100644
index 000000000..4da28f0a0
--- /dev/null
+++ b/sources/pyside6/doc/snippets/qtbase/examples/widgets/tutorials/modelview/5_edit/mymodel_Quoting_ModelView_Tutorial.h.py
@@ -0,0 +1,27 @@
+from PySide6.QtCore import QAbstractTableModel
+
+COLS = 3
+ROWS = 2
+
+
+class MyModel(QAbstractTableModel):
+
+ editCompleted = Signal(str)
+
+ def __init__(self, parent=None):
+ ...
+
+ def rowCount(self, parent=None):
+ ...
+
+ def columnCount(self, parent=None):
+ ...
+
+ def data(self, index, role=Qt.DisplayRole):
+ ...
+
+ def setData(self, index, value, role):
+ ...
+
+ def flags(self, index):
+ ...
diff --git a/sources/pyside6/doc/snippets/qtbase/src/gui/doc/snippets/code/src_gui_painting_qpainter_drawText.cpp.py b/sources/pyside6/doc/snippets/qtbase/src/gui/doc/snippets/code/src_gui_painting_qpainter_drawText.cpp.py
new file mode 100644
index 000000000..cad2c5395
--- /dev/null
+++ b/sources/pyside6/doc/snippets/qtbase/src/gui/doc/snippets/code/src_gui_painting_qpainter_drawText.cpp.py
@@ -0,0 +1,13 @@
+painter = QPainter(self)
+font = painter.font()
+font.setPixelSize(48)
+painter.setFont(font)
+rectangle = QRect(0, 0, 100, 50)
+boundingRect = painter.drawText(rectangle, 0, "Hello")
+pen = painter.pen()
+pen.setStyle(Qt.DotLine)
+painter.setPen(pen)
+painter.drawRect(boundingRect.adjusted(0, 0, -pen.width(), -pen.width()))
+pen.setStyle(Qt.DashLine)
+painter.setPen(pen)
+painter.drawRect(rectangle.adjusted(0, 0, -pen.width(), -pen.width()))
diff --git a/sources/pyside6/doc/snippets/qtbase/src/widgets/doc/snippets/stringlistmodel/model_0.h.py b/sources/pyside6/doc/snippets/qtbase/src/widgets/doc/snippets/stringlistmodel/model_0.h.py
new file mode 100644
index 000000000..02a02aaf8
--- /dev/null
+++ b/sources/pyside6/doc/snippets/qtbase/src/widgets/doc/snippets/stringlistmodel/model_0.h.py
@@ -0,0 +1,24 @@
+class StringListModel(QAbstractListModel):
+ def __init__(self, strings, parent=None):
+ ...
+
+ def rowCount(self, parent=QModelIndex()):
+ ...
+
+ def data(self, index, role):
+ ...
+
+ def headerData(self, section, orientation, role=Qt.DisplayRole):
+ ...
+
+ def flags(self, index):
+ ...
+
+ def setData(self, index, value, role=Qt.EditRole):
+ ...
+
+ def insertRows(self, position, rows, parent):
+ ...
+
+ def removeRows(self, position, rows, parent):
+ ...
diff --git a/sources/pyside6/doc/tools/index.rst b/sources/pyside6/doc/tools/index.rst
new file mode 100644
index 000000000..b421a428f
--- /dev/null
+++ b/sources/pyside6/doc/tools/index.rst
@@ -0,0 +1,211 @@
+.. _package_tools:
+
+Tools
+=====
+
+Following the same idea from the modules, we also include in the packages
+(wheels) Qt tools that are important for any Qt application development
+workflow, like ``uic``, ``rcc``, etc.
+
+All the tools **must** be used from the PySide wrappers, and not directly.
+For example, if exploring the ``site-packages/`` directory on your installation
+you find ``uic.exe`` (on Windows), you should not click on that, and use
+``pyside6-uic.exe`` instead.
+The reason for this is the proper setup of PATHs, plugins, and more,
+to properly work with the installed Python package.
+
+Here you can find all the tools we include in |project| starting
+from 6.3.0, grouped by different topics:
+
+Project development
+~~~~~~~~~~~~~~~~~~~
+
+.. grid:: 2
+ :gutter: 3 3 4 5
+
+ .. grid-item-card:: ``pyside6-project``
+ :link: pyside6-project
+ :link-type: ref
+
+ to build *Qt Widgets Designer* forms (``.ui`` files),
+ resource files (``.qrc``) and QML type files (``.qmltype``)
+ from a ``.pyproject`` file.
+
+Widget Development
+~~~~~~~~~~~~~~~~~~
+
+.. grid:: 2
+ :gutter: 3 3 4 5
+
+ .. grid-item-card:: ``pyside6-designer``
+ :link: pyside6-designer
+ :link-type: ref
+
+ drag-and-drop tool for designing Widget UIs (generates ``.ui`` files,
+ see :ref:`using_ui_files`).
+
+ .. grid-item-card:: ``pyside6-uic``
+ :link: pyside6-uic
+ :link-type: ref
+
+ to generate Python code from ``.ui`` form files.
+
+ .. grid-item-card:: ``pyside6-rcc``
+ :link: pyside6-rcc
+ :link-type: ref
+
+ to generate serialized data from ``.qrc`` resources files.
+ Keep in mind these files can be used in other non-widget projects.
+
+
+QML Development
+~~~~~~~~~~~~~~~
+
+.. grid:: 2
+ :gutter: 3 3 4 5
+
+ .. grid-item-card:: ``pyside6-qmllint``
+ :link: pyside6-qmllint
+ :link-type: ref
+
+ that verifies the syntactic validity of QML files.
+
+ .. grid-item-card:: ``pyside6-qmltyperegistrar``
+ :link: pyside6-qmltyperegistrar
+ :link-type: ref
+
+ to read metatypes files and generate files that contain the necessary
+ code to register all the types marked with relevant macros.
+
+ .. grid-item-card:: ``pyside6-qmlimportscanner``
+ :link: pyside6-qmlimportscanner
+ :link-type: ref
+
+ to identify the QML modules imported from a
+ project/QML files and dump the result as a JSON array.
+
+ .. grid-item-card:: ``pyside6-qmlcachegen``
+ :link: pyside6-qmlcachegen
+ :link-type: ref
+
+ to compile QML to bytecode at compile time for bundling inside the
+ binary.
+
+ .. grid-item-card:: ``pyside6-qml``
+ :link: pyside6-qml
+ :link-type: ref
+
+ to enable quick prototyping with QML files. This tool mimics some of
+ the capabilities of Qt's ``QML`` runtime utility by
+ directly invoking QQmlEngine/QQuickView.
+
+Translations
+~~~~~~~~~~~~
+
+.. grid:: 2
+ :gutter: 3 3 4 5
+
+ .. grid-item-card:: ``pyside6-linguist``
+ :link: pyside6-linguist
+ :link-type: ref
+
+ for translating text in applications.
+
+ .. grid-item-card:: ``pyside6-lrelease``
+ :link: pyside6-lrelease
+ :link-type: ref
+
+ to create run-time translation files for the application.
+
+ .. grid-item-card:: ``pyside6-lupdate``
+ :link: pyside6-lupdate
+ :link-type: ref
+
+ to synchronize source code and translations.
+
+Qt Help
+~~~~~~~
+
+.. grid:: 2
+ :gutter: 3 3 4 5
+
+ .. grid-item-card:: ``pyside6-assistant``
+ :link: pyside6-assistant
+ :link-type: ref
+
+ for viewing online documentation in Qt Help file format.
+ Read more about the formats on the `QtHelp Framework`_ page.
+
+.. _`QtHelp Framework`: https://doc.qt.io/qt-6/qthelp-framework.html
+
+PySide Utilities
+~~~~~~~~~~~~~~~~
+
+.. grid:: 2
+ :gutter: 3 3 4 5
+
+ .. grid-item-card:: ``pyside6-genpyi``
+ :link: pyside6-genpyi
+ :link-type: ref
+
+ to generate Python stubs (``.pyi`` files) for Qt modules.
+
+ .. grid-item-card:: ``pyside6-metaobjectdump``
+ :link: pyside6-metaobjectdump
+ :link-type: ref
+
+ a tool to print out the metatype information in JSON to be used as
+ input for ``qmltyperegistrar``.
+
+Deployment
+~~~~~~~~~~
+
+.. grid:: 2
+ :gutter: 3 3 4 5
+
+ .. grid-item-card:: ``pyside6-deploy``
+ :link: pyside6-deploy
+ :link-type: ref
+
+ to deploy PySide6 applications to desktop platforms - Linux, Windows
+ and macOS.
+
+ .. grid-item-card:: ``pyside6-android-deploy``
+ :link: pyside6-android-deploy
+ :link-type: ref
+
+ to deploy PySide6 application as an Android app targeting different
+ Android platforms - aarch64, armv7a, i686, x86_64.
+
+Shader Tools
+~~~~~~~~~~~~
+
+.. grid:: 2
+ :gutter: 3 3 4 5
+
+ .. grid-item-card:: ``pyside6-qsb``
+ :link: pyside6-qsb
+ :link-type: ref
+
+ a command-line tool provided by the Qt Shader Tools modules to
+ generate and inspect .qsb files.
+
+Qt Quick 3D
+~~~~~~~~~~~
+
+.. grid:: 2
+ :gutter: 3 3 4 5
+
+ .. grid-item-card:: ``pyside6-balsam``
+ :link: pyside6-balsam
+ :link-type: ref
+
+ a command line tool that takes assets created in digital content
+ creation tools like Maya, 3ds Max or Blender and converts them into an
+ efficient runtime format for use with Qt Quick 3D.
+
+ .. grid-item-card:: ``pyside6-balsamui``
+ :link: pyside6-balsamui
+ :link-type: ref
+
+ a graphical user interface for the ``pyside6-balsam`` tool.
diff --git a/sources/pyside6/doc/tools/pyside-assistant.rst b/sources/pyside6/doc/tools/pyside-assistant.rst
new file mode 100644
index 000000000..c9b3470c3
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside-assistant.rst
@@ -0,0 +1,21 @@
+.. _pyside6-assistant:
+
+pyside6-assistant
+=================
+
+``pyside6-assistant`` is a tool that wraps `Qt Assistant`_, the help
+viewer of Qt for use with the Qt help file format (see `The Qt Help Framework`_).
+
+The version of assistant shipped with Qt for Python does not contain
+any documentation.
+
+You can build the Qt for Python documentation in the Qt help file format
+(see :ref:`building_documentation`) and register it for use in `Preferences`
+dialog of ``pyside6-assistant`` (`Edit/Preferences`).
+
+.. image:: pyside6-assistant_screenshot.webp
+ :width: 381
+ :alt: PySide6 Assistant Screenshot
+
+.. _`Qt Assistant`: https://doc.qt.io/qt-6/qtassistant-index.html
+.. _`The Qt Help Framework`: https://doc.qt.io/qt-6/qthelp-framework.html
diff --git a/sources/pyside6/doc/tools/pyside-designer.rst b/sources/pyside6/doc/tools/pyside-designer.rst
new file mode 100644
index 000000000..4cde6b2bf
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside-designer.rst
@@ -0,0 +1,91 @@
+.. _pyside6-designer:
+
+pyside6-designer
+================
+
+``pyside6-designer`` is a tool that wraps the `Qt Widgets Designer`_,
+to enable you to design Qt Widgets applications with a *drag-and-drop*
+approach.
+
+.. image:: pyside6-designer_screenshot.webp
+ :width: 100%
+ :alt: PySide6 Designer Screenshot
+
+Usage
+-----
+
+With ``pyside6-designer`` you can design your application in a simple way,
+to later save the end result in a ``.ui`` file. When you start the tool, you
+will see a dialog to select the base window: a QWidget, a QMainWindow, etc.
+
+.. image:: pyside6-designer_base_screenshot.webp
+ :width: 50%
+ :alt: PySide6 Designer Initial Screenshot
+
+Once you select one of those options, you can start placing widgets
+into the interface, and have access to the whole structure, properties,
+and more.
+
+.. image:: pyside6-designer_sections_screenshot.webp
+ :width: 100%
+ :alt: PySide6 Designer Initial Screenshot
+
+A simple distinction of the areas you might use is described in the
+previous screenshot. In the section **1** you will find all the elements
+you can use in your application, which is the area **2**.
+The application designs follows a hierarchical configuration,
+in **3** you can see the structure of the example which contains
+only a ``QMainWindow`` and a ``QPushButton``. Lastly
+you can access and modify the properties of the item in **4**,
+where you could adjust dimensions, names, etc.
+
+
+When your application is finished, you will save your design in a ``.ui``
+file. This ``.ui`` file can later be converted into a Python file,
+with the help of the :ref:`pyside6-uic` tool. You can find
+more details of this process in: :ref:`using_ui_files`.
+
+If you are interested in more functionality of the tool, you can check
+the official `Qt Widgets Designer Manual`_.
+
+
+Custom Widgets
+--------------
+
+One of the features that the `Qt Widgets Designer`_ provides is the possibility
+of loading custom widgets, in order to facilitate the development with ad-hoc
+widgets.
+
+On the following screenshot, you can see a new component on the left column
+that is already added on the main widget, a tic-tac-toe custom widget.
+
+.. image:: pyside6-designer_customwidgets_screenshot.webp
+ :width: 100%
+ :alt: PySide6 Designer Custom Widgets Screenshot
+
+To achieve this, you need to register a custom widget by setting the environment
+variable ``PYSIDE_DESIGNER_PLUGINS`` to the directory where your register file
+is located. The registration file for the tic-tac-toe widget looks like this:
+
+.. code-block:: Python
+
+ from tictactoe import TicTacToe
+ from tictactoeplugin import TicTacToePlugin
+
+ from PySide6.QtDesigner import QPyDesignerCustomWidgetCollection
+
+
+ if __name__ == '__main__':
+ QPyDesignerCustomWidgetCollection.addCustomWidget(TicTacToePlugin())
+
+As you can see in the previous code, ``TicTacToe`` is the custom widget,
+imported from a different file, and the ``TicTacToePlugin`` is the interface
+layer for `Qt Widgets Designer`_ to recognize it.
+We provide a helper class, ``QPyDesignerCustomWidgetCollection``, to
+simplify the registration process.
+
+If you are interested in all the details of this specific case, you can
+check the :ref:`task-menu-extension-example`.
+
+.. _`Qt Widgets Designer`: https://doc.qt.io/qt-6/qtdesigner-manual.html
+.. _`Qt Widgets Designer Manual`: https://doc.qt.io/qt-6/qtdesigner-manual.html
diff --git a/sources/pyside6/doc/tools/pyside-genpyi.rst b/sources/pyside6/doc/tools/pyside-genpyi.rst
new file mode 100644
index 000000000..0240c5005
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside-genpyi.rst
@@ -0,0 +1,52 @@
+.. _pyside6-genpyi:
+
+pyside6-genpyi
+==============
+
+`pyside6-genpyi` is a command line tool to generate Python stub files
+(.pyi) for PySide modules. Stub files define signatures of all classes,
+methods (including overloads), constants and enums of the PySide
+modules. Signatures also contain type hints. This helps PySide integrate
+with Python type checkers and IDEs. For example, if you use any function
+from the Qt API with PySide, your IDE's function lookup feature will
+show you the function signature and its parameters and return value
+including types.
+
+PySide6 already ships with stub files that were generated with
+`pyside6-genpyi`. However, if you want to generate new stub files for
+several (or all) modules, for example to toggle a few features, you can
+run `pyside6-genpyi` manually. If you want to generate stub files for
+your own custom module, refer to :ref:`shiboken6-genpyi`.
+
+
+Usage
+-----
+
+To generate stub files for a PySide module, run the following command:
+
+.. code-block:: bash
+
+ pyside6-genpyi <module_names> [OPTIONS]
+
+where `<module_names>` is a space-separated list of module names (the
+modules must be importable from the working directory) and where
+`[OPTIONS]` can be one of the following:
+
+* **--quiet**: Run the tool quietly without output to stdout.
+* **--outpath <output_dir>**: Specify the output directory for the
+ generated stub files. If not specified, the stub files are generated
+ in the location of the module binary.
+* **--sys-path <paths>**: Prepend the system path (`sys.path`) with a
+ space-separated list of strings `<paths>`. This is useful if the
+ module is not installed in a default lookup location.
+* **--feature <features>**: A space-separate list of optional PySide
+ features to enable (see :ref:`pysideapi2`). This option has no effect
+ when using PyPy. Currently, the following features are available:
+
+ * **snake_case**: All methods in the module are switched from
+ ``camelCase`` to ``snake_case``. A single upper case letter is
+ replaced by an underscore and the lower case letter.
+ * **true_property**: All getter and setter functions in the module
+ which are marked as a property in the Qt6 docs are replaced by Python
+ property objects. Properties are also listed as such in the according
+ QMetaObject of a class.
diff --git a/sources/pyside6/doc/tools/pyside-linguist.rst b/sources/pyside6/doc/tools/pyside-linguist.rst
new file mode 100644
index 000000000..e13124a8e
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside-linguist.rst
@@ -0,0 +1,20 @@
+.. _pyside6-linguist:
+
+pyside6-linguist
+=================
+
+``pyside6-linguist`` is a tool that wraps `Qt Linguist`_, Qt's tool to
+translate user interfaces and manage application localizations. It
+supports Qt's own TS file format as well as the XML Localization
+Interchange File Format (XLIFF). There are no differences between the
+version bundled with PySide and the one from Qt.
+
+For more information on how to use this tool, read Qt's documentation
+here: `Qt Linguist`_. Read more about how to translate PySide
+applications here: :ref:`translations`.
+
+.. image:: pyside6-linguist_screenshot.webp
+ :width: 500
+ :alt: PySide6 Linguist Screenshot
+
+.. _`Qt Linguist`: https://doc.qt.io/qt-6/qtlinguist-index.html
diff --git a/sources/pyside6/doc/tools/pyside-lrelease.rst b/sources/pyside6/doc/tools/pyside-lrelease.rst
new file mode 100644
index 000000000..7c628f2aa
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside-lrelease.rst
@@ -0,0 +1,25 @@
+.. _pyside6-lrelease:
+
+pyside6-lrelease
+================
+
+.. note:: This tool is automatically called by :ref:`pyside6-project`
+ so you don't need to call it manually. *Qt Creator* will take care
+ of this step as well while executing a project.
+
+``pyside6-lrelease`` is a command line tool wrapping `lrelease`_. It produces
+``.qm`` files out of ``.ts`` files. The ``.qm`` file format is a compact binary
+format that the localized application uses. It provides extremely fast lookup
+for translations (see :ref:`translations`).
+
+Usage
+-----
+
+To convert a ``.ts`` file of the :ref:`qt-linguist-example`
+into its binary representation, run:
+
+.. code-block:: bash
+
+ pyside6-lrelease example_de.ts -qm example_de.qm
+
+.. _`lrelease`: https://doc.qt.io/qt-6/linguist-lrelease.html
diff --git a/sources/pyside6/doc/tools/pyside-lupdate.rst b/sources/pyside6/doc/tools/pyside-lupdate.rst
new file mode 100644
index 000000000..1c0d73c15
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside-lupdate.rst
@@ -0,0 +1,23 @@
+.. _pyside6-lupdate:
+
+pyside6-lupdate
+===============
+
+.. note:: This tool is automatically called by :ref:`pyside6-project`
+ so you don't need to call it manually.
+
+``pyside6-lupdate`` is a command line tool wrapping `lupdate`_. It finds
+translatable strings in Python, ``.ui``, and ``.qml`` files and generates or
+updates ``.ts`` files (see :ref:`translations`).
+
+Usage
+-----
+
+To create or update the ``.ts`` file of the :ref:`qt-linguist-example`,
+run:
+
+.. code-block:: bash
+
+ pyside6-lupdate main.py main.qml form.ui -ts example_de.ts
+
+.. _`lupdate`: https://doc.qt.io/qt-6/linguist-lupdate.html
diff --git a/sources/pyside6/doc/tools/pyside-metaobjectdump.rst b/sources/pyside6/doc/tools/pyside-metaobjectdump.rst
new file mode 100644
index 000000000..1522b7ad5
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside-metaobjectdump.rst
@@ -0,0 +1,92 @@
+.. _pyside6-metaobjectdump:
+
+pyside6-metaobjectdump
+======================
+
+``pyside6-metaobjectdump`` is a command line tool. It scans Python source
+files and dumps out information on classes to be registered with QML in
+JSON-format. This serves as input for the :ref:`pyside6-qmltyperegistrar` tool.
+
+The tool is the equivalent of the `moc`_ tool in Qt / C++.
+
+It is automatically run by the :ref:`pyside6-project` tool
+when passing the ``qmllint`` argument instructing it to check
+the QML source files.
+
+Usage
+-----
+
+Classes to be registered with QML are indicated by QML decorators
+like :deco:`QmlElement`. Invoking:
+
+.. code-block:: bash
+
+ pyside6-metaobjectdump birthdayparty.py
+
+produces the JSON data on stdout:
+
+.. code-block:: json
+
+ [
+ {
+ "classes": [
+ {
+ "className": "BirthdayParty",
+ "qualifiedClassName": "BirthdayParty",
+ "object": true,
+ "superClasses": [
+ {
+ "access": "public",
+ "name": "QObject"
+ }
+ ],
+ "classInfos": [
+ {
+ "name": "QML.Element",
+ "value": "auto"
+ }
+ ],
+ "properties": [
+ {
+ "name": "host",
+ "type": "Person",
+ "index": 0,
+ "read": "host",
+ "notify": "host_changed",
+ "write": "host"
+ },
+ {
+ "name": "guests",
+ "type": "QQmlListProperty<Person>",
+ "index": 1
+ }
+ ],
+ "signals": [
+ {
+ "access": "public",
+ "name": "host_changed",
+ "arguments": [],
+ "returnType": "void"
+ },
+ {
+ "access": "public",
+ "name": "guests_changed",
+ "arguments": [],
+ "returnType": "void"
+ }
+ ]
+ }
+ ],
+ "outputRevision": 68,
+ "QML_IMPORT_NAME": "People",
+ "QML_IMPORT_MAJOR_VERSION": 1,
+ "QML_IMPORT_MINOR_VERSION": 0,
+ "QT_MODULES": [
+ "QtCore",
+ "QtQml"
+ ],
+ "inputFile": ".../examples/qml/tutorials/extending-qml-advanced/advanced1-Base-project/birthdayparty.py"
+ }
+ ]
+
+.. _`moc`: https://doc.qt.io/qt-6/moc.html
diff --git a/sources/pyside6/doc/tools/pyside-project.rst b/sources/pyside6/doc/tools/pyside-project.rst
new file mode 100644
index 000000000..0359e1b7d
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside-project.rst
@@ -0,0 +1,64 @@
+.. _pyside6-project:
+
+pyside6-project
+===============
+
+`pyside6-project` is a command line tool for creating, building and deploying
+|project| applications. It operates on a project file which is also used by
+`Qt Creator`_.
+
+Project file format
+-------------------
+
+The project file format is a simple `JSON`_-based format with the suffix
+``.pyproject`` listing all files of the project excluding generated files
+(typically ``.py``, ``.qml``, ``.qrc``, ``.ts``, or ``.ui`` files):
+
+.. code-block:: json
+
+ {
+ "files": ["main.py"]
+ }
+
+
+Usage
+-----
+
+The tool has several subcommands. New projects can be created using
+the below commands, passing the project name (directory):
+
+*new-ui*
+ Creates a new QtWidgets project with a *Qt Widgets Designer*-based main
+ window.
+
+*new-widget*
+ Creates a new QtWidgets project with a main window.
+
+*new-quick*
+ Creates a new QtQuick project.
+
+The other commands take the project file as an argument.
+It is also possible to specify a directory containing the project file.
+
+*build*
+ Builds the project, generating the required build artifacts
+ (see :ref:`using_ui_files`, :ref:`using_qrc_files`).
+
+*run*
+ Builds the project and runs the main.
+
+*deploy*
+ Deploys the application (see see :ref:`pyside6-deploy`).
+
+*lupdate*
+ Updates translation (.ts) files (see :ref:`translations`).
+
+*clean*
+ Cleans the build artifacts.
+
+*qmllint*
+ Runs the ``qmllint`` tool, checking the QML files.
+
+
+.. _`Qt Creator`: https://www.qt.io/product/development-tools
+.. _`JSON`: https://www.json.org/
diff --git a/sources/pyside6/doc/tools/pyside-qml.rst b/sources/pyside6/doc/tools/pyside-qml.rst
new file mode 100644
index 000000000..0502dd94a
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside-qml.rst
@@ -0,0 +1,84 @@
+.. _pyside6-qml:
+
+pyside6-qml
+===========
+
+``pyside6-qml`` mimics some capabilities of Qt's `qml <qml_runtime>`_ runtime utility by directly
+invoking QQmlEngine/QQuickView. It enables prototyping with QML/QtQuick without the need to write
+any Python code that loads the QML files either through `QQmlApplicationEngine <qqmlappengine>`_ or
+the `QQuickView <qquickview>`_ class. The tool also detects the QML classes implemented in Python
+and registers them with the QML type system.
+
+Usage
+-----
+
+Consider the example `Extending QML - Plugins Example <extending_qml_example>`_. This example does
+not have a Python file with a ``main`` function that initializes a QmlEngine to load the QML file
+``app.qml``. You can run the example by running
+
+.. code-block:: bash
+
+ pyside6-qml examples/qml/tutorials/extending-qml/chapter6-plugins/app.qml -I examples/qml/tutorials/extending-qml/chapter6-plugins/Charts
+
+The ``-I`` flag is used to point ``pyside6-qml`` to the folder containing Python files that
+implement QML classes.
+
+Command Line Options
+--------------------
+
+Here are all the command line options of ``pyside6-qml``:
+
+Arguments
+^^^^^^^^^
+
+* **file**: This option refers to the QML file to be loaded by ``pyside6-qml``. This option does not
+ have a name or a flag. Therefore, this option should be the first option supplied to
+ ``pyside6-qml``. For example,
+
+.. code-block:: bash
+
+ pyside6-qml /path/to/test.qml
+
+Options
+^^^^^^^
+
+* **--module-paths/-I**: Specify space-separated folder/file paths which point to the Python files
+ that implement QML classes. By default, the parent directory of the QML file supplied to
+ ``pyside6-qml`` is searched recursively for all Python files and they are imported. Otherwise,
+ only the paths given in module paths are searched.
+
+* **--verbose/-v**: Run ``pyside6-qml`` in verbose mode. When run in this mode, pyside6-qml prints
+ log messages during various stages of processing.
+
+Options that align with `QML <qml_runtime>`_ runtime utility
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+* **--app-typ/-a**: Specifies which application class to use. It takes one of the three values -
+ ``core, gui, widget``. The default value is *gui*.
+
+* **--config/-c**: Load the given built-in configuration. It takes one of two values - ``default,
+ resizeToItem``. This option is only relevant for a QtQuick application. If ``default`` is used,
+ the view resizes to the size of the root item in the QML. If ``resizeToItem`` is used, the view
+ automatically resizes the root item to the size of the view.
+
+* **--list-conf**: List the built-in configurations. ``pyside6-qml`` has two built-in configurations
+ - ``default`` and ``resizeToItem``. See the option ``--config`` for more information.
+
+* **--rhi/-r**: Specifies the backend for the Qt graphics abstraction (RHI). It takes one of the
+ four values - ``vulkan, metal, d3dll, gl``.
+
+* **--verbose/-v**: List the built-in configurations. ``pyside6-qml`` has two built-in
+ configurations - *default* and *resizeToItem*. See the option ``--config`` for more information.
+
+* **--gles**: Force use of GLES (AA_UseOpenGLES).
+
+* **--desktop**: Force use of desktop OpenGL (AA_UseDesktopOpenGL).
+
+* **--software**: Force use of software rendering(AA_UseSoftwareOpenGL).
+
+* **--disable-context-sharing**: Disable the use of a shared GL context for QtQuick Windows".
+
+.. _`qml_runtime`: https://doc.qt.io/qt-6/qtquick-qml-runtime.html
+.. _`qqmlappengine`: https://doc.qt.io/qt-6/qqmlapplicationengine.html
+.. _`qquickview`: https://doc.qt.io/qt-6/qquickview.html
+.. _`extending_qml_example`: https://doc.qt.io/qtforpython-6/examples/example_qml_tutorials_extending-qml_chapter6-plugins.html
diff --git a/sources/pyside6/doc/tools/pyside-qmlcachegen.rst b/sources/pyside6/doc/tools/pyside-qmlcachegen.rst
new file mode 100644
index 000000000..ecd8e6afd
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside-qmlcachegen.rst
@@ -0,0 +1,25 @@
+.. _pyside6-qmlcachegen:
+
+pyside6-qmlcachegen
+===================
+
+``pyside6-qmlcachegen`` is a command line tool that wraps `qmlcachegen`_.
+This tool creates C++ code or `QML byte code` for ``.qml`` files. For
+Qt for Python, only `QML byte code` is relevant. The file suffix is
+``.qmlc`` and it works similar to compiled Python bytecode
+(``.pyc`` files).
+
+Usage
+-----
+
+The command line option ``--only-bytecode`` should be used to
+create `QML byte code`. For example:
+
+.. code-block:: bash
+
+ qmlcachegen --only-bytecode gallery.qml
+
+produces a file ``gallery.qmlc`` containing `QML byte code` which is
+automatically loaded by the QML engine.
+
+.. _`qmlcachegen`: https://doc.qt.io/qt-6/qtqml-tool-qmlcachegen.html
diff --git a/sources/pyside6/doc/tools/pyside-qmllint.rst b/sources/pyside6/doc/tools/pyside-qmllint.rst
new file mode 100644
index 000000000..54a72470e
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside-qmllint.rst
@@ -0,0 +1,49 @@
+.. _pyside6-qmllint:
+
+pyside6-qmllint
+===============
+
+``pyside6-qmllint`` is a command line tool that wraps `qmllint`_. This tool
+verifies the syntatic validity of QML files and warns about some QML
+anti-patterns.
+
+It is automatically run by the :ref:`pyside6-project` tool
+when passing the ``qmllint`` argument instructing it to check
+the QML source files.
+
+Usage
+-----
+
+The tool should normally not be invoked manually since it requires
+a number of import paths and additional type information
+generated by :ref:`pyside6-qmltyperegistrar` to function.
+
+For example, for a ``.qml`` file like:
+
+.. code-block:: javascript
+
+ import QtQuick
+ import QtQuick.Controls
+
+ Item {
+ Text {
+ id: name
+ text: qsTr("Hello World")
+ }
+ }
+
+when running:
+
+.. code-block:: bash
+
+ pyside6-qmllint Main.qml
+
+it would warn about unused imports:
+
+.. code-block::
+
+ Info: Main.qml:2:1: Unused import [unused-imports]
+ import QtQuick.Controls
+ ^^^^^^
+
+.. _`qmllint`: https://doc.qt.io/qt-6/qtquick-tool-qmllint.html
diff --git a/sources/pyside6/doc/tools/pyside-qmltyperegistrar.rst b/sources/pyside6/doc/tools/pyside-qmltyperegistrar.rst
new file mode 100644
index 000000000..0e8d66bd5
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside-qmltyperegistrar.rst
@@ -0,0 +1,17 @@
+.. _pyside6-qmltyperegistrar:
+
+pyside6-qmltyperegistrar
+========================
+
+``pyside6-qmltyperegistrar`` is a command line tool that wraps the
+``qmltyperegistrar`` tool of Qt.
+
+It takes the file produced by :ref:`pyside6-metaobjectdump`
+as input and generates C++ code to register C++ classes to QML
+and a ``.qmltypes`` file containing a JSON description of the
+classes. For Qt for Python, only the ``.qmltypes`` file
+is of interest as input for :ref:`pyside6-qmllint`.
+
+The tool is automatically run by the :ref:`pyside6-project` tool
+when passing the ``qmllint`` argument instructing it to check
+the QML source files.
diff --git a/sources/pyside6/doc/tools/pyside-rcc.rst b/sources/pyside6/doc/tools/pyside-rcc.rst
new file mode 100644
index 000000000..e5688485e
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside-rcc.rst
@@ -0,0 +1,55 @@
+.. _pyside6-rcc:
+
+pyside6-rcc
+===========
+
+.. note:: This tool is automatically called by :ref:`pyside6-project`
+ so you don't need to call it manually. *Qt Creator* will take care
+ of this step as well while executing a project.
+
+
+``pyside6-rcc`` is a command line tool for converting ``.qrc`` files into ``.py``
+files, so they can be used within your Python code.
+
+The tool is a wrapper around the `rcc`_ tool, which was originally
+designed to generate C++ code, but it also has Python support.
+
+Even though the equivalent of ``pyside6-rcc`` is running ``rcc -g python``
+we strongly recommend you to rely on ``pyside6-rcc`` in order to avoid
+mismatches between versions for the generated code.
+
+Usage
+-----
+
+Once you have gathered your resources on a qrc file,
+you can transform your ``.qrc`` file with the following command:
+
+.. code-block:: bash
+
+ pyside6-rcc your_file.qrc -o rc_your_file.py
+
+It is important to use the ``-o`` option to generate the Python file with the
+conversion, otherwise you will receive all the output as stdout in your terminal.
+
+To enable the usage of those resources in your program, you need to import
+the file:
+
+.. code-block:: Python
+
+ import rc_your_file
+
+then you can use a specific resource, for example an image, with the prefix ``:/``,
+for example:
+
+.. code-block:: Python
+
+ pixmap = QPixmap(":/icons/image.png")
+
+
+For additional options, you can use ``pyside6-rcc -h`` in order to get
+more information about additional options.
+
+Visit the tutorial :ref:`using_qrc_files` for a hands-on example.
+
+.. _`rcc`: https://doc.qt.io/qt-6/rcc.html
+
diff --git a/sources/pyside6/doc/tools/pyside-uic.rst b/sources/pyside6/doc/tools/pyside-uic.rst
new file mode 100644
index 000000000..ba4e36b4e
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside-uic.rst
@@ -0,0 +1,59 @@
+.. _pyside6-uic:
+
+pyside6-uic
+===========
+
+.. note:: This tool is automatically called by :ref:`pyside6-project`
+ so you don't need to call it manually. *Qt Creator* will take care
+ of this step as well while executing a project.
+
+``pyside6-uic`` is a command line tool for converting ``.ui`` files into ``.py``
+files, with the objective of using application designs as Python classes.
+
+The tool is a wrapper around the `uic`_ tool, which was originally
+designed to generate C++ code, but it also has Python support.
+
+Even though the equivalent of ``pyside6-uic`` is running ``uic -g python``
+we strongly recommend you to rely on ``pyside6-uic`` in order to avoid
+mismatches between versions for the generated code.
+
+Usage
+-----
+
+Once you have designed your application with :ref:`pyside6-designer`,
+you can transform your ``.ui`` file with the following command:
+
+.. code-block:: bash
+
+ pyside6-uic your_file.ui -o ui_your_file.py
+
+It is important to use the ``-o`` option to generate the Python file with the
+conversion, otherwise you will receive all the output as stdout in your terminal.
+
+The structure of the generated Python file will be similar in all cases,
+and you will get one class called ``Ui_TheNameOfYourDesign(object)`` that
+is in charge of positioning all the elements like your design.
+
+To use this Python file, you should follow our tutorial in
+:ref:`using_ui_files`, but in summary, it is mainly importing the class
+from the generated file and setting it up in your code:
+
+.. code-block:: Python
+
+ self.ui = Ui_TheNameOfYourDesign()
+ self.ui.setupUi(self)
+
+For additional options, you can use ``pyside-uic -h`` in order to get
+more information related to relative imports, absolute imports, using resources,
+translations, etc.
+
+.. note:: Remember that you need to have a class corresponding to the base
+ form you selected in :ref:`pyside6-designer`, a ``QWidget``, or ``QDialog``,
+ or ``QMainWindow``, etc, in order for ``setupUi`` to work. Check
+ :ref:`using_ui_files` for more information.
+
+.. warning:: Do not modify the content of the generated Python file from your
+ ``.ui`` file, otherwise everything will be lost when you re-generate it.
+
+.. _`uic`: https://doc.qt.io/qt-6/uic.html
+
diff --git a/sources/pyside6/doc/tools/pyside6-assistant_screenshot.webp b/sources/pyside6/doc/tools/pyside6-assistant_screenshot.webp
new file mode 100644
index 000000000..7d898d8e6
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside6-assistant_screenshot.webp
Binary files differ
diff --git a/sources/pyside6/doc/tools/pyside6-balsam.rst b/sources/pyside6/doc/tools/pyside6-balsam.rst
new file mode 100644
index 000000000..c6677f6a3
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside6-balsam.rst
@@ -0,0 +1,59 @@
+.. _pyside6-balsam:
+
+pyside6-balsam
+==============
+
+``pyside6-qsb`` is a tool that wraps the `balsam <Balsam Asset Import Tool>`_
+tool provided with Qt Quick 3D. The Balsam tool is a command line application
+that is part of Qt Quick 3D's asset conditioning pipeline. The purpose is to
+take assets created in digital content creation tools like `Maya`_, `3ds Max`_
+or `Blender`_ and converts them into an efficient runtime format for use with Qt
+Quick 3D. It is not possible, nor does it make sense to reference the
+interchange formats directly in applications because a large amount of
+resources are needed to parse and condition the content of the asset before it
+is usable for real-time rendering. Instead, the interchange formats can be
+converted via the Balsam tool into QML Components and resources like geometry
+and textures.
+
+
+For more information on how to use this tool, read Qt's documentation
+here: `Balsam Asset Import Tool`_.
+
+Usage
+-----
+
+.. code-block:: bash
+
+ pyside6-balsam [options] sourceFileName
+
+To convert a 3D asset contained in the file ``testModel.fbx`` with
+``pyside6-balsam`` the following command would be used:
+
+.. code-block:: bash
+
+ pyside6-balsam testModel.fbx
+
+This would generate the following files:
+
+* meshes/testModel.mesh
+* TestModel.qml
+
+Which can then be used in a Qt Quick 3D project by using that QML Component:
+
+.. code-block:: xml
+
+ import QtQuick3D 1.0
+
+ Scene {
+ Model {
+ source: "TestModel.qml"
+ }
+ }
+
+For other modes of operation, refer to the `Balsam Asset Import Tool`_.
+
+.. _`Balsam Asset Import Tool`: https://doc.qt.io/qt-6/qtquick3d-tool-balsam.html
+.. _Maya: https://www.autodesk.com/products/maya/overview
+.. _3ds Max: https://www.autodesk.com/products/3ds-max/overview
+.. _Blender: https://www.blender.org/
+
diff --git a/sources/pyside6/doc/tools/pyside6-balsamui.rst b/sources/pyside6/doc/tools/pyside6-balsamui.rst
new file mode 100644
index 000000000..f34cb6045
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside6-balsamui.rst
@@ -0,0 +1,22 @@
+.. _pyside6-balsamui:
+
+pyside6-balsamui
+================
+
+``pyside6-balsamui`` is graphical user interface frontend to the command line
+tool :ref:`pyside6-balsam`. The purpose of the tool is to take assets created
+in digital content creation tools like `Maya`_, `3ds Max`_ or `Blender`_ and
+converts them into an efficient runtime format for use with Qt Quick 3D.
+
+For more information on the further capabilities of the tool, read Qt's
+documentation here: `Balsam Asset Import Tool`_.
+
+.. image:: pyside6-balsamui_screenshot.webp
+ :width: 500
+ :alt: pyside6-balsamui screenshot
+
+.. _`Balsam Asset Import Tool`: https://doc.qt.io/qt-6/qtquick3d-tool-balsam.html
+.. _Maya: https://www.autodesk.com/products/maya/overview
+.. _3ds Max: https://www.autodesk.com/products/3ds-max/overview
+.. _Blender: https://www.blender.org/
+
diff --git a/sources/pyside6/doc/tools/pyside6-balsamui_screenshot.webp b/sources/pyside6/doc/tools/pyside6-balsamui_screenshot.webp
new file mode 100644
index 000000000..5c194fdb6
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside6-balsamui_screenshot.webp
Binary files differ
diff --git a/sources/pyside6/doc/tools/pyside6-designer_base_screenshot.webp b/sources/pyside6/doc/tools/pyside6-designer_base_screenshot.webp
new file mode 100644
index 000000000..88ff77786
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside6-designer_base_screenshot.webp
Binary files differ
diff --git a/sources/pyside6/doc/tools/pyside6-designer_customwidgets_screenshot.webp b/sources/pyside6/doc/tools/pyside6-designer_customwidgets_screenshot.webp
new file mode 100644
index 000000000..c84436c1d
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside6-designer_customwidgets_screenshot.webp
Binary files differ
diff --git a/sources/pyside6/doc/tools/pyside6-designer_screenshot.webp b/sources/pyside6/doc/tools/pyside6-designer_screenshot.webp
new file mode 100644
index 000000000..27f03652b
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside6-designer_screenshot.webp
Binary files differ
diff --git a/sources/pyside6/doc/tools/pyside6-designer_sections_screenshot.webp b/sources/pyside6/doc/tools/pyside6-designer_sections_screenshot.webp
new file mode 100644
index 000000000..6ff025503
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside6-designer_sections_screenshot.webp
Binary files differ
diff --git a/sources/pyside6/doc/tools/pyside6-linguist_screenshot.webp b/sources/pyside6/doc/tools/pyside6-linguist_screenshot.webp
new file mode 100644
index 000000000..cd91007ba
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside6-linguist_screenshot.webp
Binary files differ
diff --git a/sources/pyside6/doc/tools/pyside6-qmlimportscanner.rst b/sources/pyside6/doc/tools/pyside6-qmlimportscanner.rst
new file mode 100644
index 000000000..ba27414d7
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside6-qmlimportscanner.rst
@@ -0,0 +1,53 @@
+.. _pyside6-qmlimportscanner:
+
+pyside6-qmlimportscanner
+========================
+
+``pyside6-qmlimportscanner`` is a command line tool that wraps the
+``qmlimportscanner`` tool of Qt.
+
+
+The tool is automatically run by the :ref:`pyside6-project` tool
+when passing the ``qmllint`` argument instructing it to check
+the QML source files.
+
+Usage
+-----
+
+Invoking the tool in the directory of the :ref:`filesystemexplorer_example`
+example using:
+
+.. code-block:: bash
+
+ pyside6-qmlimportscanner -rootPath .
+
+produces:
+
+.. code-block:: json
+
+ [
+ {
+ "name": "QtQuick",
+ "type": "module"
+ },
+ {
+ "name": "QtQuick.Controls.Basic",
+ "type": "module"
+ },
+ {
+ "name": "QtQuick.Layouts",
+ "type": "module"
+ },
+ {
+ "name": "FileSystemModule",
+ "type": "module"
+ },
+ {
+ "name": "QtQuick.Controls",
+ "type": "module"
+ },
+ {
+ "name": "QtQuick.Effects",
+ "type": "module"
+ }
+ ]
diff --git a/sources/pyside6/doc/tools/pyside6-qsb.rst b/sources/pyside6/doc/tools/pyside6-qsb.rst
new file mode 100644
index 000000000..f6f1847d4
--- /dev/null
+++ b/sources/pyside6/doc/tools/pyside6-qsb.rst
@@ -0,0 +1,39 @@
+.. _pyside6-qsb:
+
+pyside6-qsb
+===========
+
+``pyside6-qsb`` is a tool that wraps the `qsb <QSB Manual>`_ tool. qsb is a
+command line tool provided by the `Qt Shader Tools`_ module. It integrates
+third-party libraries such as `glslang`_ and `SPIRV-Cross`_, optionally invokes
+external tools, such as ``fxc`` or ``spirv-opt``, and generates .qsb files.
+Additionally, it can be used to inspect the contents of a .qsb package.
+
+For more information on how to use this tool, read Qt's documentation
+here: `QSB Manual`_.
+
+Usage
+-----
+
+To create a qsb file from a shader file, e.g., ``shader.frag``, use the
+following command:
+
+.. code-block:: bash
+
+ pyside6-qsb -o shader.frag.qsb shader.frag
+
+To inspect the file produced, i.e., ``shader.frag.qsb``, use the following
+command:
+
+.. code-block:: bash
+
+ pyside6-qsb -d shader.frag.qsb
+
+This will print the reflection metadata (in JSON form) and the included shaders.
+
+For other modes of operation, refer to the `QSB Manual`_.
+
+.. _`glslang`: https://github.com/KhronosGroup/glslang
+.. _`spirv-cross`: https://github.com/KhronosGroup/SPIRV-Cross
+.. _`QSB Manual`: https://doc.qt.io/qt-6/qtshadertools-qsb.html
+.. _`Qt Shader Tools`: https://doc.qt.io/qt-6/qtshadertools-index.html
diff --git a/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.png b/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.png
new file mode 100644
index 000000000..bfdc23fe0
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst b/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst
index 894060e98..c5464640b 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst
+++ b/sources/pyside6/doc/tutorials/basictutorial/clickablebutton.rst
@@ -60,7 +60,8 @@ signal to the `say_hello()` function:
button.clicked.connect(say_hello)
Finally, we show the button and start the Qt main loop:
-::
+
+.. code-block:: python
# Show the button
button.show()
@@ -68,9 +69,8 @@ Finally, we show the button and start the Qt main loop:
app.exec()
Here is the complete code for this example:
-::
- #!/usr/bin/python
+.. code-block:: python
import sys
from PySide6.QtWidgets import QApplication, QPushButton
@@ -88,3 +88,8 @@ Here is the complete code for this example:
button.show()
# Run the main Qt loop
app.exec()
+
+After a few clicks, you will get something like this on your terminal:
+
+.. image:: clickablebutton.png
+ :alt: Clickable Button Example
diff --git a/sources/pyside6/doc/tutorials/basictutorial/dialog.png b/sources/pyside6/doc/tutorials/basictutorial/dialog.png
new file mode 100644
index 000000000..ad5690927
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/basictutorial/dialog.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/basictutorial/dialog.rst b/sources/pyside6/doc/tutorials/basictutorial/dialog.rst
index 577db27d9..b7712672b 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/dialog.rst
+++ b/sources/pyside6/doc/tutorials/basictutorial/dialog.rst
@@ -3,8 +3,8 @@ Creating a Dialog Application
This tutorial shows how to build a simple dialog with some
basic widgets. The idea is to let users provide their name
-in a `QLineEdit`, and the dialog greets them on click of a
-`QPushButton`.
+in a ``QLineEdit``, and the dialog greets them on click of a
+``QPushButton``.
Let us just start with a simple stub that creates and shows
a dialog. This stub is updated during the course of this
@@ -31,24 +31,24 @@ tutorial, but you can use this stub as is if you need to:
sys.exit(app.exec())
The imports aren't new to you, the same for the creation of the
-`QApplication` and the execution of the Qt main loop.
+``QApplication`` and the execution of the Qt main loop.
The only novelty here is the **class definition**.
You can create any class that subclasses PySide6 widgets.
-In this case, we are subclassing `QDialog` to define a custom
+In this case, we are subclassing ``QDialog`` to define a custom
dialog, which we name as **Form**. We have also implemented the
-`init()` method that calls the `QDialog`'s init method with the
-parent widget, if any. Also, the new `setWindowTitle()` method
-just sets the title of the dialog window. In `main()`, you can see
+``init()`` method that calls the ``QDialog``'s init method with the
+parent widget, if any. Also, the new ``setWindowTitle()`` method
+just sets the title of the dialog window. In ``main()``, you can see
that we are creating a *Form object* and showing it to the world.
Create the Widgets
------------------
-We are going to create two widgets: a `QLineEdit` where users can
-enter their name, and a `QPushButton` that prints the contents of
-the `QLineEdit`.
-So, let's add the following code to the `init()` method of our Form:
+We are going to create two widgets: a ``QLineEdit`` where users can
+enter their name, and a ``QPushButton`` that prints the contents of
+the ``QLineEdit``.
+So, let's add the following code to the ``init()`` method of our Form:
::
# Create widgets
@@ -62,8 +62,8 @@ Create a layout to organize the Widgets
---------------------------------------
Qt comes with layout-support that helps you organize the widgets
-in your application. In this case, let's use `QVBoxLayout` to lay out
-the widgets vertically. Add the following code to the `init()` method,
+in your application. In this case, let's use ``QVBoxLayout`` to lay out
+the widgets vertically. Add the following code to the ``init()`` method,
after creating the widgets:
::
@@ -72,40 +72,41 @@ after creating the widgets:
layout.addWidget(self.edit)
layout.addWidget(self.button)
-So, we create the layout, add the widgets with `addWidget()`.
+So, we create the layout, add the widgets with ``addWidget()``.
Create the function to greet and connect the Button
---------------------------------------------------
Finally, we just have to add a function to our custom **Form**
and *connect* our button to it. Our function will be a part of
-the Form, so you have to add it after the `init()` function:
+the Form, so you have to add it after the ``init()`` function:
::
# Greets the user
def greetings(self):
print(f"Hello {self.edit.text()}")
-Our function just prints the contents of the `QLineEdit` to the
+Our function just prints the contents of the ``QLineEdit`` to the
python console. We have access to the text by means of the
-`QLineEdit.text()` method.
+``QLineEdit.text()`` method.
Now that we have everything, we just need to *connect* the
-`QPushButton` to the `Form.greetings()` method. To do so, add the
-following line to the `init()` method:
+``QPushButton`` to the ``Form.greetings()`` method. To do so, add the
+following line to the ``init()`` method:
::
# Add button signal to greetings slot
self.button.clicked.connect(self.greetings)
-Once executed, you can enter your name in the `QLineEdit` and watch
+Once executed, you can enter your name in the ``QLineEdit`` and watch
the console for greetings.
Complete code
-------------
Here is the complete code for this tutorial:
-::
+
+.. code-block:: python
import sys
from PySide6.QtWidgets import (QLineEdit, QPushButton, QApplication,
@@ -139,3 +140,10 @@ Here is the complete code for this tutorial:
form.show()
# Run the main Qt loop
sys.exit(app.exec())
+
+
+When you execute the code, and write down your name,
+the button will display messages on the terminal:
+
+.. image:: dialog.png
+ :alt: Simple Dialog Example
diff --git a/sources/pyside6/doc/tutorials/basictutorial/greenapplication.png b/sources/pyside6/doc/tutorials/basictutorial/greenapplication.png
new file mode 100644
index 000000000..29ea0a701
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/basictutorial/greenapplication.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/basictutorial/icons.png b/sources/pyside6/doc/tutorials/basictutorial/icons.png
index 0bcfd7d77..a5a554eba 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/icons.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/icons.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/basictutorial/icons.zip b/sources/pyside6/doc/tutorials/basictutorial/icons.zip
new file mode 100644
index 000000000..e279e37b8
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/basictutorial/icons.zip
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/basictutorial/player-new.png b/sources/pyside6/doc/tutorials/basictutorial/player-new.png
index e1f660e5f..8e45c757d 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/player-new.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/player-new.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/basictutorial/player.png b/sources/pyside6/doc/tutorials/basictutorial/player.png
index 3060a990d..0563d3223 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/player.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/player.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/basictutorial/qml.rst b/sources/pyside6/doc/tutorials/basictutorial/qml.rst
index 0ea346069..49cd3d94a 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/qml.rst
+++ b/sources/pyside6/doc/tutorials/basictutorial/qml.rst
@@ -1,7 +1,7 @@
Your First QtQuick/QML Application
**********************************
-QML is a declarative language that lets you develop applications
+QML_ is a declarative language that lets you develop applications
faster than with traditional languages. It is ideal for designing the
UI of your application because of its declarative nature. In QML, a
user interface is specified as a tree of objects with properties. In
@@ -13,55 +13,67 @@ a file with the QML description of the user interface, and a python file
that loads the QML file. To make things easier, let's save both files in
the same directory.
-Here is a simple QML file called `view.qml`:
+Here is a simple QML file called :code:`view.qml`:
.. code-block:: javascript
- import QtQuick 2.0
+ import QtQuick
Rectangle {
+ id: main
width: 200
height: 200
color: "green"
Text {
text: "Hello World"
- anchors.centerIn: parent
+ anchors.centerIn: main
}
}
-We start by importing `QtQuick 2.0`, which is a QML module.
+We start by importing :code:`QtQuick`, which is a QML module.
The rest of the QML code is pretty straightforward for those who
have previously used HTML or XML files. Basically, we are creating
a green rectangle with the size `200*200`, and adding a Text element
-that reads "Hello World". The code `anchors.centerIn: parent` makes
-the text appear centered in relation to its immediate parent, which
-is the Rectangle in this case.
+that reads "Hello World". The code :code:`anchors.centerIn: main` makes
+the text appear centered within the object with :code:`id: main`,
+which is the Rectangle in this case.
Now, let's see how the code looks on the PySide6.
-Let's call it `main.py`:
+Let's call it :code:`main.py`:
.. code-block:: python
+ import sys
from PySide6.QtWidgets import QApplication
from PySide6.QtQuick import QQuickView
- from PySide6.QtCore import QUrl
- app = QApplication([])
- view = QQuickView()
- url = QUrl("view.qml")
+ if __name__ == "__main__":
+ app = QApplication()
+ view = QQuickView()
- view.setSource(url)
- view.show()
- app.exec()
+ view.setSource("view.qml")
+ view.show()
+ sys.exit(app.exec())
If you are already familiar with PySide6 and have followed our
tutorials, you have already seen much of this code.
-The only novelties are that you must `import QtQuick` and set the
-source of the `QQuickView` object to the URL of your QML file.
-Then, as any Qt widget, you call `QQuickView.show()`.
+The only novelties are that you must :code:`import QtQuick` and set the
+source of the :code:`QQuickView` object to the URL of your QML file.
+Then, similar to what you do with any Qt widget, you call
+:code:`QQuickView.show()`.
.. note:: If you are programming for desktop, you should consider
adding `view.setResizeMode(QQuickView.SizeRootObjectToView)`
before showing the view.
+
+When you execute the :code:`main.py` script, you will see the following
+application:
+
+
+.. image:: greenapplication.png
+ :alt: Simple QML and Python example
+ :align: center
+
+.. _QML: https://doc.qt.io/qt-6/qmlapplications.html
diff --git a/sources/pyside6/doc/tutorials/basictutorial/qrcfiles.rst b/sources/pyside6/doc/tutorials/basictutorial/qrcfiles.rst
index 477c5b738..858293beb 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/qrcfiles.rst
+++ b/sources/pyside6/doc/tutorials/basictutorial/qrcfiles.rst
@@ -1,7 +1,7 @@
.. _using_qrc_files:
-Using `.qrc` Files (`pyside6-rcc`)
-**********************************
+Using ``.qrc`` Files (``pyside6-rcc``)
+**************************************
The `Qt Resource System`_ is a mechanism for storing binary files
in an application.
@@ -17,7 +17,7 @@ In this tutorial you will learn how to load custom images as button icons.
For inspiration, we will try to adapt the multimedia player example
from Qt.
-As you can see on the following image, the `QPushButton` that are used
+As you can see on the following image, the ``QPushButton`` that are used
for the media actions (play, pause, stop, and so on) are using the
default icons meant for such actions.
@@ -25,29 +25,27 @@ default icons meant for such actions.
:alt: Multimedia Player Qt Example
You could make the application more attractive by designing the icons,
-but in case you don't want to design them, `download the following set`_
-and use them.
+but in case you don't want to design them, you can download and use them.
+
+:download:`Download icons <icons.zip>`
.. image:: icons.png
:alt: New Multimedia icons
-You can find more information about the `rcc` command, and `.qrc` file
+You can find more information about the ``rcc`` command, and ``.qrc`` file
format, and the resource system in general in the `Qt Resource System`_
site.
-.. _`download the following set`: icons/
-
-The `.qrc` file
-================
+The ``.qrc`` file
+=================
-Before running any command, add information about the resources to a `.qrc`
+Before running any command, add information about the resources to a ``.qrc``
file.
-In the following example, notice how the resources are listed in `icons.qrc`
+In the following example, notice how the resources are listed in ``icons.qrc``
::
- </ui>
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>icons/play.png</file>
@@ -62,15 +60,15 @@ In the following example, notice how the resources are listed in `icons.qrc`
Generating a Python file
=========================
-Now that the `icons.qrc` file is ready, use the `pyside6-rcc` tool to generate
+Now that the ``icons.qrc`` file is ready, use the ``pyside6-rcc`` tool to generate
a Python class containing the binary information about the resources
To do this, we need to run::
- pyside6-rcc icons.rc -o rc_icons.py
+ pyside6-rcc icons.qrc -o rc_icons.py
-The `-o` option lets you specify the output filename,
-which is `rc_icons.py` in this case.
+The ``-o`` option lets you specify the output filename,
+which is ``rc_icons.py`` in this case.
To use the generated file, add the following import at the top of your main Python file::
@@ -167,7 +165,7 @@ Now, the constructor of your class should look like this:
Executing the example
=====================
-Run the application by calling `python main.py` to checkout the new icon-set:
+Run the application by calling ``python main.py`` to checkout the new icon-set:
.. image:: player-new.png
:alt: New Multimedia Player Qt Example
diff --git a/sources/pyside6/doc/tutorials/basictutorial/signals_and_slots.rst b/sources/pyside6/doc/tutorials/basictutorial/signals_and_slots.rst
new file mode 100644
index 000000000..0bfd9e276
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/basictutorial/signals_and_slots.rst
@@ -0,0 +1,263 @@
+.. _signals-and-slots:
+
+Signals and Slots
+=================
+
+Due to the nature of Qt, ``QObject``\s require a way to communicate, and that's
+the reason for this mechanism to be a **central feature of Qt**.
+
+In simple terms, you can understand **Signal and Slots** in the same way you
+interact with the lights in your house. When you move the light switch
+(signal) you get a result which may be that your light bulbs are switched
+on/off (slot).
+
+While developing interfaces, you can get a real example by the effect of
+clicking a button: the 'click' will be the signal, and the slot will be what
+happens when that button is clicked, like closing a window, saving a document,
+etc.
+
+.. note::
+ If you have experience with other frameworks or toolkits, it's likely
+ that you read a concept called 'callback'. Leaving the implementation
+ details aside, a callback will be related to a notification function,
+ passing a pointer to a function in case it's required due to the events
+ that happen in your program. This approach might sound similar, but
+ there are essential differences that make it an unintuitive approach,
+ like ensuring the type correctness of callback arguments, and some others.
+
+All classes that inherit from ``QObject`` or one of its subclasses, like
+``QWidget`` can contain signals and slots. **Signals are emitted by objects**
+when they change their state in a way that may be interesting to other objects.
+This is all the object does to communicate. It does not know or care whether
+anything is receiving the signals it emits. This is true information
+encapsulation, and ensures that the object can be used as a software component.
+
+**Slots can be used for receiving signals**, but they are also normal member
+functions. Just as an object does not know if anything receives its signals,
+a slot does not know if it has any signals connected to it. This ensures that
+truly independent components can be created with Qt.
+
+You can connect as many signals as you want to a single slot, and a signal can
+be connected to as many slots as you need. It is even possible to connect
+a signal directly to another signal. (This will emit the second signal
+immediately whenever the first is emitted.)
+
+Qt's widgets have many predefined signals and slots. For example,
+``QAbstractButton`` (base class of buttons in Qt) has a ``clicked()``
+signal and ``QLineEdit`` (single line input field) has a slot named
+``clear()``. So, a text input field with a button to clear the text
+could be implemented by placing a ``QToolButton`` to the right of the
+``QLineEdit`` and connecting its ``clicked()`` signal to the slot
+``clear()``. This is done using the ``connect()`` method of the signal:
+
+.. code-block:: python
+
+ button = QToolButton()
+ line_edit = QLineEdit()
+ button.clicked.connect(line_edit.clear)
+
+``connect()`` returns a ``QMetaObject.Connection`` object, which can be
+used with the ``disconnect()`` method to sever the connection.
+
+Signals can also be connected to free functions:
+
+.. code-block:: python
+
+ import sys
+ from PySide6.QtWidgets import QApplication, QPushButton
+
+
+ def function():
+ print("The 'function' has been called!")
+
+ app = QApplication()
+ button = QPushButton("Call function")
+ button.clicked.connect(function)
+ button.show()
+ sys.exit(app.exec())
+
+Connections can be spelled out in code or, for widget forms,
+designed in the
+`Signal-Slot Editor <https://doc.qt.io/qt-6/designer-connection-mode.html>`_
+of *Qt Widgets Designer*.
+
+The Signal Class
+----------------
+
+When writing classes in Python, signals are declared as class level
+variables of the class ``QtCore.Signal()``. A QWidget-based button
+that emits a ``clicked()`` signal could look as
+follows:
+
+.. code-block:: python
+
+ from PySide6.QtCore import Qt, Signal
+ from PySide6.QtWidgets import QWidget
+
+ class Button(QWidget):
+
+ clicked = Signal(Qt.MouseButton)
+
+ ...
+
+ def mousePressEvent(self, event):
+ self.clicked.emit(event.button())
+
+The constructor of ``Signal`` takes a tuple or a list of Python types
+and C types:
+
+.. code-block:: python
+
+ signal1 = Signal(int) # Python types
+ signal2 = Signal(QUrl) # Qt Types
+ signal3 = Signal(int, str, int) # more than one type
+ signal4 = Signal((float,), (QDate,)) # optional types
+
+In addition to that, it can receive also a named argument ``name`` that defines
+the signal name. If nothing is passed, the new signal will have the same name
+as the variable that it is being assigned to.
+
+.. code-block:: python
+
+ # TODO
+ signal5 = Signal(int, name='rangeChanged')
+ # ...
+ rangeChanged.emit(...)
+
+Another useful option of ``Signal`` is the arguments name,
+useful for QML applications to refer to the emitted values by name:
+
+.. code-block:: python
+
+ sumResult = Signal(int, arguments=['sum'])
+
+.. code-block:: javascript
+
+ Connections {
+ target: ...
+ function onSumResult(sum) {
+ // do something with 'sum'
+ }
+
+
+.. _slot-decorator:
+
+The Slot Class
+--------------
+
+Slots in QObject-derived classes should be indicated by the decorator
+``@QtCore.Slot()``. Again, to define a signature just pass the types
+similar to the ``QtCore.Signal()`` class.
+
+.. code-block:: python
+
+ @Slot(str)
+ def slot_function(self, s):
+ ...
+
+
+``Slot()`` also accepts a ``name`` and a ``result`` keyword.
+The ``result`` keyword defines the type that will be returned and can be a C or
+Python type. The ``name`` keyword behaves the same way as in ``Signal()``. If
+nothing is passed as name then the new slot will have the same name as the
+function that is being decorated.
+
+We recommend marking all methods used by signal connections with a
+``@QtCore.Slot()`` decorator. Not doing causes run-time overhead due to the
+method being added to the ``QMetaObject`` when creating the connection. This is
+particularly important for ``QObject`` classes registered with QML, where
+missing decorators can introduce bugs.
+
+Missing decorators can be diagnosed by setting activating warnings of the
+logging category ``qt.pyside.libpyside``; for example by setting the
+environment variable:
+
+.. code-block:: bash
+
+ export QT_LOGGING_RULES="qt.pyside.libpyside.warning=true"
+
+.. _overloading-signals-and-slots:
+
+Overloading Signals and Slots with Different Types
+--------------------------------------------------
+
+It is actually possible to use signals and slots of the same name with different
+parameter type lists. This is legacy from Qt 5 and not recommended for new code.
+In Qt 6, signals have distinct names for different types.
+
+The following example uses two handlers for a Signal and a Slot to showcase
+the different functionality.
+
+.. code-block:: python
+
+ import sys
+ from PySide6.QtWidgets import QApplication, QPushButton
+ from PySide6.QtCore import QObject, Signal, Slot
+
+
+ class Communicate(QObject):
+ # create two new signals on the fly: one will handle
+ # int type, the other will handle strings
+ speak = Signal((int,), (str,))
+
+ def __init__(self, parent=None):
+ super().__init__(parent)
+
+ self.speak[int].connect(self.say_something)
+ self.speak[str].connect(self.say_something)
+
+ # define a new slot that receives a C 'int' or a 'str'
+ # and has 'say_something' as its name
+ @Slot(int)
+ @Slot(str)
+ def say_something(self, arg):
+ if isinstance(arg, int):
+ print("This is a number:", arg)
+ elif isinstance(arg, str):
+ print("This is a string:", arg)
+
+ if __name__ == "__main__":
+ app = QApplication(sys.argv)
+ someone = Communicate()
+
+ # emit 'speak' signal with different arguments.
+ # we have to specify the str as int is the default
+ someone.speak.emit(10)
+ someone.speak[str].emit("Hello everybody!")
+
+
+.. _signals-and-slots-strings:
+
+Specifying Signals and Slots by Method Signature Strings
+--------------------------------------------------------
+
+
+Signals and slots can also be specified as C++ method signature
+strings passed through the ``SIGNAL()`` and/or ``SLOT()`` functions:
+
+.. code-block:: python
+
+ from PySide6.QtCore import SIGNAL, SLOT
+
+ button.connect(SIGNAL("clicked(Qt::MouseButton)"),
+ action_handler, SLOT("action1(Qt::MouseButton)"))
+
+This is not normally recommended; it is only needed
+for a few cases where signals are only accessible via ``QMetaObject``
+(``QAxObject``, ``QAxWidget``, ``QDBusInterface`` or ``QWizardPage::registerField()``):
+
+.. code-block:: python
+
+ wizard.registerField("text", line_edit, "text",
+ SIGNAL("textChanged(QString)"))
+
+The signature strings can be found by querying ``QMetaMethod.methodSignature()``
+when introspecting ``QMetaObject``:
+
+.. code-block:: python
+
+ mo = widget.metaObject()
+ for m in range(mo.methodOffset(), mo.methodCount()):
+ print(mo.method(m).methodSignature())
+
+Slots should be decorated using :ref:`@Slot <slot-decorator>`.
diff --git a/sources/pyside6/doc/tutorials/basictutorial/signals_slots.png b/sources/pyside6/doc/tutorials/basictutorial/signals_slots.png
new file mode 100644
index 000000000..0801cf16e
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/basictutorial/signals_slots.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/basictutorial/tablewidget.png b/sources/pyside6/doc/tutorials/basictutorial/tablewidget.png
index 8eb1398a7..e2549f7d0 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/tablewidget.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/tablewidget.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/basictutorial/translations.png b/sources/pyside6/doc/tutorials/basictutorial/translations.png
new file mode 100644
index 000000000..b9fc1ba17
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/basictutorial/translations.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/basictutorial/translations.rst b/sources/pyside6/doc/tutorials/basictutorial/translations.rst
index 44280580c..21c16cdcd 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/translations.rst
+++ b/sources/pyside6/doc/tutorials/basictutorial/translations.rst
@@ -3,13 +3,16 @@
Translating Applications
========================
+.. image:: translations.png
+ :alt: Translation Image
+
Qt Linguist
-----------
-`Qt Linguist <https://doc.qt.io/qt-6/qtlinguist-index.html>`_ and
+`Qt Linguist`_ and
its related tools can be used to provide translations for applications.
-The ``examples/widgets/linguist`` example illustrates this. The example is
+The :ref:`qt-linguist-example` example illustrates this. The example is
very simple, it has a menu and shows a list of programming languages with
multiselection.
@@ -25,29 +28,53 @@ The linguist example has a number of messages enclosed in ``self.tr()``.
The status bar message shown in response to a selection change uses
a plural form depending on a count:
- .. code-block:: python
+.. code-block:: python
- count = len(self._list_widget.selectionModel().selectedRows())
- message = self.tr("%n language(s) selected", "", count)
+ count = len(self._list_widget.selectionModel().selectedRows())
+ message = self.tr("%n language(s) selected", "", count)
The translation workflow for the example is as follows:
The translated messages are extracted using the ``lupdate`` tool,
producing XML-based ``.ts`` files:
- .. code-block:: bash
+.. code-block:: bash
- pyside6-lupdate main.py -ts example_de.ts
+ pyside6-lupdate main.py -ts example_de.ts
If ``example_de.ts`` already exists, it will be updated with the new
messages added to the code in-between.
+If there are form files (``.ui``) and/or QML files (``.qml``) in the project,
+they should be passed to the ``pyside6-lupdate`` tool as well:
+
+.. code-block:: bash
+
+ pyside6-lupdate main.py main.qml form.ui -ts example_de.ts
+
+The source files generated by ``pyside6-uic`` from the form files
+should **not** be passed.
+
+The ``lupdate`` mode of ``pyside6-project`` can also be used for this. It
+collects all source files and runs ``pyside6-lupdate`` when ``.ts`` file(s)
+are given in the ``.pyproject`` file:
+
+.. code-block:: bash
+
+ pyside6-project lupdate .
+
``.ts`` files are translated using *Qt Linguist*. Once this is complete,
the files are converted to a binary form (``.qm`` files):
- .. code-block:: bash
+.. code-block:: bash
+
+ pyside6-lrelease example_de.ts -qm example_de.qm
+
+``pyside6-project`` will build the ``.qm`` file automatically when
+``.ts`` file(s) are given in the ``.pyproject`` file:
- mkdir translations
- pyside6-lrelease example_de.ts -qm translations/example_de.qm
+.. code-block:: bash
+
+ pyside6-project build .
To avoid having to ship the ``.qm`` files, it is recommend
to put them into a Qt resource file along with icons and other
@@ -55,43 +82,45 @@ applications resources (see :ref:`using_qrc_files`).
The resource file ``linguist.qrc`` provides the ``example_de.qm``
under ``:/translations``:
- .. code-block:: xml
+.. code-block:: xml
- <!DOCTYPE RCC><RCC version="1.0">
- <qresource>
- <file>translations/example_de.qm</file>
- </qresource>
- </RCC>
+ <!DOCTYPE RCC><RCC version="1.0">
+ <qresource prefix="translations">
+ <file>example_de.qm</file>
+ </qresource>
+ </RCC>
At runtime, the translations need to be loaded using the ``QTranslator`` class:
- .. code-block:: python
+.. code-block:: python
- path = QLibraryInfo.location(QLibraryInfo.TranslationsPath)
- translator = QTranslator(app)
- if translator.load(QLocale.system(), 'qtbase', '_', path):
- app.installTranslator(translator)
- translator = QTranslator(app)
- path = ':/translations'
- if translator.load(QLocale.system(), 'example', '_', path):
- app.installTranslator(translator)
+ path = QLibraryInfo.location(QLibraryInfo.TranslationsPath)
+ translator = QTranslator(app)
+ if translator.load(QLocale.system(), 'qtbase', '_', path):
+ app.installTranslator(translator)
+ translator = QTranslator(app)
+ path = ':/translations'
+ if translator.load(QLocale.system(), 'example', '_', path):
+ app.installTranslator(translator)
The code first loads the translations shipped for Qt and then
the translations of the applications loaded from resources.
The example can then be run in German:
- .. code-block:: bash
+.. code-block:: bash
- LANG=de python main.py
+ LANG=de python main.py
+
+.. _Qt Linguist: https://doc.qt.io/qt-6/qtlinguist-index.html
GNU gettext
-----------
-The `GNU gettext <https://docs.python.org/3/library/gettext.html>`_ module
+The `GNU gettext`_ module
can be used to provide translations for applications.
-The ``examples/widgets/gettext`` example illustrates this. The example is
+The :ref:`gettext-example` example illustrates this. The example is
very simple, it has a menu and shows a list of programming languages with
multiselection.
@@ -103,29 +132,29 @@ aliased to ``ngettext``.
Those functions are defined at the top:
- .. code-block:: python
+.. code-block:: python
- import gettext
- ...
- _ = None
- ngettext = None
+ import gettext
+ # ...
+ _ = None
+ ngettext = None
and later assigned as follows:
- .. code-block:: python
-
- src_dir = Path(__file__).resolve().parent
- try:
- translation = gettext.translation('example', localedir=src_dir / 'locales')
- if translation:
- translation.install()
- _ = translation.gettext
- ngettext = translation.ngettext
- except FileNotFoundError:
- pass
- if not _:
- _ = gettext.gettext
- ngettext = gettext.ngettext
+.. code-block:: python
+
+ src_dir = Path(__file__).resolve().parent
+ try:
+ translation = gettext.translation('example', localedir=src_dir / 'locales')
+ if translation:
+ translation.install()
+ _ = translation.gettext
+ ngettext = translation.ngettext
+ except FileNotFoundError:
+ pass
+ if not _:
+ _ = gettext.gettext
+ ngettext = gettext.ngettext
This specifies that our translation file has the base name ``example`` and
will be found in the source tree under ``locales``. The code will try
@@ -133,18 +162,18 @@ to load a translation matching the current language.
Messages to be translated look like:
- .. code-block:: python
+.. code-block:: python
- file_menu = self.menuBar().addMenu(_("&File"))
+ file_menu = self.menuBar().addMenu(_("&File"))
The status bar message shown in response to a selection change uses
a plural form depending on a count:
- .. code-block:: python
+.. code-block:: python
- count = len(self._list_widget.selectionModel().selectedRows())
- message = ngettext("{0} language selected",
- "{0} languages selected", count).format(count)
+ count = len(self._list_widget.selectionModel().selectedRows())
+ message = ngettext("{0} language selected",
+ "{0} languages selected", count).format(count)
The ``ngettext()`` function takes the singular form, plural form and the count.
The returned string still contains the formatting placeholder, so it needs
@@ -159,43 +188,45 @@ is first created:
xgettext -L Python -o locales/example.pot main.py
This file has a few generic placeholders which can be replaced by the
-appropriate values. It is then copied to the ``de_DE/LC_MESSAGES`` directory.
+appropriate values. It is then copied to the ``de_DE/LC_MESSAGES`` directory.
- .. code-block:: bash
+.. code-block:: bash
- cd locales/de_DE/LC_MESSAGES/
- cp ../../example.pot .
+ cd locales/de_DE/LC_MESSAGES/
+ cp ../../example.pot .
Further adaptions need to be made to account for the German plural
form and encoding:
- .. code-block::
+.. code-block::
- "Project-Id-Version: PySide6 gettext example\n"
- "POT-Creation-Date: 2021-07-05 14:16+0200\n"
- "Language: de_DE\n"
- "MIME-Version: 1.0\n"
- "Content-Type: text/plain; charset=UTF-8\n"
- "Content-Transfer-Encoding: 8bit\n"
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
+ "Project-Id-Version: PySide6 gettext example\n"
+ "POT-Creation-Date: 2021-07-05 14:16+0200\n"
+ "Language: de_DE\n"
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=UTF-8\n"
+ "Content-Transfer-Encoding: 8bit\n"
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
Below, the translated messages can be given:
- .. code-block::
+.. code-block::
- #: main.py:57
- msgid "&File"
- msgstr "&Datei"
+ #: main.py:57
+ msgid "&File"
+ msgstr "&Datei"
Finally, the ``.pot`` is converted to its binary form (machine object file,
``.mo``), which needs to be deployed:
- .. code-block:: bash
+.. code-block:: bash
- msgfmt -o example.mo example.pot
+ msgfmt -o example.mo example.pot
The example can then be run in German:
- .. code-block:: bash
+.. code-block:: bash
+
+ LANG=de python main.py
- LANG=de python main.py
+.. _GNU gettext: https://docs.python.org/3/library/gettext.html
diff --git a/sources/pyside6/doc/tutorials/basictutorial/treewidget.png b/sources/pyside6/doc/tutorials/basictutorial/treewidget.png
index 077eb5830..990fe977b 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/treewidget.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/treewidget.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/basictutorial/treewidget.rst b/sources/pyside6/doc/tutorials/basictutorial/treewidget.rst
index b286de507..f431cb5c4 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/treewidget.rst
+++ b/sources/pyside6/doc/tutorials/basictutorial/treewidget.rst
@@ -11,14 +11,14 @@ information in trees. You can also create a data model and display it using a
further on. To know more about the Model/View architecture in Qt, refer to
its `official documentation <https://doc.qt.io/qt-6/model-view-programming.html>`_.
-1. Import ``QTreeWidget`` and ``QTreeWidgetItem`` for this application:
+#. Import ``QTreeWidget`` and ``QTreeWidgetItem`` for this application:
.. code-block:: python
import sys
from PySide6.QtWidgets import QApplication, QTreeWidget, QTreeWidgetItem
-2. Define a dictionary with project structures to display the information as a
+#. Define a dictionary with project structures to display the information as a
tree, with files belonging to each project:
.. code-block:: python
@@ -27,13 +27,13 @@ information in trees. You can also create a data model and display it using a
"Project B": ["file_b.csv", "photo.jpg"],
"Project C": []}
-3. Initialize the ``QApplication`` singleton:
+#. Initialize the ``QApplication`` singleton:
.. code-block:: python
app = QApplication()
-4. Configure the ``QTreeWidget`` to have two columns, one for the item name,
+#. Configure the ``QTreeWidget`` to have two columns, one for the item name,
and the other for item type information of the files in the project
directories.
You can set the column name with the ``setHeaderLabels`` as described below:
@@ -44,7 +44,7 @@ information in trees. You can also create a data model and display it using a
tree.setColumnCount(2)
tree.setHeaderLabels(["Name", "Type"])
-5. Iterate the data structure, create the ``QTreeWidgetItem`` elements, and add
+#. Iterate the data structure, create the ``QTreeWidgetItem`` elements, and add
the corresponding children to each parent.
We also extract the extension name for only the files and add them
into the second column.
@@ -64,7 +64,7 @@ information in trees. You can also create a data model and display it using a
tree.insertTopLevelItems(0, items)
-7. Show the tree and execute the ``QApplication``.
+#. Show the tree and execute the ``QApplication``.
.. code-block:: python
diff --git a/sources/pyside6/doc/tutorials/basictutorial/uifiles.png b/sources/pyside6/doc/tutorials/basictutorial/uifiles.png
new file mode 100644
index 000000000..918efec6d
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/basictutorial/uifiles.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/basictutorial/uifiles.rst b/sources/pyside6/doc/tutorials/basictutorial/uifiles.rst
index adf5ec6d2..cb945908d 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/uifiles.rst
+++ b/sources/pyside6/doc/tutorials/basictutorial/uifiles.rst
@@ -1,24 +1,27 @@
.. _using_ui_files:
-Using `.ui` files from Designer or QtCreator with `QUiLoader` and `pyside6-uic`
-*******************************************************************************
+Using ``.ui`` files from Designer or QtCreator with ``QUiLoader`` and ``pyside6-uic``
+*************************************************************************************
This page describes the use of
-`Qt Designer <https://doc.qt.io/qt-6/qtdesigner-manual.html>`_ to create
+`Qt Widgets Designer <https://doc.qt.io/qt-6/qtdesigner-manual.html>`_ to create
graphical interfaces based on Qt Widgets for your Qt for Python project.
-**Qt Designer** is a graphical UI design tool which is available as a
+*Qt Widgets Designer* is a graphical UI design tool which is available as a
standalone binary (``pyside6-designer``) or embedded into the
-`Qt Creator IDE <https://doc.qt.io/qtcreator>`_. Its use within **Qt Creator**
+`Qt Creator IDE <https://doc.qt.io/qtcreator>`_. Its use within *Qt Creator*
is described at
-`Using Qt Designer <http://doc.qt.io/qtcreator/creator-using-qt-designer.html>`_.
+`Using Qt Widgets Designer <https://doc.qt.io/qtcreator/creator-using-qt-designer.html>`_.
-The designs are stored in `.ui` files, which is an XML-based format. It will
+.. image:: uifiles.png
+ :alt: Designer and the equivalent code
+
+The designs are stored in ``.ui`` files, which is an XML-based format. It will
be converted to Python or C++ code populating a widget instance at project build
time by the `pyside6-uic <https://doc.qt.io/qt-6/uic.html>`_ tool.
-To create a new Qt Design Form in **Qt Creator**, choose
-`File/New File Or Project` and "Main Window" for template. Save it as
-`mainwindow.ui`. Add a `QPushButton` to the center of the centralwidget.
+To create a new Qt Design Form in *Qt Creator*, choose
+``File/New File Or Project`` and "Main Window" for template. Save it as
+``mainwindow.ui``. Add a ``QPushButton`` to the center of the centralwidget.
Your file ``mainwindow.ui`` should look something like this:
@@ -85,12 +88,12 @@ Option A: Generating a Python class
===================================
The standard way to interact with a **UI file** is to generate a Python
-class from it. This is possible thanks to the `pyside6-uic` tool.
+class from it. This is possible thanks to the ``pyside6-uic`` tool.
To use this tool, you need to run the following command on a console::
- pyside6-uic mainwindow.ui > ui_mainwindow.py
+ pyside6-uic mainwindow.ui -o ui_mainwindow.py
-We redirect all the output of the command to a file called `ui_mainwindow.py`,
+We redirect all the output of the command to a file called ``ui_mainwindow.py``,
which will be imported directly::
from ui_mainwindow import Ui_MainWindow
@@ -133,7 +136,7 @@ file:
.. note::
- You must run `pyside6-uic` again every time you make changes
+ You must run ``pyside6-uic`` again every time you make changes
to the **UI file**.
Option B: Loading it directly
@@ -146,7 +149,7 @@ module:
from PySide6.QtUiTools import QUiLoader
-The `QUiLoader` lets us load the **ui file** dynamically
+The ``QUiLoader`` lets us load the **ui file** dynamically
and use it right away:
.. code-block:: python
@@ -189,33 +192,41 @@ The complete code of this example looks like this:
Then to execute it we just need to run the following on a
command prompt:
-.. code-block:: python
+.. code-block:: bash
python main.py
+.. note::
+
+ ``QUiLoader`` uses ``connect()`` calls taking the function signatures as string
+ arguments for signal/slot connections.
+ It is thus unable to handle Python types like ``str`` or ``list`` from
+ custom widgets written in Python since these types are internally mapped
+ to different C++ types.
.. _designer_custom_widgets:
-Custom Widgets in Qt Designer
-=============================
+Custom Widgets in Qt Widgets Designer
+=====================================
-**Qt Designer** is able to use user-provided (custom) widgets. They are shown
-in the widget box and can be dragged onto the form just like Qt's widgets (see
-`Using Custom Widgets with Qt Designer <https://doc.qt.io/qt-6/designer-using-custom-widgets.html>`_
-). Normally, this requires implementing the widget as a plugin to Qt Designer
-written in C++ implementing its
-`QDesignerCustomWidgetInterface <https://doc.qt.io/qt-6/qdesignercustomwidgetinterface.html>`_ .
+*Qt Widgets Designer* is able to use user-provided (custom) widgets.
+They are shown in the widget box and can be dragged onto the form just like
+Qt's widgets (see
+`Using Custom Widgets with Qt Widgets Designer <https://doc.qt.io/qt-6/designer-using-custom-widgets.html>`_
+). Normally, this requires implementing the widget as a plugin to
+*Qt Widgets Designer* written in C++ implementing its
+`QDesignerCustomWidgetInterface`_ .
Qt for Python provides a simple interface for this which is similar to
:meth:`registerCustomWidget()<PySide6.QtUiTools.QUiLoader.registerCustomWidget>`.
The widget needs to be provided as a Python module, as shown by
-the widgetbinding example (file ``wigglywidget.py``) or
-the taskmenuextension example (file ``tictactoe.py``).
+the :ref:`widgetbinding-example` (file ``wigglywidget.py``) or
+the :ref:`task-menu-extension-example` (file ``tictactoe.py``).
-Registering this with Qt Designer is done by providing
+Registering this with *Qt Widgets Designer* is done by providing
a registration script named ``register*.py`` and pointing
-the path-type environment variable ``PYSIDE_DESIGNER_PLUGINS``
+the path-type environment variable ``PYSIDE_DESIGNER_PLUGINS``
to the directory.
The code of the registration script looks as follows:
@@ -252,20 +263,20 @@ The code of the registration script looks as follows:
QPyDesignerCustomWidgetCollection provides an implementation of
-`QDesignerCustomWidgetCollectionInterface <https://doc.qt.io/qt-6/qdesignercustomwidgetcollectioninterface.html>`_
-exposing custom widgets to **Qt Designer** with static convenience functions
-for registering types or adding instances of
-`QDesignerCustomWidgetInterface <https://doc.qt.io/qt-6/qdesignercustomwidgetinterface.html>`_ .
+`QDesignerCustomWidgetCollectionInterface`_
+exposing custom widgets to *Qt Widgets Designer* with static convenience
+functions for registering types or adding instances of
+`QDesignerCustomWidgetInterface`_ .
The function
:meth:`registerCustomWidget()<PySide6.QtDesigner.QPyDesignerCustomWidgetCollection.registerCustomWidget>`
-is used to register a widget type with **Qt Designer**. In the simple case, it
-can be used like `QUiLoader.registerCustomWidget()`. It takes the custom widget
+is used to register a widget type with *Qt Widgets Designer*. In the simple case, it
+can be used like ``QUiLoader.registerCustomWidget()``. It takes the custom widget
type and some optional keyword arguments passing values that correspond to the
getters of
-`QDesignerCustomWidgetInterface <https://doc.qt.io/qt-6/qdesignercustomwidgetinterface.html>`_ :
+`QDesignerCustomWidgetInterface`_ :
-When launching **Qt Designer** via its launcher ``pyside6-designer``,
+When launching *Qt Widgets Designer* via its launcher ``pyside6-designer``,
the custom widget should be visible in the widget box.
For advanced usage, it is also possible to pass the function an implementation
@@ -276,15 +287,18 @@ is registered for the custom widget. The example is a port of the
corresponding C++
`Task Menu Extension Example <https://doc.qt.io/qt-6/qtdesigner-taskmenuextension-example.html>`_ .
-Troubleshooting the Qt Designer Plugin
-++++++++++++++++++++++++++++++++++++++
+.. _QDesignerCustomWidgetCollectionInterface: https://doc.qt.io/qt-6/qdesignercustomwidgetcollectioninterface.html
+.. _QDesignerCustomWidgetInterface: https://doc.qt.io/qt-6/qdesignercustomwidgetinterface.html
+
+Troubleshooting the Qt Widgets Designer Plugin
+++++++++++++++++++++++++++++++++++++++++++++++
- The launcher ``pyside6-designer`` must be used. The standalone
- **Qt Designer** will not load the plugin.
+ *Qt Widgets Designer* will not load the plugin.
- The menu item **Help/About Plugin** brings up a dialog showing the plugins
found and potential load error messages.
- Check the console or Windows Debug view for further error messages.
- Due to the buffering of output by Python, error messages may appear
- only after **Qt Designer** has terminated.
+ only after *Qt Widgets Designer* has terminated.
- When building Qt for Python, be sure to set the ``--standalone`` option
for the plugin to be properly installed.
diff --git a/sources/pyside6/doc/tutorials/basictutorial/widgets.png b/sources/pyside6/doc/tutorials/basictutorial/widgets.png
new file mode 100644
index 000000000..de7a969f9
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/basictutorial/widgets.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/basictutorial/widgets.rst b/sources/pyside6/doc/tutorials/basictutorial/widgets.rst
index 89bd23f63..ef14c7e99 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/widgets.rst
+++ b/sources/pyside6/doc/tutorials/basictutorial/widgets.rst
@@ -17,6 +17,12 @@ Here is a simple example of a Hello World application in PySide6:
app.exec()
+When you execute it the code, the application will look like:
+
+.. image:: widgets.png
+ :alt: Simple Widget
+
+
For a widget application using PySide6, you must always start by
importing the appropriate class from the `PySide6.QtWidgets` module.
@@ -43,3 +49,4 @@ After the creation of the application object, we have created a
Finally, we call `app.exec()` to enter the Qt main loop and start
to execute the Qt code. In reality, it is only here where the label
is shown, but this can be ignored for now.
+
diff --git a/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-no.png b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-no.png
index c30dd621b..f8346533f 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-no.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-no.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-simple-no.png b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-simple-no.png
index eb90e216d..d510a80cd 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-simple-no.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-simple-no.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-simple-yes.png b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-simple-yes.png
index 5a714977e..e7a0c0ef7 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-simple-yes.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-simple-yes.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-yes.png b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-yes.png
index 8ba49bd26..9b83b8267 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-yes.png
+++ b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling-yes.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.py b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.py
index 9db878b0c..106483b7b 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.py
+++ b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
diff --git a/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.rst b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.rst
index a4e937a2e..2fa51c0a8 100644
--- a/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.rst
+++ b/sources/pyside6/doc/tutorials/basictutorial/widgetstyling.rst
@@ -23,7 +23,7 @@ to each component. As an example, look at the following simple snippet:
w.show()
sys.exit(app.exec())
-When you execute this code, you will see a simple `QLabel` aligned at the
+When you execute this code, you will see a simple ``QLabel`` aligned at the
center, and with a placeholder text.
.. image:: widgetstyling-simple-no.png
@@ -32,8 +32,8 @@ center, and with a placeholder text.
You can style your application using the CSS-like syntax.
For more information, see `Qt Style Sheets Reference`_.
-A `QLabel` can be styled differently by setting some of its CSS
-properties, such as `background-color` and `font-family`,
+A ``QLabel`` can be styled differently by setting some of its CSS
+properties, such as ``background-color`` and ``font-family``,
so let's see how does the code look like with these changes:
.. code-block:: python
@@ -55,7 +55,7 @@ so let's see how does the code look like with these changes:
w.show()
sys.exit(app.exec())
-Now when you run the code, notice that the `QLabel` looks different with your
+Now when you run the code, notice that the ``QLabel`` looks different with your
custom style:
.. image:: widgetstyling-simple-yes.png
@@ -64,15 +64,15 @@ custom style:
.. note::
- If you don't have the font `Titillium` installed, you can try with any
+ If you don't have the font ``Titillium`` installed, you can try with any
other you prefer.
- Remember you can list your installed fonts using `QFontDatabase`,
- specifically the `families()` method.
+ Remember you can list your installed fonts using ``QFontDatabase``,
+ specifically the ``families()`` method.
Styling each UI element separately like you did in the previous snippet is a
lot of work. The easier alternative for this is to use Qt Style Sheets,
-which is one or more `.qss` files defining the style for the UI elements in
+which is one or more ``.qss`` files defining the style for the UI elements in
your application.
More examples can be found in the `Qt Style Sheet Examples`_ documentation
@@ -94,7 +94,7 @@ Qt Style Sheets
It's recommended to create a full new Qt style to cover all the possible
corner cases.
-A `qss` file is quite similar to a CSS file, but you need to specify the Widget
+A ``qss`` file is quite similar to a CSS file, but you need to specify the Widget
component and optionally the name of the object::
QLabel {
@@ -105,8 +105,8 @@ component and optionally the name of the object::
font-size: 20px;
}
-The first style defines a `background-color` for all `QLabel` objects in your
-application, whereas the later one styles the `title` object only.
+The first style defines a ``background-color`` for all ``QLabel`` objects in your
+application, whereas the later one styles the ``title`` object only.
.. note::
@@ -115,8 +115,8 @@ application, whereas the later one styles the `title` object only.
`label.setObjectName("title")`
-Once you have a `qss` file for your application, you can apply it by reading
-the file and using the `QApplication.setStyleSheet(str)` function:
+Once you have a ``qss`` file for your application, you can apply it by reading
+the file and using the ``QApplication.setStyleSheet(str)`` function:
.. code-block:: python
@@ -132,7 +132,7 @@ the file and using the `QApplication.setStyleSheet(str)` function:
sys.exit(app.exec())
-Having a general `qss` file allows you to decouple the styling aspects of
+Having a general ``qss`` file allows you to decouple the styling aspects of
the code, without mixing it in the middle of the general functionality, and you
can simply enable it or disable it.
@@ -140,16 +140,16 @@ Look at this new example, with more widgets components:
.. literalinclude:: widgetstyling.py
:linenos:
- :lines: 59-81
+ :lines: 22-44
-This displays a two column widget, with a `QListWidget` on the left and a
-`QLabel` and a `QPushButton` on the right. It looks like this when you run the
+This displays a two column widget, with a ``QListWidget`` on the left and a
+``QLabel`` and a ``QPushButton`` on the right. It looks like this when you run the
code:
.. image:: widgetstyling-no.png
:alt: Widget with no style
-If you add content to the previously described `style.qss` file, you can modify
+If you add content to the previously described ``style.qss`` file, you can modify
the look-n-feel of the previous example:
.. literalinclude:: style.qss
@@ -161,7 +161,7 @@ You can also use state-based styling on the QListWidget *items* for example, to
style them differently depending on whether they are *selected* or not.
After applying all the styling alternatives you explored in this topic, notice
-that the `QLabel` example looks a lot different now.
+that the ``QLabel`` example looks a lot different now.
Try running the code to check its new look:
.. image:: widgetstyling-yes.png
diff --git a/sources/pyside6/doc/tutorials/datavisualize/add_chart.rst b/sources/pyside6/doc/tutorials/datavisualize/add_chart.rst
index 95b2092b3..59a9d9ee0 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/add_chart.rst
+++ b/sources/pyside6/doc/tutorials/datavisualize/add_chart.rst
@@ -14,7 +14,7 @@ previous chapter to add a QChartView:
.. literalinclude:: datavisualize5/main_widget.py
:linenos:
- :lines: 40-
- :emphasize-lines: 2-3,6,22-36,48-50
+ :lines: 3-
+ :emphasize-lines: 2-3,6,22-36,47-49
diff --git a/sources/pyside6/doc/tutorials/datavisualize/add_mainwindow.rst b/sources/pyside6/doc/tutorials/datavisualize/add_mainwindow.rst
index a9ff38a30..623372a07 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/add_mainwindow.rst
+++ b/sources/pyside6/doc/tutorials/datavisualize/add_mainwindow.rst
@@ -27,6 +27,6 @@ window size is defined based on available screen width (80%) and height (70%).
.. literalinclude:: datavisualize3/main_window.py
:language: python
:linenos:
- :lines: 40-
+ :lines: 4-
Try running the script to see what output you get with it.
diff --git a/sources/pyside6/doc/tutorials/datavisualize/add_tableview.rst b/sources/pyside6/doc/tutorials/datavisualize/add_tableview.rst
index 720918008..f658640bf 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/add_tableview.rst
+++ b/sources/pyside6/doc/tutorials/datavisualize/add_tableview.rst
@@ -19,7 +19,7 @@ you can use a QAbstractTableModel instance.
However, it's less flexible than a QTableView, as QTableWidget cannot be
used with just any data. For more insight about Qt's model-view framework,
refer to the
- `Model View Programming <http://doc.qt.io/qt-5/model-view-programming.html>`
+ `Model View Programming <https://doc.qt.io/qt-5/model-view-programming.html>`
documentation.
Implementing the model for your QTableView, allows you to:
@@ -39,7 +39,7 @@ Here is a script that implements the CustomTableModel:
.. literalinclude:: datavisualize4/table_model.py
:language: python
:linenos:
- :lines: 40-
+ :lines: 3-
Now, create a QWidget that has a QTableView, and connect it to your
CustomTableModel.
@@ -48,7 +48,7 @@ CustomTableModel.
:language: python
:linenos:
:emphasize-lines: 12-17
- :lines: 40-
+ :lines: 3-
You also need minor changes to the :code:`main_window.py` and
:code:`main.py` from chapter 3 to include the Widget inside the
@@ -59,12 +59,12 @@ In the following snippets you'll see those changes highlighted:
.. literalinclude:: datavisualize4/main_window.py
:language: python
:linenos:
- :lines: 40-
+ :lines: 3-
:emphasize-lines: 8,11
.. literalinclude:: datavisualize4/main.py
:language: python
:linenos:
- :lines: 40-
+ :lines: 3-
:emphasize-lines: 46-47
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize.tar.bz2 b/sources/pyside6/doc/tutorials/datavisualize/datavisualize.tar.bz2
deleted file mode 100644
index 5fe12769a..000000000
--- a/sources/pyside6/doc/tutorials/datavisualize/datavisualize.tar.bz2
+++ /dev/null
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize1/main.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize1/main.py
index 8a8a1dfda..995b9906a 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/datavisualize1/main.py
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize1/main.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import argparse
import pandas as pd
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize2/main.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize2/main.py
index 864cb1a6c..9ea96097c 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/datavisualize2/main.py
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize2/main.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import argparse
import pandas as pd
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize3/main.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize3/main.py
index 32aaea1d6..bbf85e17d 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/datavisualize3/main.py
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize3/main.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
import argparse
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize3/main_window.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize3/main_window.py
index 17fe0e141..745f2fefe 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/datavisualize3/main_window.py
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize3/main_window.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
from PySide6.QtCore import Slot
from PySide6.QtGui import QAction, QKeySequence
@@ -64,6 +27,5 @@ class MainWindow(QMainWindow):
self.status.showMessage("Data loaded and plotted")
# Window dimensions
- geometry = qApp.desktop().availableGeometry(self)
+ geometry = self.screen().availableGeometry()
self.setFixedSize(geometry.width() * 0.8, geometry.height() * 0.7)
-
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main.py
index b4d787993..87b962bd3 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main.py
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
import argparse
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main_widget.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main_widget.py
index 5113ae0b8..2a2bfeb09 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main_widget.py
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main_widget.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
from PySide6.QtWidgets import (QHBoxLayout, QHeaderView, QSizePolicy,
QTableView, QWidget)
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main_window.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main_window.py
index a60a4a1b1..ebe2997a1 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main_window.py
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/main_window.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
from PySide6.QtCore import Slot
from PySide6.QtGui import QAction, QKeySequence
@@ -64,6 +27,6 @@ class MainWindow(QMainWindow):
self.status.showMessage("Data loaded and plotted")
# Window dimensions
- geometry = qApp.desktop().availableGeometry(self)
+ geometry = self.screen().availableGeometry()
self.setFixedSize(geometry.width() * 0.8, geometry.height() * 0.7)
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/table_model.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/table_model.py
index 3ccf8162b..08eeeeed6 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/table_model.py
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize4/table_model.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
from PySide6.QtCore import Qt, QAbstractTableModel, QModelIndex
from PySide6.QtGui import QColor
@@ -75,7 +38,7 @@ class CustomTableModel(QAbstractTableModel):
if role == Qt.DisplayRole:
if column == 0:
date = self.input_dates[row].toPython()
- return date[:-3]
+ return str(date)[:-3]
elif column == 1:
magnitude = self.input_magnitudes[row]
return f"{magnitude:.2f}"
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main.py
index b4d787993..87b962bd3 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main.py
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
import argparse
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main_widget.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main_widget.py
index 0f9b14df3..15b7e97e5 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main_widget.py
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main_widget.py
@@ -1,48 +1,11 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
from PySide6.QtCore import QDateTime, Qt
from PySide6.QtGui import QPainter
from PySide6.QtWidgets import (QWidget, QHeaderView, QHBoxLayout, QTableView,
QSizePolicy)
-from PySide6.QtCharts import QtCharts
+from PySide6.QtCharts import QChart, QChartView, QLineSeries, QDateTimeAxis, QValueAxis
from table_model import CustomTableModel
@@ -66,11 +29,11 @@ class Widget(QWidget):
self.horizontal_header.setStretchLastSection(True)
# Creating QChart
- self.chart = QtCharts.QChart()
- self.chart.setAnimationOptions(QtCharts.QChart.AllAnimations)
+ self.chart = QChart()
+ self.chart.setAnimationOptions(QChart.AllAnimations)
# Creating QChartView
- self.chart_view = QtCharts.QChartView(self.chart)
+ self.chart_view = QChartView(self.chart)
self.chart_view.setRenderHint(QPainter.Antialiasing)
# QWidget Layout
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main_window.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main_window.py
index 4b0920133..ed12c1f8f 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main_window.py
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/main_window.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
from PySide6.QtCore import Slot
from PySide6.QtGui import QAction, QKeySequence
@@ -64,6 +27,6 @@ class MainWindow(QMainWindow):
self.status.showMessage("Data loaded and plotted")
# Window dimensions
- geometry = qApp.desktop().availableGeometry(self)
+ geometry = self.screen().availableGeometry()
self.setFixedSize(geometry.width() * 0.8, geometry.height() * 0.7)
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/table_model.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/table_model.py
index 3ccf8162b..08eeeeed6 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/table_model.py
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize5/table_model.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
from PySide6.QtCore import Qt, QAbstractTableModel, QModelIndex
from PySide6.QtGui import QColor
@@ -75,7 +38,7 @@ class CustomTableModel(QAbstractTableModel):
if role == Qt.DisplayRole:
if column == 0:
date = self.input_dates[row].toPython()
- return date[:-3]
+ return str(date)[:-3]
elif column == 1:
magnitude = self.input_magnitudes[row]
return f"{magnitude:.2f}"
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main.py
index e4466f7ca..2d851cc14 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main.py
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
import argparse
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main_widget.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main_widget.py
index d8132265d..cbcc126a1 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main_widget.py
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main_widget.py
@@ -1,48 +1,11 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
from PySide6.QtCore import QDateTime, Qt
from PySide6.QtGui import QPainter
from PySide6.QtWidgets import (QWidget, QHeaderView, QHBoxLayout, QTableView,
QSizePolicy)
-from PySide6.QtCharts import QtCharts
+from PySide6.QtCharts import QChart, QChartView, QLineSeries, QDateTimeAxis, QValueAxis
from table_model import CustomTableModel
@@ -67,12 +30,12 @@ class Widget(QWidget):
self.horizontal_header.setStretchLastSection(True)
# Creating QChart
- self.chart = QtCharts.QChart()
- self.chart.setAnimationOptions(QtCharts.QChart.AllAnimations)
+ self.chart = QChart()
+ self.chart.setAnimationOptions(QChart.AllAnimations)
self.add_series("Magnitude (Column 1)", [0, 1])
# Creating QChartView
- self.chart_view = QtCharts.QChartView(self.chart)
+ self.chart_view = QChartView(self.chart)
self.chart_view.setRenderHint(QPainter.Antialiasing)
# QWidget Layout
@@ -94,7 +57,7 @@ class Widget(QWidget):
def add_series(self, name, columns):
# Create QLineSeries
- self.series = QtCharts.QLineSeries()
+ self.series = QLineSeries()
self.series.setName(name)
# Filling QLineSeries
@@ -112,14 +75,14 @@ class Widget(QWidget):
self.chart.addSeries(self.series)
# Setting X-axis
- self.axis_x = QtCharts.QDateTimeAxis()
+ self.axis_x = QDateTimeAxis()
self.axis_x.setTickCount(10)
self.axis_x.setFormat("dd.MM (h:mm)")
self.axis_x.setTitleText("Date")
self.chart.addAxis(self.axis_x, Qt.AlignBottom)
self.series.attachAxis(self.axis_x)
# Setting Y-axis
- self.axis_y = QtCharts.QValueAxis()
+ self.axis_y = QValueAxis()
self.axis_y.setTickCount(10)
self.axis_y.setLabelFormat("%.2f")
self.axis_y.setTitleText("Magnitude")
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main_window.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main_window.py
index 450f6de41..116e53dc3 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main_window.py
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/main_window.py
@@ -1,45 +1,8 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
from PySide6.QtCore import Slot
-from PySide6.QtGui import QAction, QKeySequence
+from PySide6.QtGui import QAction, QKeySequence, QScreen
from PySide6.QtWidgets import QMainWindow
@@ -64,7 +27,6 @@ class MainWindow(QMainWindow):
self.status.showMessage("Data loaded and plotted")
# Window dimensions
- geometry = qApp.desktop().availableGeometry(self)
+ geometry = self.screen().availableGeometry()
self.setFixedSize(geometry.width() * 0.8, geometry.height() * 0.7)
self.setCentralWidget(widget)
-
diff --git a/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/table_model.py b/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/table_model.py
index f46d5d402..4952c0c38 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/table_model.py
+++ b/sources/pyside6/doc/tutorials/datavisualize/datavisualize6/table_model.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
from PySide6.QtCore import Qt, QAbstractTableModel, QModelIndex
from PySide6.QtGui import QColor
@@ -76,7 +39,7 @@ class CustomTableModel(QAbstractTableModel):
if role == Qt.DisplayRole:
if column == 0:
date = self.input_dates[row].toPython()
- return date[:-3]
+ return str(date)[:-3]
elif column == 1:
magnitude = self.input_magnitudes[row]
return f"{magnitude:.2f}"
diff --git a/sources/pyside6/doc/tutorials/datavisualize/filter_data.rst b/sources/pyside6/doc/tutorials/datavisualize/filter_data.rst
index b06b2fa15..edfac3862 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/filter_data.rst
+++ b/sources/pyside6/doc/tutorials/datavisualize/filter_data.rst
@@ -23,7 +23,7 @@ The following script filters and formats the CSV data as described earlier:
.. literalinclude:: datavisualize2/main.py
:language: python
:linenos:
- :lines: 40-
+ :lines: 3-
Now that you have a tuple of QDateTime and float data, try improving the
output further. That's what you'll learn in the following chapters.
diff --git a/sources/pyside6/doc/tutorials/datavisualize/images/datavisualization_app.png b/sources/pyside6/doc/tutorials/datavisualize/images/datavisualization_app.png
index ddac43fc3..8d7e4ba13 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/images/datavisualization_app.png
+++ b/sources/pyside6/doc/tutorials/datavisualize/images/datavisualization_app.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/datavisualize/index.rst b/sources/pyside6/doc/tutorials/datavisualize/index.rst
index ff18c654e..35b56706a 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/index.rst
+++ b/sources/pyside6/doc/tutorials/datavisualize/index.rst
@@ -8,6 +8,10 @@ US Geological Survey website. You could download the
`All earthquakes <https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.csv>`_
open data in a CSV format for this tutorial.
+.. image:: images/datavisualization_app.png
+ :width: 800
+ :alt: Data Visualization Screenshot
+
In the following chapters of this tutorial you'll learn how to
visualize data from a CSV in a line chart.
@@ -22,5 +26,6 @@ visualize data from a CSV in a line chart.
add_chart*
plot*
-You can download the sources from :download:`here <datavisualize.tar.bz2>`.
+You can download the sources from `here`_.
+.. _here: https://code.qt.io/cgit/pyside/pyside-setup.git/tree/sources/pyside6/doc/tutorials/datavisualize
diff --git a/sources/pyside6/doc/tutorials/datavisualize/plot_datapoints.rst b/sources/pyside6/doc/tutorials/datavisualize/plot_datapoints.rst
index 8ebdd2b08..f71fca4c8 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/plot_datapoints.rst
+++ b/sources/pyside6/doc/tutorials/datavisualize/plot_datapoints.rst
@@ -13,13 +13,15 @@ function to plot data using a QLineSeries:
.. literalinclude:: datavisualize6/main_widget.py
:language: python
:linenos:
- :lines: 40-
+ :lines: 3-
:emphasize-lines: 33,56-91
Now, run the application to visualize the earthquake magnitudes
data at different times.
.. image:: images/datavisualization_app.png
+ :width: 600
+ :alt: Data Visualization Screenshot
Try modifying the sources to get different output. For example, you could try
to plot more data from the CSV.
diff --git a/sources/pyside6/doc/tutorials/datavisualize/read_data.rst b/sources/pyside6/doc/tutorials/datavisualize/read_data.rst
index f7bf9337a..53b0d1cb0 100644
--- a/sources/pyside6/doc/tutorials/datavisualize/read_data.rst
+++ b/sources/pyside6/doc/tutorials/datavisualize/read_data.rst
@@ -18,7 +18,7 @@ The following python script, :code:`main.py`, demonstrates how to do it:
.. literalinclude:: datavisualize1/main.py
:language: python
:linenos:
- :lines: 40-
+ :lines: 3-
The Python script uses the :code:`argparse` module to accept and parse input
from the command line. It then uses the input, which in this case is the filename,
diff --git a/sources/pyside6/doc/tutorials/debugging/mixed_debugging.rst b/sources/pyside6/doc/tutorials/debugging/mixed_debugging.rst
new file mode 100644
index 000000000..85c326347
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/debugging/mixed_debugging.rst
@@ -0,0 +1,126 @@
+How To Debug a C++ Extension of a PySide6 Application?
+******************************************************
+
+When debugging PySide code, very often you would also like to debug the
+corresponding C++ extension of the PySide module. This is done by attaching your
+debugger to the Python interpreter. In this tutorial, we are going to take you
+through a comprehensive guide in building Qt 6, using the built Qt 6 to build
+PySide6, and then starting a debugging process in either *Qt Creator* or VSCode.
+
+With VSCode, you should be able to see the combined call stacks for both C++ and
+Python together. With *Qt Creator*, unfortunately you would only be able to
+debug the native C++ code of the PySide module; that is you won't be able to set
+breakpoints inside the Python code.
+
+.. note:: This tutorial is created on Ubuntu 20.04 LTS with the debugger as GDB.
+ As such, this tutorial is mainly focused on Linux users. Nevertheless, links to
+ setup everything in other platforms are mentioned along with each
+ sub-section.
+
+Let's get started.
+
+Install All The Library Dependencies Based on Your Platform
+-----------------------------------------------------------
+
+.. code-block:: bash
+
+ sudo apt install libfontconfig1-dev libfreetype6-dev \
+ libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev \
+ libxi-dev libxrender-dev libxcb1-dev libxcb-glx0-dev \
+ libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev \
+ libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev \
+ libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev \
+ libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev \
+ libxkbcommon-dev libxkbcommon-x11-dev libatspi2.0-dev \
+ libopengl0 -y
+
+If you have to use the Qt Multimedia module, you have to install gstreamer also.
+
+.. code-block:: bash
+
+ sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
+ libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base \
+ gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
+ gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc \
+ gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl \
+ gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
+
+Generally, any information on missing packages can be found by inspecting the
+config.summary in you CMake build folder.
+
+.. note:: For other platforms install the same packages using the instructions
+ mentioned here `Qt Install on Linux <https://doc.qt.io/qt-6/linux-requirements.html>`_
+
+Build Qt
+--------
+
+This is an optional step in case you only want to debug the CPython bindings or if you have DEBUG_SYMBOLS for Qt 6 already.
+
+There are multiple ways to build Qt - configure script or manually with CMake.
+Find the build system information `Qt 6 Build System
+<https://www.qt.io/blog/qt-6-build-system>`_.
+
+1. Get the source code.
+
+ .. code-block:: bash
+
+ git clone git://code.qt.io/qt/qt5.git
+ # Get submodules
+ cd qt5
+ perl init-repository
+
+2. Once you have the source code, the next step is to generate the build using
+ CMake, then building and installing it.
+
+ .. code-block:: bash
+
+ cmake -GNinja -DCMAKE_BUILD_TYPE=Debug \
+ -DCMAKE_INSTALL_PREFIX=/path/to/install/Qt -DBUILD_qtwebengine=OFF ..
+ cmake --build . --parallel
+ cmake --install .
+
+ As you notice here, we are skipping the Qt WebEngine module because this greatly
+ decreases the build time. However, PySide6 supports Qt WebEngine
+ features. So feel free to add it, if you need it.
+
+More instructions on building Qt 6 can be found in the following links:
+
+* https://wiki.qt.io/Building_Qt_6_from_Git
+* https://code.qt.io/cgit/qt/qtbase.git/tree/cmake/README.md
+* https://code.qt.io/cgit/qt/qtbase.git/tree/cmake/configure-cmake-mapping.md
+
+Add the **bin** and **lib** path to the environment variables
+--------------------------------------------------------------
+
+.. code-block:: bash
+
+ export PATH="/path/to/custom/qt/bin:$PATH"
+ export LD_LIBRARY_PATH="/path/to/custom/qt/lib:$LD_LIBRARY_PATH"
+
+Build PySide6 using the Qt 6 that you built earlier
+----------------------------------------------------
+
+Follow the steps mentioned `Getting Started - Qt for Python
+<https://doc.qt.io/qtforpython/gettingstarted/index.html>`_
+
+You may manually select the modules to install using the ``--module-subset`` cli
+argument for `setup.py`. This was my installation script
+
+.. code-block:: bash
+
+ python setup.py install --qpaths=/path/to/qpaths --debug \
+ --ignore-git --reuse-build
+
+It is recommended to use a Python virtual environment rather than installing in the global Python.
+
+Debugging the process using your preferred IDE
+----------------------------------------------
+
+The following sections guide you through the setup for *Qt Creator* or VSCode.
+
+.. toctree::
+ :glob:
+ :titlesonly:
+
+ qtcreator/qtcreator
+ vscode/vscode
diff --git a/sources/pyside6/doc/tutorials/debugging/qml_debugging.rst b/sources/pyside6/doc/tutorials/debugging/qml_debugging.rst
new file mode 100644
index 000000000..223e608fc
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/debugging/qml_debugging.rst
@@ -0,0 +1,32 @@
+Using Qt Creator's QML Debugger for a PySide6 QML Application
+*************************************************************
+
+Besides the C++ debugger, *Qt Creator* provides a `QML debugger`_ which lets you
+inspect JavaScript code. It works by connecting to a socket server run by the
+``QmlEngine`` instance. The port is passed on the command line. To enable it,
+add the below code to your QML application:
+
+.. code-block:: python
+
+ from argparse import ArgumentParser, RawTextHelpFormatter
+
+ ...
+
+ if __name__ == "__main__":
+ argument_parser = ArgumentParser(...)
+ argument_parser.add_argument("-qmljsdebugger", action="store",
+ help="Enable QML debugging")
+ options = argument_parser.parse_args()
+ if options.qmljsdebugger:
+ QQmlDebuggingEnabler.enableDebugging(True)
+ app = QApplication(sys.argv)
+
+
+For instructions on how to use the QML debugger, see
+`Debugging a Qt Quick Example Application`_.
+
+.. note:: The code should be removed or disabled when shipping the application
+ as it poses a security risk.
+
+.. _`QML debugger`: https://doc.qt.io/qtcreator/creator-debugging-qml.html
+.. _`Debugging a Qt Quick Example Application`: https://doc.qt.io/qtcreator/creator-qml-debugging-example.html
diff --git a/sources/pyside6/doc/tutorials/debugging/qtcreator/breakpoint_cpp.png b/sources/pyside6/doc/tutorials/debugging/qtcreator/breakpoint_cpp.png
new file mode 100644
index 000000000..c8197118e
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/debugging/qtcreator/breakpoint_cpp.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/debugging/qtcreator/custom_executable_create.png b/sources/pyside6/doc/tutorials/debugging/qtcreator/custom_executable_create.png
new file mode 100644
index 000000000..8362c3310
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/debugging/qtcreator/custom_executable_create.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/debugging/qtcreator/custom_executable_run_config.png b/sources/pyside6/doc/tutorials/debugging/qtcreator/custom_executable_run_config.png
new file mode 100644
index 000000000..4f0bbe3d4
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/debugging/qtcreator/custom_executable_run_config.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/debugging/qtcreator/qtcreator.rst b/sources/pyside6/doc/tutorials/debugging/qtcreator/qtcreator.rst
new file mode 100644
index 000000000..a78a67fad
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/debugging/qtcreator/qtcreator.rst
@@ -0,0 +1,39 @@
+Debugging PySide with Qt Creator (Linux)
+****************************************
+
+As opposed to VSCode, presently *Qt Creator* does not support mixed mode debugging.
+However, we can debug the C++ implementation of the corresponding Python PySide
+code. Unlike VSCode, *Qt Creator* provides a very easy interface to attach GDB to
+the Python interpreter. It saves you from doing all the extra configuration
+steps, that have to be done with VSCode.
+
+Here are the steps:
+
+1. Set a breakpoint on the C++ code.
+
+2. Go to Projects -> Run -> Run Configuration -> Add. This is going to open a
+ new window shown below.
+
+ .. image:: custom_executable_create.png
+ :alt: creation of custom executable
+ :align: center
+
+3. Click on Custom Executable and `Create` a new configuration. Feed in the
+ details like shown below.
+
+ .. image:: custom_executable_run_config.png
+ :alt: run configuration of custom executable
+ :align: center
+
+4. Debug -> Start Debugging -> Start Debugging Without Deployment.
+
+ .. image:: start_debugging_without_deployment.png
+ :alt: start debugging without deployment
+ :align: center
+
+You will now hit you breakpoint and can start debugging your code.
+
+.. image:: breakpoint_cpp.png
+ :alt: breakpoint cpp
+ :align: center
+
diff --git a/sources/pyside6/doc/tutorials/debugging/qtcreator/start_debugging_without_deployment.png b/sources/pyside6/doc/tutorials/debugging/qtcreator/start_debugging_without_deployment.png
new file mode 100644
index 000000000..9ce0688d3
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/debugging/qtcreator/start_debugging_without_deployment.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/debugging/vscode/audioformat_cpp.png b/sources/pyside6/doc/tutorials/debugging/vscode/audioformat_cpp.png
new file mode 100644
index 000000000..57577eea4
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/debugging/vscode/audioformat_cpp.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/debugging/vscode/audioformat_wrapper.png b/sources/pyside6/doc/tutorials/debugging/vscode/audioformat_wrapper.png
new file mode 100644
index 000000000..319577fea
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/debugging/vscode/audioformat_wrapper.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/debugging/vscode/breakpoint_gdb.png b/sources/pyside6/doc/tutorials/debugging/vscode/breakpoint_gdb.png
new file mode 100644
index 000000000..b9bc4acde
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/debugging/vscode/breakpoint_gdb.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/debugging/vscode/find_process_gdb.png b/sources/pyside6/doc/tutorials/debugging/vscode/find_process_gdb.png
new file mode 100644
index 000000000..65176d9bb
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/debugging/vscode/find_process_gdb.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/debugging/vscode/python_set_interpreter.png b/sources/pyside6/doc/tutorials/debugging/vscode/python_set_interpreter.png
new file mode 100644
index 000000000..1a26c9d9c
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/debugging/vscode/python_set_interpreter.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/debugging/vscode/vscode.rst b/sources/pyside6/doc/tutorials/debugging/vscode/vscode.rst
new file mode 100644
index 000000000..b2a527b0e
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/debugging/vscode/vscode.rst
@@ -0,0 +1,192 @@
+Debugging PySide with VSCode (Linux + Windows)
+**********************************************
+
+VSCode enables you to use more than one debugger in a single debugging session.
+This means that we can use Python PDB and GDB (or the MSVC debugger for Windows)
+in a single session. With VSCode you would be able to do the following:
+
+* See the call stacks for both Python and C++ together.
+* Put breakpoints in both the Python and the C++ code.
+* Step from Python to C++ code and vice versa.
+
+For Windows, see :ref:`creating_windows_debug_builds`.
+
+Let's get started with setting up everything and debugging a Python process.
+
+Setting the Python interpreter
+------------------------------
+
+In order to debug Python code, it is necessary to set the correct Python
+interpreter in VSCode - this will ensure that all Python integrations of VSCode
+use the same interpreter. However, this does not affect C++ debugging, and the
+Python executable path must be set for the corresponding launch target
+separately (see the section below).
+
+To set the Python interpreter, open a Python file and click the corresponding
+option on the right side of the VSCode status bar, which should look similar to
+this:
+
+.. image:: python_set_interpreter.png
+ :alt: set Python interpreter
+ :align: center
+
+Alternatively, open the VSCode command palette (F1 or Ctrl + Shift + P) and
+search for "Python: Select Interpreter".
+
+Creating Configurations in launch.json
+--------------------------------------
+
+``Run -> Add Configuration -> Python -> Python File``
+
+This should create a launch.json file which looks like this:
+
+.. code-block:: javascript
+
+ {
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Python: Current File",
+ "type": "python",
+ "request": "launch",
+ "program": "${file}",
+ "console": "integratedTerminal"
+ }
+ ]
+ }
+
+It should already consist of a configuration named "Python: Current File",
+which allows us to debug the current open Python file.
+
+Now, we need to add a configuration to attach the C++ debugger to the Python
+process that is already running in debug mode. If you have the C/C++ extension
+installed and the appropriate debugger for your system, VSCode should be able
+to automatically offer to add a configuration. On Linux, this is suggested with
+the name
+
+* "C/C++: (gdb) Attach"
+
+and on Windows with the name
+
+* "C/C++: (Windows) Attach"
+
+Your launch.json should now look like this on Linux:
+
+.. code-block:: javascript
+
+ {
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Python: Current File",
+ "type": "python",
+ "request": "launch",
+ "program": "${file}",
+ "console": "integratedTerminal"
+ },
+ {
+ "name": "(gdb) Attach",
+ "type": "cppdbg",
+ "request": "attach",
+ "program": "/path/to/python",
+ "processId": "${command:pickProcess}",
+ "MIMode": "gdb", "setupCommands": [
+ {
+ "description": "Enable pretty-printing for gdb",
+ "text": "-enable-pretty-printing",
+ "ignoreFailures": true
+ }
+ ]
+ }
+ ]
+ }
+
+And like this on Windows:
+
+.. code-block:: javascript
+
+ {
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Python: Current File",
+ "type": "python",
+ "request": "launch",
+ "program": "${file}",
+ "console": "integratedTerminal"
+ },
+ {
+ "name": "(Windows) Attach",
+ "type": "cppvsdbg",
+ "request": "attach",
+ "processId": "${command:pickProcess}",
+ }
+ ]
+ }
+
+For Linux, also make sure that the value of "program" refers to your Python
+interpreter inside your virtual environment (for Windows this is not needed).
+We need the processId to attach the gdb debugger to the process. With
+"${command:pickProcess}", we find the processId on the go, as we will see later.
+
+Now, we are ready to debug.
+
+Debug The Process
+-----------------
+
+1. Set a breakpoint in the Python code.
+
+2. Go to ``Run And Debug`` (Ctrl + Shift + D) and run the "Python: Current File"
+ by clicking the run symbol (green right-arrow). This will hit the breakpoint
+ and will halt the Python debugger.
+
+3. Using the drop-down menu change from "Python:
+ Current File" to "(gdb) Attach" or "(Windows) Attach". Your setup should now
+ look like this.
+
+ .. image:: breakpoint_gdb.png
+ :alt: breakpoint before attach gdb
+ :align: center
+
+4. Run "(gdb) Attach" or "(Windows) Attach" and this should ask you for the
+ processId of the Python process to which you want to attach the C++ debugger.
+ VSCode also lets you search for the process by its name.
+
+ .. tip:: You can find the processId by running ``ps aux | grep python``
+
+ .. image:: find_process_gdb.png
+ :alt: find process vscode
+ :align: center
+
+5. VSCode might now ask you for superuser permissions. In that case, type 'y'
+ and enter your password.
+
+ .. code-block:: bash
+
+ Superuser access is required to attach to a process. Attaching as
+ superuser can potentially harm your computer. Do you want to continue?
+ [y/N]_
+
+6. That is it. You should now be able to hit the breakpoints that you have set
+ on the C++ counterparts.
+
+ .. figure:: audioformat_wrapper.png
+ :alt: Breakpoint set on the shiboken wrapper class
+ :align: left
+
+ Breakpoint set on the shiboken wrapper class
+
+ .. figure:: audioformat_cpp.png
+ :alt: Breakpoint set on C++ implementation
+ :align: left
+
+ Breakpoint set on C++ implementation
diff --git a/sources/pyside6/doc/tutorials/expenses/expenses.rst b/sources/pyside6/doc/tutorials/expenses/expenses.rst
index aa672d781..2064488ae 100644
--- a/sources/pyside6/doc/tutorials/expenses/expenses.rst
+++ b/sources/pyside6/doc/tutorials/expenses/expenses.rst
@@ -1,6 +1,5 @@
-######################
Expenses Tool Tutorial
-######################
+======================
In this tutorial you will learn the following concepts:
* creating user interfaces programatically,
@@ -21,9 +20,9 @@ The requirements:
(`QPushButton <https://doc.qt.io/qtforpython/PySide6/QtWidgets/QPushButton.html>`_).
* A verification step to avoid invalid data entry.
* A chart to visualize the expense data
- (`QChart <https://doc.qt.io/qtforpython/PySide6/QtCharts/QtCharts.QChart.html>`_) that will
+ (`QChart <https://doc.qt.io/qtforpython/PySide6/QtCharts/QChart.html>`_) that will
be embedded in a chart view
- (`QChartView <https://doc.qt.io/qtforpython/PySide6/QtCharts/QtCharts.QChartView.html>`_).
+ (`QChartView <https://doc.qt.io/qtforpython/PySide6/QtCharts/QChartView.html>`_).
Empty window
------------
@@ -34,68 +33,41 @@ code block.
.. code-block:: python
:linenos:
- if __name__ == "__main__":
- app = QApplication([])
- # ...
- sys.exit(app.exec())
+ if __name__ == "__main__":
+ app = QApplication([])
+ # ...
+ sys.exit(app.exec())
Now, to start the development, create an empty window called `MainWindow`.
You could do that by defining a class that inherits from `QMainWindow`.
.. literalinclude:: steps/01-expenses.py
:linenos:
- :lines: 45-59
+ :lines: 8-22
:emphasize-lines: 1-4
Now that our class is defined, create an instance of it and call `show()`.
.. literalinclude:: steps/01-expenses.py
:linenos:
- :lines: 45-59
+ :lines: 8-22
:emphasize-lines: 10-12
Menu bar
--------
-Using a `QMainWindow` gives some features for free, among them a *menu bar*. To use it, you need
+Using a `QMainWindow` gives some features for free, among them a *menu bar*. To use it, you need
to call the method `menuBar()` and populate it inside the `MainWindow` class.
.. literalinclude:: steps/02-expenses.py
:linenos:
- :lines: 46-58
- :emphasize-lines: 6
+ :lines: 9-19
+ :emphasize-lines: 10
Notice that the code snippet adds a *File* menu with the *Exit* option only.
-First signal/slot connection
-----------------------------
-
-The *Exit* option must be connected to a slot that triggers the application to exit. The main
-idea to achieve this, is the following:
-
-.. code-block:: python
-
- element.signal_name.connect(slot_name)
-
-All the interface's elements could be connected through signals to certain slots,
-in the case of a `QAction`, the signal `triggered` can be used:
-
-.. code-block:: python
-
- exit_action.triggered.connect(slot_name)
-
-.. note:: Now a *slot* needs to be defined to exit the application, which can be done using
- `QApplication.quit()`. If we put all these concepts together you will end up with the
- following code:
-
-.. literalinclude:: steps/03-expenses.py
- :linenos:
- :lines: 56-65
- :emphasize-lines: 4, 8-10
-
-Notice that the decorator `@Slot()` is required for each slot you declare to properly
-register them. Slots are normal functions, but the main difference is that they
-will be invokable from `Signals` of QObjects when connected.
+The *Exit* option must be connected to a slot that triggers the application to exit. We pass
+``QWidget.close()`` here. After the last window has been closed, the application exits.
Empty widget and data
---------------------
@@ -108,13 +80,13 @@ Additionally, you will define example data to visualize later.
.. literalinclude:: steps/04-expenses.py
:linenos:
- :lines: 46-53
+ :lines: 8-15
With the `Widget` class in place, modify `MainWindow`'s initialization code
.. literalinclude:: steps/04-expenses.py
:linenos:
- :lines: 80-84
+ :lines: 37-40
Window layout
-------------
@@ -122,7 +94,7 @@ Window layout
Now that the main empty window is in place, you need to start adding widgets to achieve the main
goal of creating an expenses application.
-After declaring the example data, you can visualize it on a simple `QTableWidget`. To do so, you
+After declaring the example data, you can visualize it on a simple `QTableWidget`. To do so, you
will add this procedure to the `Widget` constructor.
.. warning:: Only for the example purpose a QTableWidget will be used,
@@ -131,7 +103,7 @@ will add this procedure to the `Widget` constructor.
.. literalinclude:: steps/05-expenses.py
:linenos:
- :lines: 48-73
+ :lines: 11-31
As you can see, the code also includes a `QHBoxLayout` that provides the container to place widgets
horizontally.
@@ -144,7 +116,7 @@ displayed below.
.. literalinclude:: steps/05-expenses.py
:linenos:
- :lines: 75-81
+ :lines: 33-39
Having this process on a separate method is a good practice to leave the constructor more readable,
and to split the main functions of the class in independent processes.
@@ -157,12 +129,12 @@ Because the data that is being used is just an example, you are required to incl
input items to the table, and extra buttons to clear the table's content, and also quit the
application.
-To distribute these input lines and buttons, you will use a `QVBoxLayout` that allows you to place
-elements vertically inside a layout.
+For input lines along with descriptive labels, you will use a `QFormLayout`. Then,
+you will nest the form layout into a `QVBoxLayout` along with the buttons.
.. literalinclude:: steps/06-expenses.py
:linenos:
- :lines: 64-80
+ :lines: 27-43
Leaving the table on the left side and these newly included widgets to the right side
will be just a matter to add a layout to our main `QHBoxLayout` as you saw in the previous
@@ -170,7 +142,7 @@ example:
.. literalinclude:: steps/06-expenses.py
:linenos:
- :lines: 42-47
+ :lines: 45-48
The next step will be connecting those new buttons to slots.
@@ -184,17 +156,19 @@ documentation <https://doc.qt.io/qtforpython/PySide6/QtWidgets/QAbstractButton.h
.. literalinclude:: steps/07-expenses.py
:linenos:
- :lines: 92-95
+ :lines: 50-52
As you can see on the previous lines, we are connecting each *clicked* signal to different slots.
In this example slots are normal class methods in charge of perform a determined task associated
-with our buttons. It is really important to decorate each method declaration with a `@Slot()`, in
-that way PySide6 knows internally how to register them into Qt.
+with our buttons. It is really important to decorate each method declaration with a `@Slot()`,
+that way, PySide6 knows internally how to register them into Qt and they
+will be invokable from `Signals` of QObjects when connected.
+
.. literalinclude:: steps/07-expenses.py
:linenos:
- :lines: 100-129
- :emphasize-lines: 2,16,28
+ :lines: 57-82
+ :emphasize-lines: 1, 23
Since these slots are methods, we can access the class variables, like our `QTableWidget` to
interact with it.
@@ -217,24 +191,21 @@ Verification step
Adding information to the table needs to be a critical action that require a verification step
to avoid adding invalid information, for example, empty information.
-You can use a signal from `QLineEdit` called *textChanged[str]* which will be emitted every
+You can use a signal from `QLineEdit` called *textChanged* which will be emitted every
time something inside changes, i.e.: each key stroke.
-Notice that this time, there is a *[str]* section on the signal, this means that the signal
-will also emit the value of the text that was changed, which will be really useful to verify
-the current content of the `QLineEdit`.
You can connect two different object's signal to the same slot, and this will be the case
for your current application:
.. literalinclude:: steps/08-expenses.py
:linenos:
- :lines: 99-100
+ :lines: 57-58
The content of the *check_disable* slot will be really simple:
.. literalinclude:: steps/08-expenses.py
:linenos:
- :lines: 119-124
+ :lines: 77-80
You have two options, write a verification based on the current value
of the string you retrieve, or manually get the whole content of both
@@ -256,15 +227,15 @@ side of your application.
.. literalinclude:: steps/09-expenses.py
:linenos:
- :lines: 66-68
+ :lines: 30-32
Additionally the order of how you include widgets to the right
`QVBoxLayout` will also change.
.. literalinclude:: steps/09-expenses.py
:linenos:
- :lines: 81-91
- :emphasize-lines: 9
+ :lines: 46-54
+ :emphasize-lines: 8
Notice that before we had a line with `self.right.addStretch()`
to fill up the vertical space between the *Add* and the *Clear* buttons,
@@ -280,8 +251,8 @@ to a slot that creates a chart and includes it into your `QChartView`.
.. literalinclude:: steps/10-expenses.py
:linenos:
- :lines: 103-109
- :emphasize-lines: 6
+ :lines: 62-67
+ :emphasize-lines: 3
That is nothing new, since you already did it for the other buttons,
but now take a look at how to create a chart and include it into
@@ -289,7 +260,7 @@ your `QChartView`.
.. literalinclude:: steps/10-expenses.py
:linenos:
- :lines: 139-151
+ :lines: 95-107
The following steps show how to fill a `QPieSeries`:
diff --git a/sources/pyside6/doc/tutorials/expenses/main.py b/sources/pyside6/doc/tutorials/expenses/main.py
index 76eea3440..a3a998470 100644
--- a/sources/pyside6/doc/tutorials/expenses/main.py
+++ b/sources/pyside6/doc/tutorials/expenses/main.py
@@ -1,55 +1,19 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
from PySide6.QtCore import Qt, Slot
-from PySide6.QtGui import QAction, QPainter
-from PySide6.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
- QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import (QApplication, QFormLayout, QHeaderView,
+ QHBoxLayout, QLineEdit, QMainWindow,
+ QPushButton, QTableWidget, QTableWidgetItem,
QVBoxLayout, QWidget)
-from PySide6.QtCharts import QtCharts
+from PySide6.QtCharts import QChartView, QPieSeries, QChart
class Widget(QWidget):
def __init__(self):
- QWidget.__init__(self)
+ super().__init__()
self.items = 0
# Example data
@@ -64,49 +28,43 @@ class Widget(QWidget):
self.table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
# Chart
- self.chart_view = QtCharts.QChartView()
+ self.chart_view = QChartView()
self.chart_view.setRenderHint(QPainter.Antialiasing)
# Right
self.description = QLineEdit()
+ self.description.setClearButtonEnabled(True)
self.price = QLineEdit()
+ self.price.setClearButtonEnabled(True)
+
self.add = QPushButton("Add")
self.clear = QPushButton("Clear")
- self.quit = QPushButton("Quit")
self.plot = QPushButton("Plot")
# Disabling 'Add' button
self.add.setEnabled(False)
+ form_layout = QFormLayout()
+ form_layout.addRow("Description", self.description)
+ form_layout.addRow("Price", self.price)
self.right = QVBoxLayout()
- self.right.setMargin(10)
- self.right.addWidget(QLabel("Description"))
- self.right.addWidget(self.description)
- self.right.addWidget(QLabel("Price"))
- self.right.addWidget(self.price)
+ self.right.addLayout(form_layout)
self.right.addWidget(self.add)
self.right.addWidget(self.plot)
self.right.addWidget(self.chart_view)
self.right.addWidget(self.clear)
- self.right.addWidget(self.quit)
# QWidget Layout
- self.layout = QHBoxLayout()
-
- #self.table_view.setSizePolicy(size)
+ self.layout = QHBoxLayout(self)
self.layout.addWidget(self.table)
self.layout.addLayout(self.right)
- # Set the layout to the QWidget
- self.setLayout(self.layout)
-
# Signals and Slots
self.add.clicked.connect(self.add_element)
- self.quit.clicked.connect(self.quit_application)
self.plot.clicked.connect(self.plot_data)
self.clear.clicked.connect(self.clear_table)
- self.description.textChanged[str].connect(self.check_disable)
- self.price.textChanged[str].connect(self.check_disable)
+ self.description.textChanged.connect(self.check_disable)
+ self.price.textChanged.connect(self.check_disable)
# Fill example data
self.fill_table()
@@ -114,46 +72,40 @@ class Widget(QWidget):
@Slot()
def add_element(self):
des = self.description.text()
- price = self.price.text()
+ price = float(self.price.text())
self.table.insertRow(self.items)
description_item = QTableWidgetItem(des)
- price_item = QTableWidgetItem(f"{float(price):.2f}")
+ price_item = QTableWidgetItem(f"{price:.2f}")
price_item.setTextAlignment(Qt.AlignRight)
self.table.setItem(self.items, 0, description_item)
self.table.setItem(self.items, 1, price_item)
- self.description.setText("")
- self.price.setText("")
+ self.description.clear()
+ self.price.clear()
self.items += 1
@Slot()
def check_disable(self, s):
- if not self.description.text() or not self.price.text():
- self.add.setEnabled(False)
- else:
- self.add.setEnabled(True)
+ enabled = bool(self.description.text() and self.price.text())
+ self.add.setEnabled(enabled)
@Slot()
def plot_data(self):
# Get table information
- series = QtCharts.QPieSeries()
+ series = QPieSeries()
for i in range(self.table.rowCount()):
text = self.table.item(i, 0).text()
number = float(self.table.item(i, 1).text())
series.append(text, number)
- chart = QtCharts.QChart()
+ chart = QChart()
chart.addSeries(series)
chart.legend().setAlignment(Qt.AlignLeft)
self.chart_view.setChart(chart)
- @Slot()
- def quit_application(self):
- QApplication.quit()
-
def fill_table(self, data=None):
data = self._data if not data else data
for desc, price in data.items():
@@ -173,7 +125,7 @@ class Widget(QWidget):
class MainWindow(QMainWindow):
def __init__(self, widget):
- QMainWindow.__init__(self)
+ super().__init__()
self.setWindowTitle("Tutorial")
# Menu
@@ -181,17 +133,11 @@ class MainWindow(QMainWindow):
self.file_menu = self.menu.addMenu("File")
# Exit QAction
- exit_action = QAction("Exit", self)
+ exit_action = self.file_menu.addAction("Exit", self.close)
exit_action.setShortcut("Ctrl+Q")
- exit_action.triggered.connect(self.exit_app)
- self.file_menu.addAction(exit_action)
self.setCentralWidget(widget)
- @Slot()
- def exit_app(self, checked):
- QApplication.quit()
-
if __name__ == "__main__":
# Qt Application
diff --git a/sources/pyside6/doc/tutorials/expenses/main_snake_prop.py b/sources/pyside6/doc/tutorials/expenses/main_snake_prop.py
index d529391b5..055544409 100644
--- a/sources/pyside6/doc/tutorials/expenses/main_snake_prop.py
+++ b/sources/pyside6/doc/tutorials/expenses/main_snake_prop.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2020 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
from PySide6.QtCore import QMargins, Qt, Slot, QSize
@@ -98,7 +61,7 @@ class Widget(QWidget):
#self.table_view.setSizePolicy(size)
self.layout.add_widget(self.table)
- self.layout.add_layout(self.right)
+ self.layout.form_layout(self.right)
# Set the layout to the QWidget
self.set_layout(self.layout)
@@ -119,18 +82,22 @@ class Widget(QWidget):
des = self.description.text
price = self.price.text
- self.table.insert_row(self.items)
- description_item = QTableWidgetItem(des)
- price_item = QTableWidgetItem(f"{float(price):.2f}")
- price_item.text_alignment = Qt.AlignRight
+ try:
+ price_item = QTableWidgetItem(f"{float(price):.2f}")
+ price_item.text_alignment = Qt.AlignRight
+
+ self.table.insert_row(self.items)
+ description_item = QTableWidgetItem(des)
- self.table.set_item(self.items, 0, description_item)
- self.table.set_item(self.items, 1, price_item)
+ self.table.set_item(self.items, 0, description_item)
+ self.table.set_item(self.items, 1, price_item)
- self.description.text = ""
- self.price.text = ""
+ self.description.text = ""
+ self.price.text = ""
- self.items += 1
+ self.items += 1
+ except ValueError:
+ print("Wrong price", price)
@Slot()
def check_disable(self, s):
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/01-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/01-expenses.py
index c4dc9b3f6..27f2aef65 100644
--- a/sources/pyside6/doc/tutorials/expenses/steps/01-expenses.py
+++ b/sources/pyside6/doc/tutorials/expenses/steps/01-expenses.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
from PySide6.QtWidgets import QApplication, QMainWindow
@@ -44,7 +7,7 @@ from PySide6.QtWidgets import QApplication, QMainWindow
class MainWindow(QMainWindow):
def __init__(self):
- QMainWindow.__init__(self)
+ super().__init__()
self.setWindowTitle("Tutorial")
if __name__ == "__main__":
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/02-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/02-expenses.py
index 5899ae798..039b818df 100644
--- a/sources/pyside6/doc/tutorials/expenses/steps/02-expenses.py
+++ b/sources/pyside6/doc/tutorials/expenses/steps/02-expenses.py
@@ -1,51 +1,13 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
-from PySide6.QtGui import QAction
from PySide6.QtWidgets import QApplication, QMainWindow
class MainWindow(QMainWindow):
def __init__(self):
- QMainWindow.__init__(self)
+ super().__init__()
self.setWindowTitle("Tutorial")
# Menu
@@ -53,11 +15,9 @@ class MainWindow(QMainWindow):
self.file_menu = self.menu.addMenu("File")
# Exit QAction
- exit_action = QAction("Exit", self)
+ exit_action = self.file_menu.addAction("Exit", self.close)
exit_action.setShortcut("Ctrl+Q")
- self.file_menu.addAction(exit_action)
-
if __name__ == "__main__":
# Qt Application
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/03-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/03-expenses.py
index d0ecd6844..039b818df 100644
--- a/sources/pyside6/doc/tutorials/expenses/steps/03-expenses.py
+++ b/sources/pyside6/doc/tutorials/expenses/steps/03-expenses.py
@@ -1,53 +1,13 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
-from PySide6.QtCore import Slot
-from PySide6.QtGui import QAction
from PySide6.QtWidgets import QApplication, QMainWindow
-from PySide6.QtCharts import QtCharts
class MainWindow(QMainWindow):
def __init__(self):
- QMainWindow.__init__(self)
+ super().__init__()
self.setWindowTitle("Tutorial")
# Menu
@@ -55,15 +15,8 @@ class MainWindow(QMainWindow):
self.file_menu = self.menu.addMenu("File")
# Exit QAction
- exit_action = QAction("Exit", self)
+ exit_action = self.file_menu.addAction("Exit", self.close)
exit_action.setShortcut("Ctrl+Q")
- exit_action.triggered.connect(self.exit_app)
-
- self.file_menu.addAction(exit_action)
-
- @Slot()
- def exit_app(self, checked):
- QApplication.quit()
if __name__ == "__main__":
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/04-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/04-expenses.py
index 7f7df478a..6723690a8 100644
--- a/sources/pyside6/doc/tutorials/expenses/steps/04-expenses.py
+++ b/sources/pyside6/doc/tutorials/expenses/steps/04-expenses.py
@@ -1,52 +1,13 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
-from PySide6.QtCore import Slot
-from PySide6.QtGui import QAction
from PySide6.QtWidgets import QApplication, QMainWindow, QWidget
class Widget(QWidget):
def __init__(self):
- QWidget.__init__(self)
+ super().__init__()
# Example data
self._data = {"Water": 24.5, "Electricity": 55.1, "Rent": 850.0,
@@ -56,7 +17,7 @@ class Widget(QWidget):
class MainWindow(QMainWindow):
def __init__(self, widget):
- QMainWindow.__init__(self)
+ super().__init__()
self.setWindowTitle("Tutorial")
# Menu
@@ -64,17 +25,11 @@ class MainWindow(QMainWindow):
self.file_menu = self.menu.addMenu("File")
# Exit QAction
- exit_action = QAction("Exit", self)
+ exit_action = self.file_menu.addAction("Exit", self.close)
exit_action.setShortcut("Ctrl+Q")
- exit_action.triggered.connect(self.exit_app)
- self.file_menu.addAction(exit_action)
self.setCentralWidget(widget)
- @Slot()
- def exit_app(self, checked):
- QApplication.quit()
-
if __name__ == "__main__":
# Qt Application
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/05-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/05-expenses.py
index b88c9a7d8..df0362fde 100644
--- a/sources/pyside6/doc/tutorials/expenses/steps/05-expenses.py
+++ b/sources/pyside6/doc/tutorials/expenses/steps/05-expenses.py
@@ -1,53 +1,15 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
-from PySide6.QtCore import Slot
-from PySide6.QtGui import QAction
-from PySide6.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QMainWindow,
- QTableWidget, QTableWidgetItem, QWidget)
+from PySide6.QtWidgets import (QApplication, QHeaderView, QHBoxLayout,
+ QMainWindow, QTableWidget, QTableWidgetItem,
+ QWidget)
class Widget(QWidget):
def __init__(self):
- QWidget.__init__(self)
+ super().__init__()
self.items = 0
# Example data
@@ -62,14 +24,9 @@ class Widget(QWidget):
self.table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
# QWidget Layout
- self.layout = QHBoxLayout()
-
- #self.table_view.setSizePolicy(size)
+ self.layout = QHBoxLayout(self)
self.layout.addWidget(self.table)
- # Set the layout to the QWidget
- self.setLayout(self.layout)
-
# Fill example data
self.fill_table()
@@ -84,7 +41,7 @@ class Widget(QWidget):
class MainWindow(QMainWindow):
def __init__(self, widget):
- QMainWindow.__init__(self)
+ super().__init__()
self.setWindowTitle("Tutorial")
# Menu
@@ -92,17 +49,11 @@ class MainWindow(QMainWindow):
self.file_menu = self.menu.addMenu("File")
# Exit QAction
- exit_action = QAction("Exit", self)
+ exit_action = self.file_menu.addAction("Exit", self.close)
exit_action.setShortcut("Ctrl+Q")
- exit_action.triggered.connect(self.exit_app)
- self.file_menu.addAction(exit_action)
self.setCentralWidget(widget)
- @Slot()
- def exit_app(self, checked):
- QApplication.quit()
-
if __name__ == "__main__":
# Qt Application
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/06-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/06-expenses.py
index f65ede982..d19a6220f 100644
--- a/sources/pyside6/doc/tutorials/expenses/steps/06-expenses.py
+++ b/sources/pyside6/doc/tutorials/expenses/steps/06-expenses.py
@@ -1,54 +1,16 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
-from PySide6.QtCore import Slot
-from PySide6.QtGui import QAction
-from PySide6.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
- QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
- QVBoxLayout, QWidget)
+from PySide6.QtWidgets import (QApplication, QFormLayout, QHeaderView,
+ QHBoxLayout, QLineEdit, QMainWindow, QPushButton,
+ QTableWidget, QTableWidgetItem, QVBoxLayout,
+ QWidget)
class Widget(QWidget):
def __init__(self):
- QWidget.__init__(self)
+ super().__init__()
self.items = 0
# Example data
@@ -64,32 +26,27 @@ class Widget(QWidget):
# Right
self.description = QLineEdit()
+ self.description.setClearButtonEnabled(True)
self.price = QLineEdit()
+ self.price.setClearButtonEnabled(True)
+
self.add = QPushButton("Add")
self.clear = QPushButton("Clear")
- self.quit = QPushButton("Quit")
+ form_layout = QFormLayout()
+ form_layout.addRow("Description", self.description)
+ form_layout.addRow("Price", self.price)
self.right = QVBoxLayout()
- self.right.setMargin(10)
- self.right.addWidget(QLabel("Description"))
- self.right.addWidget(self.description)
- self.right.addWidget(QLabel("Price"))
- self.right.addWidget(self.price)
+ self.right.addLayout(form_layout)
self.right.addWidget(self.add)
self.right.addStretch()
self.right.addWidget(self.clear)
- self.right.addWidget(self.quit)
# QWidget Layout
- self.layout = QHBoxLayout()
-
- #self.table_view.setSizePolicy(size)
+ self.layout = QHBoxLayout(self)
self.layout.addWidget(self.table)
self.layout.addLayout(self.right)
- # Set the layout to the QWidget
- self.setLayout(self.layout)
-
# Fill example data
self.fill_table()
@@ -104,7 +61,7 @@ class Widget(QWidget):
class MainWindow(QMainWindow):
def __init__(self, widget):
- QMainWindow.__init__(self)
+ super().__init__()
self.setWindowTitle("Tutorial")
# Menu
@@ -112,17 +69,11 @@ class MainWindow(QMainWindow):
self.file_menu = self.menu.addMenu("File")
# Exit QAction
- exit_action = QAction("Exit", self)
+ exit_action = self.file_menu.addAction("Exit", self.close)
exit_action.setShortcut("Ctrl+Q")
- exit_action.triggered.connect(self.exit_app)
- self.file_menu.addAction(exit_action)
self.setCentralWidget(widget)
- @Slot()
- def exit_app(self, checked):
- QApplication.quit()
-
if __name__ == "__main__":
# Qt Application
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/07-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/07-expenses.py
index cdae2a847..b1ed3fecc 100644
--- a/sources/pyside6/doc/tutorials/expenses/steps/07-expenses.py
+++ b/sources/pyside6/doc/tutorials/expenses/steps/07-expenses.py
@@ -1,54 +1,17 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
from PySide6.QtCore import Slot
-from PySide6.QtGui import QAction
-from PySide6.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
- QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
- QVBoxLayout, QWidget)
+from PySide6.QtWidgets import (QApplication, QFormLayout, QHeaderView,
+ QHBoxLayout, QLineEdit, QMainWindow, QPushButton,
+ QTableWidget, QTableWidgetItem, QVBoxLayout,
+ QWidget)
class Widget(QWidget):
def __init__(self):
- QWidget.__init__(self)
+ super().__init__()
self.items = 0
# Example data
@@ -64,34 +27,28 @@ class Widget(QWidget):
# Right
self.description = QLineEdit()
+ self.description.setClearButtonEnabled(True)
self.price = QLineEdit()
+ self.price.setClearButtonEnabled(True)
+
self.add = QPushButton("Add")
self.clear = QPushButton("Clear")
- self.quit = QPushButton("Quit")
+ form_layout = QFormLayout()
+ form_layout.addRow("Description", self.description)
+ form_layout.addRow("Price", self.price)
self.right = QVBoxLayout()
- self.right.setMargin(10)
- self.right.addWidget(QLabel("Description"))
- self.right.addWidget(self.description)
- self.right.addWidget(QLabel("Price"))
- self.right.addWidget(self.price)
+ self.right.addLayout(form_layout)
self.right.addWidget(self.add)
self.right.addStretch()
- self.right.addWidget(self.quit)
# QWidget Layout
- self.layout = QHBoxLayout()
-
- #self.table_view.setSizePolicy(size)
+ self.layout = QHBoxLayout(self)
self.layout.addWidget(self.table)
self.layout.addLayout(self.right)
- # Set the layout to the QWidget
- self.setLayout(self.layout)
-
# Signals and Slots
self.add.clicked.connect(self.add_element)
- self.quit.clicked.connect(self.quit_application)
self.clear.clicked.connect(self.clear_table)
# Fill example data
@@ -106,15 +63,11 @@ class Widget(QWidget):
self.table.setItem(self.items, 0, QTableWidgetItem(des))
self.table.setItem(self.items, 1, QTableWidgetItem(price))
- self.description.setText("")
- self.price.setText("")
+ self.description.clear()
+ self.price.clear()
self.items += 1
- @Slot()
- def quit_application(self):
- QApplication.quit()
-
def fill_table(self, data=None):
data = self._data if not data else data
for desc, price in data.items():
@@ -131,7 +84,7 @@ class Widget(QWidget):
class MainWindow(QMainWindow):
def __init__(self, widget):
- QMainWindow.__init__(self)
+ super().__init__()
self.setWindowTitle("Tutorial")
# Menu
@@ -139,17 +92,11 @@ class MainWindow(QMainWindow):
self.file_menu = self.menu.addMenu("File")
# Exit QAction
- exit_action = QAction("Exit", self)
+ exit_action = self.file_menu.addAction("Exit", self.close)
exit_action.setShortcut("Ctrl+Q")
- exit_action.triggered.connect(self.exit_app)
- self.file_menu.addAction(exit_action)
self.setCentralWidget(widget)
- @Slot()
- def exit_app(self, checked):
- QApplication.quit()
-
if __name__ == "__main__":
# Qt Application
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/08-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/08-expenses.py
index 907ee253b..0e7e21a32 100644
--- a/sources/pyside6/doc/tutorials/expenses/steps/08-expenses.py
+++ b/sources/pyside6/doc/tutorials/expenses/steps/08-expenses.py
@@ -1,54 +1,17 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
from PySide6.QtCore import Slot
-from PySide6.QtGui import QAction
-from PySide6.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
- QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
- QVBoxLayout, QWidget)
+from PySide6.QtWidgets import (QApplication, QFormLayout, QHeaderView,
+ QHBoxLayout, QLineEdit, QMainWindow, QPushButton,
+ QTableWidget, QTableWidgetItem, QVBoxLayout,
+ QWidget)
class Widget(QWidget):
def __init__(self):
- QWidget.__init__(self)
+ super().__init__()
self.items = 0
# Example data
@@ -64,41 +27,35 @@ class Widget(QWidget):
# Right
self.description = QLineEdit()
+ self.description.setClearButtonEnabled(True)
self.price = QLineEdit()
+ self.price.setClearButtonEnabled(True)
+
self.add = QPushButton("Add")
self.clear = QPushButton("Clear")
- self.quit = QPushButton("Quit")
# Disabling 'Add' button
self.add.setEnabled(False)
+ form_layout = QFormLayout()
+ form_layout.addRow("Description", self.description)
+ form_layout.addRow("Price", self.price)
self.right = QVBoxLayout()
- self.right.setMargin(10)
- self.right.addWidget(QLabel("Description"))
- self.right.addWidget(self.description)
- self.right.addWidget(QLabel("Price"))
- self.right.addWidget(self.price)
+ self.right.addLayout(form_layout)
self.right.addWidget(self.add)
self.right.addStretch()
self.right.addWidget(self.clear)
- self.right.addWidget(self.quit)
# QWidget Layout
- self.layout = QHBoxLayout()
-
- #self.table_view.setSizePolicy(size)
+ self.layout = QHBoxLayout(self)
self.layout.addWidget(self.table)
self.layout.addLayout(self.right)
- # Set the layout to the QWidget
- self.setLayout(self.layout)
-
# Signals and Slots
self.add.clicked.connect(self.add_element)
- self.quit.clicked.connect(self.quit_application)
self.clear.clicked.connect(self.clear_table)
- self.description.textChanged[str].connect(self.check_disable)
- self.price.textChanged[str].connect(self.check_disable)
+ self.description.textChanged.connect(self.check_disable)
+ self.price.textChanged.connect(self.check_disable)
# Fill example data
self.fill_table()
@@ -112,21 +69,15 @@ class Widget(QWidget):
self.table.setItem(self.items, 0, QTableWidgetItem(des))
self.table.setItem(self.items, 1, QTableWidgetItem(price))
- self.description.setText("")
- self.price.setText("")
+ self.description.clear()
+ self.price.clear()
self.items += 1
@Slot()
def check_disable(self, s):
- if not self.description.text() or not self.price.text():
- self.add.setEnabled(False)
- else:
- self.add.setEnabled(True)
-
- @Slot()
- def quit_application(self):
- QApplication.quit()
+ enabled = bool(self.description.text() and self.price.text())
+ self.add.setEnabled(enabled)
def fill_table(self, data=None):
data = self._data if not data else data
@@ -144,7 +95,7 @@ class Widget(QWidget):
class MainWindow(QMainWindow):
def __init__(self, widget):
- QMainWindow.__init__(self)
+ super().__init__()
self.setWindowTitle("Tutorial")
# Menu
@@ -152,17 +103,11 @@ class MainWindow(QMainWindow):
self.file_menu = self.menu.addMenu("File")
# Exit QAction
- exit_action = QAction("Exit", self)
+ exit_action = self.file_menu.addAction("Exit", self.close)
exit_action.setShortcut("Ctrl+Q")
- exit_action.triggered.connect(self.exit_app)
- self.file_menu.addAction(exit_action)
self.setCentralWidget(widget)
- @Slot()
- def exit_app(self, checked):
- QApplication.quit()
-
if __name__ == "__main__":
# Qt Application
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/09-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/09-expenses.py
index 7c4f7b252..279a46512 100644
--- a/sources/pyside6/doc/tutorials/expenses/steps/09-expenses.py
+++ b/sources/pyside6/doc/tutorials/expenses/steps/09-expenses.py
@@ -1,55 +1,19 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
from PySide6.QtCore import Slot
-from PySide6.QtGui import QAction, QPainter
-from PySide6.QtWidgets import (QApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
- QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import (QApplication, QFormLayout, QHeaderView,
+ QHBoxLayout, QLineEdit, QMainWindow,
+ QPushButton, QTableWidget, QTableWidgetItem,
QVBoxLayout, QWidget)
-from PySide6.QtCharts import QtCharts
+from PySide6.QtCharts import QChartView
class Widget(QWidget):
def __init__(self):
- QWidget.__init__(self)
+ super().__init__()
self.items = 0
# Example data
@@ -64,48 +28,42 @@ class Widget(QWidget):
self.table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
# Chart
- self.chart_view = QtCharts.QChartView()
+ self.chart_view = QChartView()
self.chart_view.setRenderHint(QPainter.Antialiasing)
# Right
self.description = QLineEdit()
+ self.description.setClearButtonEnabled(True)
self.price = QLineEdit()
+ self.price.setClearButtonEnabled(True)
self.add = QPushButton("Add")
self.clear = QPushButton("Clear")
- self.quit = QPushButton("Quit")
self.plot = QPushButton("Plot")
# Disabling 'Add' button
self.add.setEnabled(False)
+ form_layout = QFormLayout()
+ form_layout.addRow("Description", self.description)
+ form_layout.addRow("Price", self.price)
self.right = QVBoxLayout()
- self.right.setMargin(10)
- self.right.addWidget(QLabel("Description"))
- self.right.addWidget(self.description)
- self.right.addWidget(QLabel("Price"))
- self.right.addWidget(self.price)
+ self.right.addLayout(form_layout)
self.right.addWidget(self.add)
self.right.addWidget(self.plot)
self.right.addWidget(self.chart_view)
self.right.addWidget(self.clear)
- self.right.addWidget(self.quit)
# QWidget Layout
- self.layout = QHBoxLayout()
+ self.layout = QHBoxLayout(self)
- #self.table_view.setSizePolicy(size)
self.layout.addWidget(self.table)
self.layout.addLayout(self.right)
- # Set the layout to the QWidget
- self.setLayout(self.layout)
-
# Signals and Slots
self.add.clicked.connect(self.add_element)
- self.quit.clicked.connect(self.quit_application)
self.clear.clicked.connect(self.clear_table)
- self.description.textChanged[str].connect(self.check_disable)
- self.price.textChanged[str].connect(self.check_disable)
+ self.description.textChanged.connect(self.check_disable)
+ self.price.textChanged.connect(self.check_disable)
# Fill example data
self.fill_table()
@@ -119,21 +77,15 @@ class Widget(QWidget):
self.table.setItem(self.items, 0, QTableWidgetItem(des))
self.table.setItem(self.items, 1, QTableWidgetItem(price))
- self.description.setText("")
- self.price.setText("")
+ self.description.clear()
+ self.price.clear()
self.items += 1
@Slot()
def check_disable(self, s):
- if not self.description.text() or not self.price.text():
- self.add.setEnabled(False)
- else:
- self.add.setEnabled(True)
-
- @Slot()
- def quit_application(self):
- QApplication.quit()
+ enabled = bool(self.description.text() and self.price.text())
+ self.add.setEnabled(enabled)
def fill_table(self, data=None):
data = self._data if not data else data
@@ -151,7 +103,7 @@ class Widget(QWidget):
class MainWindow(QMainWindow):
def __init__(self, widget):
- QMainWindow.__init__(self)
+ super().__init__()
self.setWindowTitle("Tutorial")
# Menu
@@ -159,17 +111,11 @@ class MainWindow(QMainWindow):
self.file_menu = self.menu.addMenu("File")
# Exit QAction
- exit_action = QAction("Exit", self)
+ exit_action = self.file_menu.addAction("Exit", self.close)
exit_action.setShortcut("Ctrl+Q")
- exit_action.triggered.connect(self.exit_app)
- self.file_menu.addAction(exit_action)
self.setCentralWidget(widget)
- @Slot()
- def exit_app(self, checked):
- QApplication.quit()
-
if __name__ == "__main__":
# Qt Application
diff --git a/sources/pyside6/doc/tutorials/expenses/steps/10-expenses.py b/sources/pyside6/doc/tutorials/expenses/steps/10-expenses.py
index 1ad6c3743..a3a998470 100644
--- a/sources/pyside6/doc/tutorials/expenses/steps/10-expenses.py
+++ b/sources/pyside6/doc/tutorials/expenses/steps/10-expenses.py
@@ -1,55 +1,19 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
from PySide6.QtCore import Qt, Slot
-from PySide6.QtGui import QAction, QPainter
-from PySide6.QtWidgets import (QQApplication, QHeaderView, QHBoxLayout, QLabel, QLineEdit,
- QMainWindow, QPushButton, QTableWidget, QTableWidgetItem,
+from PySide6.QtGui import QPainter
+from PySide6.QtWidgets import (QApplication, QFormLayout, QHeaderView,
+ QHBoxLayout, QLineEdit, QMainWindow,
+ QPushButton, QTableWidget, QTableWidgetItem,
QVBoxLayout, QWidget)
-from PySide6.QtCharts import QtCharts
+from PySide6.QtCharts import QChartView, QPieSeries, QChart
class Widget(QWidget):
def __init__(self):
- QWidget.__init__(self)
+ super().__init__()
self.items = 0
# Example data
@@ -64,49 +28,43 @@ class Widget(QWidget):
self.table.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
# Chart
- self.chart_view = QtCharts.QChartView()
+ self.chart_view = QChartView()
self.chart_view.setRenderHint(QPainter.Antialiasing)
# Right
self.description = QLineEdit()
+ self.description.setClearButtonEnabled(True)
self.price = QLineEdit()
+ self.price.setClearButtonEnabled(True)
+
self.add = QPushButton("Add")
self.clear = QPushButton("Clear")
- self.quit = QPushButton("Quit")
self.plot = QPushButton("Plot")
# Disabling 'Add' button
self.add.setEnabled(False)
+ form_layout = QFormLayout()
+ form_layout.addRow("Description", self.description)
+ form_layout.addRow("Price", self.price)
self.right = QVBoxLayout()
- self.right.setMargin(10)
- self.right.addWidget(QLabel("Description"))
- self.right.addWidget(self.description)
- self.right.addWidget(QLabel("Price"))
- self.right.addWidget(self.price)
+ self.right.addLayout(form_layout)
self.right.addWidget(self.add)
self.right.addWidget(self.plot)
self.right.addWidget(self.chart_view)
self.right.addWidget(self.clear)
- self.right.addWidget(self.quit)
# QWidget Layout
- self.layout = QHBoxLayout()
-
- #self.table_view.setSizePolicy(size)
+ self.layout = QHBoxLayout(self)
self.layout.addWidget(self.table)
self.layout.addLayout(self.right)
- # Set the layout to the QWidget
- self.setLayout(self.layout)
-
# Signals and Slots
self.add.clicked.connect(self.add_element)
- self.quit.clicked.connect(self.quit_application)
self.plot.clicked.connect(self.plot_data)
self.clear.clicked.connect(self.clear_table)
- self.description.textChanged[str].connect(self.check_disable)
- self.price.textChanged[str].connect(self.check_disable)
+ self.description.textChanged.connect(self.check_disable)
+ self.price.textChanged.connect(self.check_disable)
# Fill example data
self.fill_table()
@@ -114,46 +72,40 @@ class Widget(QWidget):
@Slot()
def add_element(self):
des = self.description.text()
- price = self.price.text()
+ price = float(self.price.text())
self.table.insertRow(self.items)
description_item = QTableWidgetItem(des)
- price_item = QTableWidgetItem(f"{float(price):.2f}")
+ price_item = QTableWidgetItem(f"{price:.2f}")
price_item.setTextAlignment(Qt.AlignRight)
self.table.setItem(self.items, 0, description_item)
self.table.setItem(self.items, 1, price_item)
- self.description.setText("")
- self.price.setText("")
+ self.description.clear()
+ self.price.clear()
self.items += 1
@Slot()
def check_disable(self, s):
- if not self.description.text() or not self.price.text():
- self.add.setEnabled(False)
- else:
- self.add.setEnabled(True)
+ enabled = bool(self.description.text() and self.price.text())
+ self.add.setEnabled(enabled)
@Slot()
def plot_data(self):
# Get table information
- series = QtCharts.QPieSeries()
+ series = QPieSeries()
for i in range(self.table.rowCount()):
text = self.table.item(i, 0).text()
number = float(self.table.item(i, 1).text())
series.append(text, number)
- chart = QtCharts.QChart()
+ chart = QChart()
chart.addSeries(series)
chart.legend().setAlignment(Qt.AlignLeft)
self.chart_view.setChart(chart)
- @Slot()
- def quit_application(self):
- QApplication.quit()
-
def fill_table(self, data=None):
data = self._data if not data else data
for desc, price in data.items():
@@ -173,7 +125,7 @@ class Widget(QWidget):
class MainWindow(QMainWindow):
def __init__(self, widget):
- QMainWindow.__init__(self)
+ super().__init__()
self.setWindowTitle("Tutorial")
# Menu
@@ -181,17 +133,11 @@ class MainWindow(QMainWindow):
self.file_menu = self.menu.addMenu("File")
# Exit QAction
- exit_action = QAction("Exit", self)
+ exit_action = self.file_menu.addAction("Exit", self.close)
exit_action.setShortcut("Ctrl+Q")
- exit_action.triggered.connect(self.exit_app)
- self.file_menu.addAction(exit_action)
self.setCentralWidget(widget)
- @Slot()
- def exit_app(self, checked):
- QApplication.quit()
-
if __name__ == "__main__":
# Qt Application
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/Main.qml b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/Main.qml
new file mode 100644
index 000000000..faa9175d6
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/Main.qml
@@ -0,0 +1,196 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls.Basic
+import QtQuick.Layouts
+import FileSystemModule
+
+pragma ComponentBehavior: Bound
+
+ApplicationWindow {
+ id: root
+
+ property bool expandPath: false
+ property bool showLineNumbers: true
+ property string currentFilePath: ""
+
+ width: 1100
+ height: 600
+ minimumWidth: 200
+ minimumHeight: 100
+ visible: true
+ color: Colors.background
+ flags: Qt.Window | Qt.FramelessWindowHint
+ title: qsTr("File System Explorer Example")
+
+ function getInfoText() : string {
+ let out = root.currentFilePath
+ if (!out)
+ return qsTr("File System Explorer")
+ return root.expandPath ? out : out.substring(out.lastIndexOf("/") + 1, out.length)
+ }
+
+ menuBar: MyMenuBar {
+ dragWindow: root
+ infoText: root.getInfoText()
+ MyMenu {
+ title: qsTr("File")
+
+ Action {
+ text: qsTr("Increase Font")
+ shortcut: StandardKey.ZoomIn
+ onTriggered: editor.text.font.pixelSize += 1
+ }
+ Action {
+ text: qsTr("Decrease Font")
+ shortcut: StandardKey.ZoomOut
+ onTriggered: editor.text.font.pixelSize -= 1
+ }
+ Action {
+ text: root.showLineNumbers ? qsTr("Toggle Line Numbers OFF")
+ : qsTr("Toggle Line Numbers ON")
+ shortcut: "Ctrl+L"
+ onTriggered: root.showLineNumbers = !root.showLineNumbers
+ }
+ Action {
+ text: root.expandPath ? qsTr("Toggle Short Path")
+ : qsTr("Toggle Expand Path")
+ enabled: root.currentFilePath
+ onTriggered: root.expandPath = !root.expandPath
+ }
+ Action {
+ text: qsTr("Reset Filesystem")
+ enabled: sidebar.currentTabIndex === 1
+ onTriggered: fileSystemView.rootIndex = undefined
+ }
+ Action {
+ text: qsTr("Exit")
+ onTriggered: Qt.exit(0)
+ shortcut: StandardKey.Quit
+ }
+ }
+
+ MyMenu {
+ title: qsTr("Edit")
+
+ Action {
+ text: qsTr("Cut")
+ shortcut: StandardKey.Cut
+ enabled: editor.text.selectedText.length > 0
+ onTriggered: editor.text.cut()
+ }
+ Action {
+ text: qsTr("Copy")
+ shortcut: StandardKey.Copy
+ enabled: editor.text.selectedText.length > 0
+ onTriggered: editor.text.copy()
+ }
+ Action {
+ text: qsTr("Paste")
+ shortcut: StandardKey.Paste
+ enabled: editor.text.canPaste
+ onTriggered: editor.text.paste()
+ }
+ Action {
+ text: qsTr("Select All")
+ shortcut: StandardKey.SelectAll
+ enabled: editor.text.length > 0
+ onTriggered: editor.text.selectAll()
+ }
+ Action {
+ text: qsTr("Undo")
+ shortcut: StandardKey.Undo
+ enabled: editor.text.canUndo
+ onTriggered: editor.text.undo()
+ }
+ }
+ }
+ // Set up the layout of the main components in a row:
+ // [ Sidebar, Navigation, Editor ]
+ RowLayout {
+ anchors.fill: parent
+ spacing: 0
+
+ // Stores the buttons that navigate the application.
+ Sidebar {
+ id: sidebar
+ dragWindow: root
+ Layout.preferredWidth: 50
+ Layout.fillHeight: true
+ }
+
+ // Allows resizing parts of the UI.
+ SplitView {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ // Customized handle to drag between the Navigation and the Editor.
+ handle: Rectangle {
+ implicitWidth: 10
+ color: SplitHandle.pressed ? Colors.color2 : Colors.background
+ border.color: SplitHandle.hovered ? Colors.color2 : Colors.background
+ opacity: SplitHandle.hovered || navigationView.width < 15 ? 1.0 : 0.0
+
+ Behavior on opacity {
+ OpacityAnimator {
+ duration: 1400
+ }
+ }
+ }
+
+ Rectangle {
+ id: navigationView
+ color: Colors.surface1
+ SplitView.preferredWidth: 250
+ SplitView.fillHeight: true
+ // The stack-layout provides different views, based on the
+ // selected buttons inside the sidebar.
+ StackLayout {
+ anchors.fill: parent
+ currentIndex: sidebar.currentTabIndex > 1 ? 1 : sidebar.currentTabIndex
+
+ // Shows the help text.
+ Text {
+ text: qsTr("This example shows how to use and visualize the file system.\n\n"
+ + "Customized Qt Quick Components have been used to achieve this look.\n\n"
+ + "You can edit the files but they won't be changed on the file system.\n\n"
+ + "Click on the folder icon to the left to get started.")
+ wrapMode: TextArea.Wrap
+ color: Colors.text
+ }
+
+ // Shows the files on the file system.
+ FileSystemView {
+ id: fileSystemView
+ color: Colors.surface1
+ onFileClicked: path => root.currentFilePath = path
+ }
+ }
+ }
+
+ // The main view that contains the editor or the scheme-manager.
+ StackLayout {
+ currentIndex: sidebar.currentTabIndex > 1 ? 1 : 0
+
+ SplitView.fillWidth: true
+ SplitView.fillHeight: true
+
+ Editor {
+ id: editor
+ showLineNumbers: root.showLineNumbers
+ currentFilePath: root.currentFilePath
+ }
+
+ ColorScheme {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ }
+
+ }
+ }
+ }
+
+ ResizeButton {
+ resizeWindow: root
+ }
+}
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/app.qrc b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/app.qrc
new file mode 100644
index 000000000..ccd9eefec
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/app.qrc
@@ -0,0 +1,16 @@
+<RCC>
+ <qresource prefix="/qt/qml/FileSystemModule">
+ <file>qmldir</file>
+ <file>Main.qml</file>
+ <file>qml/About.qml</file>
+ <file>qml/Editor.qml</file>
+ <file>qml/Colors.qml</file>
+ <file>qml/FileSystemView.qml</file>
+ <file>qml/Icon.qml</file>
+ <file>qml/MyMenu.qml</file>
+ <file>qml/MyMenuBar.qml</file>
+ <file>qml/ResizeButton.qml</file>
+ <file>qml/Sidebar.qml</file>
+ <file>qml/WindowDragHandler.qml</file>
+ </qresource>
+</RCC>
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons.qrc b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons.qrc
new file mode 100644
index 000000000..69bddc018
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons.qrc
@@ -0,0 +1,15 @@
+<RCC>
+ <qresource>
+ <file>icons/app_icon.svg</file>
+ <file>icons/folder_closed.svg</file>
+ <file>icons/folder_open.svg</file>
+ <file>icons/generic_file.svg</file>
+ <file>icons/globe.svg</file>
+ <file>icons/info_sign.svg</file>
+ <file>icons/leaf.svg</file>
+ <file>icons/light_bulb.svg</file>
+ <file>icons/qt_logo.svg</file>
+ <file>icons/read.svg</file>
+ <file>icons/resize.svg</file>
+ </qresource>
+</RCC>
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/app_icon.svg b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/app_icon.svg
new file mode 100644
index 000000000..5aae4221f
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/app_icon.svg
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#EBDBB2" d="M13.25 8.5a.75.75 0 1 1-.75-.75.75.75 0 0 1 .75.75zM9.911 21.35l.816.578C10.819 21.798 13 18.666 13 13h-1a15.503 15.503 0 0 1-2.089 8.35zM4 6.703V10a2.002 2.002 0 0 1-2 2v1a2.002 2.002 0 0 1 2 2v3.297A3.707 3.707 0 0 0 7.703 22H9v-1H7.703A2.706 2.706 0 0 1 5 18.297V15a2.999 2.999 0 0 0-1.344-2.5A2.999 2.999 0 0 0 5 10V6.703A2.706 2.706 0 0 1 7.703 4H9V3H7.703A3.707 3.707 0 0 0 4 6.703zM20 10V6.703A3.707 3.707 0 0 0 16.297 3H15v1h1.297A2.706 2.706 0 0 1 19 6.703V10a2.999 2.999 0 0 0 1.344 2.5A2.999 2.999 0 0 0 19 15v3.297A2.706 2.706 0 0 1 16.297 21H15v1h1.297A3.707 3.707 0 0 0 20 18.297V15a2.002 2.002 0 0 1 2-2v-1a2.002 2.002 0 0 1-2-2z"/><path fill="none" d="M0 0h24v24H0z"/></svg>
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/folder_closed.svg b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/folder_closed.svg
new file mode 100644
index 000000000..36f119c96
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/folder_closed.svg
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ version="1.1"
+ viewBox="-10 0 1792 1792"
+ id="svg51"
+ sodipodi:docname="folder_closed.svg"
+ width="1792"
+ height="1792"
+ inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs55" />
+ <sodipodi:namedview
+ id="namedview53"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ showgrid="false"
+ inkscape:zoom="0.45033482"
+ inkscape:cx="842.70632"
+ inkscape:cy="896"
+ inkscape:window-width="1846"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg51" />
+ <path
+ fill="currentColor"
+ d="m 1718,672 v 704 q 0,92 -66,158 -66,66 -158,66 H 278 q -92,0 -158,-66 -66,-66 -66,-158 V 416 q 0,-92 66,-158 66,-66 158,-66 h 320 q 92,0 158,66 66,66 66,158 v 32 h 672 q 92,0 158,66 66,66 66,158 z"
+ id="path49" />
+</svg>
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/folder_open.svg b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/folder_open.svg
new file mode 100644
index 000000000..daa55a7a1
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/folder_open.svg
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ version="1.1"
+ viewBox="-10 0 1792 1792"
+ id="svg139"
+ sodipodi:docname="folder_open.svg"
+ width="1792"
+ height="1792"
+ inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs143" />
+ <sodipodi:namedview
+ id="namedview141"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ showgrid="false"
+ inkscape:zoom="0.24358259"
+ inkscape:cx="149.84651"
+ inkscape:cy="1098.1901"
+ inkscape:window-width="1846"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg139" />
+ <path
+ fill="currentColor"
+ d="M 1590,1376 V 672 q 0,-40 -28,-68 -28,-28 -68,-28 H 790 q -40,0 -68,-28 -28,-28 -28,-68 v -64 q 0,-40 -28,-68 -28,-28 -68,-28 H 278 q -40,0 -68,28 -28,28 -28,68 v 960 q 0,40 28,68 28,28 68,28 h 1216 q 40,0 68,-28 28,-28 28,-68 z m 128,-704 v 704 q 0,92 -66,158 -66,66 -158,66 H 278 q -92,0 -158,-66 -66,-66 -66,-158 V 416 q 0,-92 66,-158 66,-66 158,-66 h 320 q 92,0 158,66 66,66 66,158 v 32 h 672 q 92,0 158,66 66,66 66,158 z"
+ id="path137" />
+</svg>
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/generic_file.svg b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/generic_file.svg
new file mode 100644
index 000000000..9c855676e
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/generic_file.svg
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ version="1.1"
+ viewBox="-10 0 1792 1792"
+ id="svg147"
+ sodipodi:docname="generic_file.svg"
+ width="1792"
+ height="1792"
+ inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs151" />
+ <sodipodi:namedview
+ id="namedview149"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ showgrid="false"
+ inkscape:zoom="0.12179129"
+ inkscape:cx="-578.85911"
+ inkscape:cy="1687.3127"
+ inkscape:window-width="1846"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg147" />
+ <path
+ fill="currentColor"
+ d="m 1586,476 q 14,14 28,36 H 1142 V 40 q 22,14 36,28 z m -476,164 h 544 v 1056 q 0,40 -28,68 -28,28 -68,28 H 214 q -40,0 -68,-28 -28,-28 -28,-68 V 96 Q 118,56 146,28 174,0 214,0 h 800 v 544 q 0,40 28,68 28,28 68,28 z m 160,736 v -64 q 0,-14 -9,-23 -9,-9 -23,-9 H 534 q -14,0 -23,9 -9,9 -9,23 v 64 q 0,14 9,23 9,9 23,9 h 704 q 14,0 23,-9 9,-9 9,-23 z m 0,-256 v -64 q 0,-14 -9,-23 -9,-9 -23,-9 H 534 q -14,0 -23,9 -9,9 -9,23 v 64 q 0,14 9,23 9,9 23,9 h 704 q 14,0 23,-9 9,-9 9,-23 z m 0,-256 v -64 q 0,-14 -9,-23 -9,-9 -23,-9 H 534 q -14,0 -23,9 -9,9 -9,23 v 64 q 0,14 9,23 9,9 23,9 h 704 q 14,0 23,-9 9,-9 9,-23 z"
+ id="path145" />
+</svg>
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/globe.svg b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/globe.svg
new file mode 100644
index 000000000..081433813
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/globe.svg
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ version="1.1"
+ viewBox="-10 0 1792 1792"
+ id="svg155"
+ sodipodi:docname="globe.svg"
+ width="1792"
+ height="1792"
+ inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs159" />
+ <sodipodi:namedview
+ id="namedview157"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ showgrid="false"
+ inkscape:zoom="0.12179129"
+ inkscape:cx="504.9622"
+ inkscape:cy="1720.1558"
+ inkscape:window-width="1846"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg155" />
+ <path
+ fill="currentColor"
+ d="m 886,128 q 209,0 385.5,103 176.5,103 279.5,279.5 103,176.5 103,385.5 0,209 -103,385.5 Q 1448,1458 1271.5,1561 1095,1664 886,1664 677,1664 500.5,1561 324,1458 221,1281.5 118,1105 118,896 118,687 221,510.5 324,334 500.5,231 677,128 886,128 Z m 274,521 q -2,1 -9.5,9.5 -7.5,8.5 -13.5,9.5 2,0 4.5,-5 2.5,-5 5,-11 2.5,-6 3.5,-7 6,-7 22,-15 14,-6 52,-12 34,-8 51,11 -2,-2 9.5,-13 11.5,-11 14.5,-12 3,-2 15,-4.5 12,-2.5 15,-7.5 l 2,-22 q -12,1 -17.5,-7 -5.5,-8 -6.5,-21 0,2 -6,8 0,-7 -4.5,-8 -4.5,-1 -11.5,1 -7,2 -9,1 -10,-3 -15,-7.5 -5,-4.5 -8,-16.5 -3,-12 -4,-15 -2,-5 -9.5,-10.5 -7.5,-5.5 -9.5,-10.5 -1,-2 -2.5,-5.5 -1.5,-3.5 -3,-6.5 -1.5,-3 -4,-5.5 -2.5,-2.5 -5.5,-2.5 -3,0 -7,5 -4,5 -7.5,10 -3.5,5 -4.5,5 -3,-2 -6,-1.5 -3,0.5 -4.5,1 -1.5,0.5 -4.5,3 -3,2.5 -5,3.5 -3,2 -8.5,3 -5.5,1 -8.5,2 15,-5 -1,-11 -10,-4 -16,-3 9,-4 7.5,-12 -1.5,-8 -8.5,-14 h 5 q -1,-4 -8.5,-8.5 -7.5,-4.5 -17.5,-8.5 -10,-4 -13,-6 -8,-5 -34,-9.5 -26,-4.5 -33,-0.5 -5,6 -4.5,10.5 0.5,4.5 4,14 3.5,9.5 3.5,12.5 1,6 -5.5,13 -6.5,7 -6.5,12 0,7 14,15.5 14,8.5 10,21.5 -3,8 -16,16 -13,8 -16,12 -5,8 -1.5,18.5 3.5,10.5 10.5,16.5 2,2 1.5,4 -0.5,2 -3.5,4.5 -3,2.5 -5.5,4 -2.5,1.5 -6.5,3.5 l -3,2 q -11,5 -20.5,-6 -9.5,-11 -13.5,-26 -7,-25 -16,-30 -23,-8 -29,1 -5,-13 -41,-26 -25,-9 -58,-4 6,-1 0,-15 -7,-15 -19,-12 3,-6 4,-17.5 1,-11.5 1,-13.5 3,-13 12,-23 1,-1 7,-8.5 6,-7.5 9.5,-13.5 3.5,-6 0.5,-6 35,4 50,-11 5,-5 11.5,-17 6.5,-12 10.5,-17 9,-6 14,-5.5 5,0.5 14.5,5.5 9.5,5 14.5,5 14,1 15.5,-11 1.5,-12 -7.5,-20 12,1 3,-17 -5,-7 -8,-9 -12,-4 -27,5 -8,4 2,8 -1,-1 -9.5,10.5 Q 927,340 919,346 q -8,6 -16,-5 -1,-1 -5.5,-13.5 Q 893,315 888,314 q -8,0 -16,15 3,-8 -11,-15 -14,-7 -24,-8 19,-12 -8,-27 -7,-4 -20.5,-5 -13.5,-1 -19.5,4 -5,7 -5.5,11.5 -0.5,4.5 5,8 5.5,3.5 10.5,5.5 5,2 11.5,4 6.5,2 8.5,3 14,10 8,14 -2,1 -8.5,3.5 -6.5,2.5 -11.5,4.5 -5,2 -6,4 -3,4 0,14 3,10 -2,14 -5,-5 -9,-17.5 -4,-12.5 -7,-16.5 7,9 -25,6 l -10,-1 q -4,0 -16,2 -12,2 -20.5,1 -8.5,-1 -13.5,-8 -4,-8 0,-20 1,-4 4,-2 -4,-3 -11,-9.5 -7,-6.5 -10,-8.5 -46,15 -94,41 6,1 12,-1 5,-2 13,-6.5 8,-4.5 10,-5.5 34,-14 42,-7 l 5,-5 q 14,16 20,25 -7,-4 -30,-1 -20,6 -22,12 7,12 5,18 -4,-3 -11.5,-10 -7.5,-7 -14.5,-11 -7,-4 -15,-5 -16,0 -22,1 -146,80 -235,222 7,7 12,8 4,1 5,9 1,8 2.5,11 1.5,3 11.5,-3 9,8 3,19 1,-1 44,27 19,17 21,21 3,11 -10,18 -1,-2 -9,-9 -8,-7 -9,-4 -3,5 0.5,18.5 3.5,13.5 10.5,12.5 -7,0 -9.5,16 -2.5,16 -2.5,35.5 0,19.5 -1,23.5 l 2,1 q -3,12 5.5,34.5 8.5,22.5 21.5,19.5 -13,3 20,43 6,8 8,9 3,2 12,7.5 9,5.5 15,10 6,4.5 10,10.5 4,5 10,22.5 6,17.5 14,23.5 -2,6 9.5,20 11.5,14 10.5,23 -1,0 -2.5,1 -1.5,1 -2.5,1 3,7 15.5,14 12.5,7 15.5,13 1,3 2,10 1,7 3,11 2,4 8,2 2,-20 -24,-62 -15,-25 -17,-29 -3,-5 -5.5,-15.5 Q 541,919 539,915 q 2,0 6,1.5 4,1.5 8.5,3.5 4.5,2 7.5,4 3,2 2,3 -3,7 2,17.5 5,10.5 12,18.5 7,8 17,19 10,11 12,13 6,6 14,19.5 8,13.5 0,13.5 9,0 20,10 11,10 17,20 5,8 8,26 3,18 5,24 2,7 8.5,13.5 6.5,6.5 12.5,9.5 l 16,8 q 0,0 13,7 5,2 18.5,10.5 13.5,8.5 21.5,11.5 10,4 16,4 6,0 14.5,-2.5 8.5,-2.5 13.5,-3.5 15,-2 29,15 14,17 21,21 36,19 55,11 -2,1 0.5,7.5 2.5,6.5 8,15.5 5.5,9 9,14.5 3.5,5.5 5.5,8.5 5,6 18,15 13,9 18,15 6,-4 7,-9 -3,8 7,20 10,12 18,10 14,-3 14,-32 -31,15 -49,-18 0,-1 -2.5,-5.5 -2.5,-4.5 -4,-8.5 -1.5,-4 -2.5,-8.5 -1,-4.5 0,-7.5 1,-3 5,-3 9,0 10,-3.5 1,-3.5 -2,-12.5 -3,-9 -4,-13 -1,-8 -11,-20 -10,-12 -12,-15 -5,9 -16,8 -11,-1 -16,-9 0,1 -1.5,5.5 -1.5,4.5 -1.5,6.5 -13,0 -15,-1 1,-3 2.5,-17.5 1.5,-14.5 3.5,-22.5 1,-4 5.5,-12 4.5,-8 7.5,-14.5 3,-6.5 4,-12.5 1,-6 -4.5,-9.5 -5.5,-3.5 -17.5,-2.5 -19,1 -26,20 -1,3 -3,10.5 -2,7.5 -5,11.5 -3,4 -9,7 -7,3 -24,2 -17,-1 -24,-5 -13,-8 -22.5,-29 -9.5,-21 -9.5,-37 0,-10 2.5,-26.5 2.5,-16.5 3,-25 0.5,-8.5 -5.5,-24.5 3,-2 9,-9.5 6,-7.5 10,-10.5 2,-1 4.5,-1.5 2.5,-0.5 4.5,0 2,0.5 4,-1.5 2,-2 3,-6 -1,-1 -4,-3 -3,-3 -4,-3 7,3 28.5,-1.5 21.5,-4.5 27.5,1.5 15,11 22,-2 0,-1 -2.5,-9.5 Q 870,931 872,926 q 5,27 29,9 3,3 15.5,5 12.5,2 17.5,5 3,2 7,5.5 4,3.5 5.5,4.5 1.5,1 5,-0.5 3.5,-1.5 8.5,-6.5 10,14 12,24 11,40 19,44 7,3 11,2 4,-1 4.5,-9.5 0.5,-8.5 0,-14 Q 1006,989 1005,982 l -1,-8 v -18 l -1,-8 q -15,-3 -18.5,-12 -3.5,-9 1.5,-18.5 5,-9.5 15,-18.5 1,-1 8,-3.5 7,-2.5 15.5,-6.5 8.5,-4 12.5,-8 21,-19 15,-35 7,0 11,-9 -1,0 -5,-3 -4,-3 -7.5,-5 -3.5,-2 -4.5,-2 9,-5 2,-16 5,-3 7.5,-11 2.5,-8 7.5,-10 9,12 21,2 7,-8 1,-16 5,-7 20.5,-10.5 15.5,-3.5 18.5,-9.5 7,2 8,-2 1,-4 1,-12 0,-8 3,-12 4,-5 15,-9 11,-4 13,-5 l 17,-11 q 3,-4 0,-4 18,2 31,-11 10,-11 -6,-20 3,-6 -3,-9.5 -6,-3.5 -15,-5.5 3,-1 11.5,-0.5 8.5,0.5 10.5,-1.5 15,-10 -7,-16 -17,-5 -43,12 z m -163,877 q 206,-36 351,-189 -3,-3 -12.5,-4.5 -9.5,-1.5 -12.5,-3.5 -18,-7 -24,-8 1,-7 -2.5,-13 -3.5,-6 -8,-9 -4.5,-3 -12.5,-8 -8,-5 -11,-7 -2,-2 -7,-6 -5,-4 -7,-5.5 -2,-1.5 -7.5,-4.5 -5.5,-3 -8.5,-2 -3,1 -10,1 l -3,1 q -3,1 -5.5,2.5 -2.5,1.5 -5.5,3 -3,1.5 -4,3 -1,1.5 0,2.5 -21,-17 -36,-22 -5,-1 -11,-5.5 -6,-4.5 -10.5,-7 -4.5,-2.5 -10,-1.5 -5.5,1 -11.5,7 -5,5 -6,15 -1,10 -2,13 -7,-5 0,-17.5 7,-12.5 2,-18.5 -3,-6 -10.5,-4.5 -7.5,1.5 -12,4.5 -4.5,3 -11.5,8.5 -7,5.5 -9,6.5 -2,1 -8.5,5.5 -6.5,4.5 -8.5,7.5 -3,4 -6,12 -3,8 -5,11 -2,-4 -11.5,-6.5 -9.5,-2.5 -9.5,-5.5 2,10 4,35 2,25 5,38 7,31 -12,48 -27,25 -29,40 -4,22 12,26 0,7 -8,20.5 -8,13.5 -7,21.5 0,6 2,16 z"
+ id="path153" />
+</svg>
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/info_sign.svg b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/info_sign.svg
new file mode 100644
index 000000000..517f76360
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/info_sign.svg
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ version="1.1"
+ viewBox="-10 0 1792 1792"
+ id="svg163"
+ sodipodi:docname="info_sign.svg"
+ width="1792"
+ height="1792"
+ inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs167" />
+ <sodipodi:namedview
+ id="namedview165"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ showgrid="false"
+ inkscape:zoom="0.48716518"
+ inkscape:cx="72.870561"
+ inkscape:cy="896"
+ inkscape:window-width="1846"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg163" />
+ <path
+ fill="currentColor"
+ d="m 1142,1376 v -160 q 0,-14 -9,-23 -9,-9 -23,-9 h -96 V 672 q 0,-14 -9,-23 -9,-9 -23,-9 H 662 q -14,0 -23,9 -9,9 -9,23 v 160 q 0,14 9,23 9,9 23,9 h 96 v 320 h -96 q -14,0 -23,9 -9,9 -9,23 v 160 q 0,14 9,23 9,9 23,9 h 448 q 14,0 23,-9 9,-9 9,-23 z M 1014,480 V 320 q 0,-14 -9,-23 -9,-9 -23,-9 H 790 q -14,0 -23,9 -9,9 -9,23 v 160 q 0,14 9,23 9,9 23,9 h 192 q 14,0 23,-9 9,-9 9,-23 z m 640,416 q 0,209 -103,385.5 Q 1448,1458 1271.5,1561 1095,1664 886,1664 677,1664 500.5,1561 324,1458 221,1281.5 118,1105 118,896 118,687 221,510.5 324,334 500.5,231 677,128 886,128 1095,128 1271.5,231 1448,334 1551,510.5 1654,687 1654,896 Z"
+ id="path161" />
+</svg>
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/leaf.svg b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/leaf.svg
new file mode 100644
index 000000000..c1cabb5cf
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/leaf.svg
@@ -0,0 +1,7 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="-10 0 1034 1024">
+ <path fill="currentColor"
+d="M765 327l-14 -11l-538 502l503 -533l-14 -12q-48 -26 -106 -23.5t-109 19.5q-14 4 -28.5 10t-28.5 13q-30 14 -57.5 32.5t-52.5 41.5q-55 52 -90.5 119t-52.5 140q-5 21 -9 42t-7 42q-3 26 -5.5 52.5t-4.5 53.5q-1 22 1.5 45.5t33.5 21.5h11.5h10.5q78 -2 156 -6t153 -29
+q49 -16 94 -42.5t82 -62.5q27 -27 50 -60t39 -69.5t24 -75.5t5 -78q-3 -35 -12.5 -70t-33.5 -62v0zM844 160l30 30l-563 531z" />
+</svg>
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/light_bulb.svg b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/light_bulb.svg
new file mode 100644
index 000000000..ed2ed55fb
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/light_bulb.svg
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ version="1.1"
+ viewBox="-10 0 1538 1538"
+ id="svg4"
+ sodipodi:docname="light_bulb.svg"
+ width="1538"
+ height="1538"
+ inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs8" />
+ <sodipodi:namedview
+ id="namedview6"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ showgrid="false"
+ fit-margin-top="1"
+ fit-margin-left="1"
+ fit-margin-right="1"
+ fit-margin-bottom="1"
+ lock-margins="true"
+ inkscape:zoom="0.16"
+ inkscape:cx="1234.375"
+ inkscape:cy="409.375"
+ inkscape:window-width="1846"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg4" />
+ <path
+ fill="currentColor"
+ d="m 983,449 q 0,13 -9.5,22.5 Q 964,481 951,481 938,481 928.5,471.5 919,462 919,449 919,403 865,378 811,353 759,353 746,353 736.5,343.5 727,334 727,321 q 0,-13 9.5,-22.5 9.5,-9.5 22.5,-9.5 50,0 99.5,16 49.5,16 87,54 37.5,38 37.5,90 z m 160,0 q 0,-72 -34.5,-134 -34.5,-62 -90,-101.5 Q 963,174 895.5,151.5 828,129 759,129 690,129 622.5,151.5 555,174 499.5,213.5 444,253 409.5,315 375,377 375,449 q 0,101 68,180 10,11 30.5,33 20.5,22 30.5,33 128,153 141,298 h 228 q 13,-145 141,-298 10,-11 30.5,-33 20.5,-22 30.5,-33 68,-79 68,-180 z m 128,0 q 0,155 -103,268 -45,49 -74.5,87 -29.5,38 -59.5,95.5 -30,57.5 -34,107.5 47,28 47,82 0,37 -25,64 25,27 25,64 0,52 -45,81 13,23 13,47 0,46 -31.5,71 -31.5,25 -77.5,25 -20,44 -60,70 -40,26 -87,26 -47,0 -87,-26 -40,-26 -60,-70 -46,0 -77.5,-25 -31.5,-25 -31.5,-71 0,-24 13,-47 -45,-29 -45,-81 0,-37 25,-64 -25,-27 -25,-64 0,-54 47,-82 Q 514,957 484,899.5 454,842 424.5,804 395,766 350,717 247,604 247,449 247,350 291.5,264.5 336,179 408.5,122.5 481,66 572.5,33.5 664,1 759,1 q 95,0 186.5,32.5 91.5,32.5 164,89 72.5,56.5 117,142 Q 1271,350 1271,449 Z"
+ id="path2" />
+</svg>
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/qt_logo.svg b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/qt_logo.svg
new file mode 100644
index 000000000..062daff3e
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/qt_logo.svg
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="462pt"
+ height="339pt"
+ viewBox="0 0 462 339"
+ version="1.1"
+ id="svg2"
+>
+ <path
+ fill="#41cd52"
+ d=" M 63.50 0.00 L 462.00 0.00 L 462.00 274.79 C 440.60 296.26 419.13 317.66 397.61 339.00 L 0.00 339.00 L 0.00 63.39 C 21.08 42.18 42.34 21.13 63.50 0.00 Z"
+ id="path6"/>
+ <path
+ d=" M 122.37 71.33 C 137.50 61.32 156.21 58.79 174.00 58.95 C 190.94 59.16 208.72 62.13 222.76 72.24 C 232.96 79.41 239.59 90.48 244.01 101.93 C 251.16 120.73 253.26 141.03 253.50 161.01 C 253.53 181.13 252.62 201.69 245.96 220.86 C 241.50 233.90 233.01 245.48 221.81 253.52 C 229.87 266.58 238.09 279.54 246.15 292.60 C 236.02 297.27 225.92 301.97 215.78 306.62 C 207.15 292.38 198.56 278.11 189.90 263.89 C 178.19 265.81 166.21 265.66 154.44 264.36 C 140.34 262.67 125.97 258.37 115.09 248.88 C 106.73 241.64 101.48 231.51 97.89 221.21 C 92.01 203.79 90.43 185.25 90.16 166.97 C 90.02 147.21 91.28 127.14 97.24 108.18 C 101.85 93.92 109.48 79.69 122.37 71.33 Z"
+ id="path8"
+ fill="#ffffff"/>
+ <path
+ d=" M 294.13 70.69 C 304.73 70.68 315.33 70.68 325.93 70.69 C 325.96 84.71 325.92 98.72 325.95 112.74 C 339.50 112.76 353.05 112.74 366.60 112.75 C 366.37 121.85 366.12 130.95 365.86 140.05 C 352.32 140.08 338.79 140.04 325.25 140.07 C 325.28 163.05 325.18 186.03 325.30 209.01 C 325.56 215.30 325.42 221.94 328.19 227.75 C 330.21 232.23 335.65 233.38 340.08 233.53 C 348.43 233.50 356.77 233.01 365.12 232.86 C 365.63 241.22 366.12 249.59 366.60 257.95 C 349.99 260.74 332.56 264.08 316.06 258.86 C 309.11 256.80 302.63 252.19 299.81 245.32 C 294.76 233.63 294.35 220.62 294.13 208.07 C 294.11 185.40 294.13 162.74 294.12 140.07 C 286.73 140.05 279.34 140.08 271.95 140.05 C 271.93 130.96 271.93 121.86 271.95 112.76 C 279.34 112.73 286.72 112.77 294.11 112.74 C 294.14 98.72 294.10 84.71 294.13 70.69 Z"
+ id="path10"
+ fill="#ffffff"/>
+ <path
+ fill="#41cd52"
+ d=" M 160.51 87.70 C 170.80 86.36 181.60 86.72 191.34 90.61 C 199.23 93.73 205.93 99.84 209.47 107.58 C 214.90 119.31 216.98 132.26 218.03 145.05 C 219.17 162.07 219.01 179.25 216.66 196.17 C 215.01 206.24 212.66 216.85 205.84 224.79 C 198.92 232.76 188.25 236.18 178.01 236.98 C 167.21 237.77 155.82 236.98 146.07 231.87 C 140.38 228.84 135.55 224.09 132.73 218.27 C 129.31 211.30 127.43 203.69 126.11 196.07 C 122.13 171.91 121.17 146.91 126.61 122.89 C 128.85 113.83 132.11 104.53 138.73 97.70 C 144.49 91.85 152.51 88.83 160.51 87.70 Z"
+ id="path12"/>
+</svg>
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/read.svg b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/read.svg
new file mode 100644
index 000000000..c3af473d2
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/read.svg
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ version="1.1"
+ viewBox="-11 0 1792 1792"
+ id="svg184"
+ sodipodi:docname="read.svg"
+ width="1792"
+ height="1792"
+ inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs188" />
+ <sodipodi:namedview
+ id="namedview186"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ showgrid="false"
+ inkscape:zoom="0.24358259"
+ inkscape:cx="519.33104"
+ inkscape:cy="1089.9794"
+ inkscape:window-width="1846"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg184" />
+ <path
+ fill="currentColor"
+ d="m 1691.8576,478 q 40,57 18,129 l -275,906 q -19,64 -76.5,107.5 -57.5,43.5 -122.5,43.5 H 312.85764 q -77,0 -148.5,-53.5 Q 92.857644,1557 64.857644,1479 q -24,-67 -2,-127 0,-4 3,-27 3,-23 4,-37 1,-8 -3,-21.5 -4,-13.5 -3,-19.5 2,-11 8,-21 6,-10 16.5,-23.5 10.5,-13.5 16.499996,-23.5 23,-38 45,-91.5 22,-53.5 30,-91.5 3,-10 0.5,-30 -2.5,-20 -0.5,-28 3,-11 17,-28 14,-17 17,-23 21,-36 42,-92 21,-56 25,-90 1,-9 -2.5,-32 -3.5,-23 0.5,-28 4,-13 22,-30.5 18,-17.5 22,-22.5 19,-26 42.5,-84.5 23.5,-58.5 27.5,-96.5 1,-8 -3,-25.5 -4,-17.5 -2,-26.5 2,-8 9,-18 7,-10 18,-23 11,-13 17,-21 8,-12 16.5,-30.5 8.5,-18.5 15,-35 6.5,-16.5 16,-36 9.5,-19.5 19.5,-32 10,-12.5 26.5,-23.5 16.5,-11 36,-11.5 19.5,-0.5 47.5,5.5 l -1,3 q 38,-9 51,-9 h 760.99996 q 74,0 114,56 40,56 18,130 l -274,906 q -36,119 -71.5,153.5 -35.5,34.5 -128.5,34.5 H 208.85764 q -27,0 -38,15 -11,16 -1,43 24,70 144,70 h 922.99996 q 29,0 56,-15.5 27,-15.5 35,-41.5 l 300,-987 q 7,-22 5,-57 38,15 59,43 z m -1063.99996,2 q -4,13 2,22.5 6,9.5 20,9.5 h 607.99996 q 13,0 25.5,-9.5 12.5,-9.5 16.5,-22.5 l 21,-64 q 4,-13 -2,-22.5 -6,-9.5 -20,-9.5 H 690.85764 q -13,0 -25.5,9.5 -12.5,9.5 -16.5,22.5 z m -83,256 q -4,13 2,22.5 6,9.5 20,9.5 h 607.99996 q 13,0 25.5,-9.5 12.5,-9.5 16.5,-22.5 l 21,-64 q 4,-13 -2,-22.5 -6,-9.5 -20,-9.5 H 607.85764 q -13,0 -25.5,9.5 -12.5,9.5 -16.5,22.5 z"
+ id="path182" />
+</svg>
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/resize.svg b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/resize.svg
new file mode 100644
index 000000000..e86d612f3
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/icons/resize.svg
@@ -0,0 +1,6 @@
+<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'>
+ <line x1="00" y1="100" x2="100" y2="00" stroke="black" stroke-width="3" />
+ <line x1="20" y1="100" x2="100" y2="20" stroke="black" stroke-width="3" />
+ <line x1="40" y1="100" x2="100" y2="40" stroke="black" stroke-width="3" />
+ <line x1="60" y1="100" x2="100" y2="60" stroke="black" stroke-width="3" />
+</svg>
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/About.qml b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/About.qml
new file mode 100644
index 000000000..178bf03e4
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/About.qml
@@ -0,0 +1,93 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls.Basic
+import FileSystemModule
+
+ApplicationWindow {
+ id: root
+ width: 650
+ height: 550
+ flags: Qt.Window | Qt.FramelessWindowHint
+ color: Colors.surface1
+
+ menuBar: MyMenuBar {
+ id: menuBar
+
+ dragWindow: root
+ implicitHeight: 27
+ infoText: "About Qt"
+ }
+
+ Image {
+ id: logo
+
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.margins: 20
+
+ source: "../icons/qt_logo.svg"
+ sourceSize.width: 80
+ sourceSize.height: 80
+ fillMode: Image.PreserveAspectFit
+
+ smooth: true
+ antialiasing: true
+ asynchronous: true
+ }
+
+ ScrollView {
+ anchors.top: logo.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ anchors.margins: 20
+
+ TextArea {
+ selectedTextColor: Colors.textFile
+ selectionColor: Colors.selection
+ horizontalAlignment: Text.AlignHCenter
+ textFormat: Text.RichText
+
+ text: qsTr("<h3>About Qt</h3>"
+ + "<p>This program uses Qt version %1.</p>"
+ + "<p>Qt is a C++ toolkit for cross-platform application "
+ + "development.</p>"
+ + "<p>Qt provides single-source portability across all major desktop "
+ + "operating systems. It is also available for embedded Linux and other "
+ + "embedded and mobile operating systems.</p>"
+ + "<p>Qt is available under multiple licensing options designed "
+ + "to accommodate the needs of our various users.</p>"
+ + "<p>Qt licensed under our commercial license agreement is appropriate "
+ + "for development of proprietary/commercial software where you do not "
+ + "want to share any source code with third parties or otherwise cannot "
+ + "comply with the terms of GNU (L)GPL.</p>"
+ + "<p>Qt licensed under GNU (L)GPL is appropriate for the "
+ + "development of Qt&nbsp;applications provided you can comply with the terms "
+ + "and conditions of the respective licenses.</p>"
+ + "<p>Please see <a href=\"http://%2/\">%2</a> "
+ + "for an overview of Qt licensing.</p>"
+ + "<p>Copyright (C) %3 The Qt Company Ltd and other "
+ + "contributors.</p>"
+ + "<p>Qt and the Qt logo are trademarks of The Qt Company Ltd.</p>"
+ + "<p>Qt is The Qt Company Ltd product developed as an open source "
+ + "project. See <a href=\"http://%4/\">%4</a> for more information.</p>")
+ .arg(Application.version).arg("qt.io/licensing").arg("2023").arg("qt.io")
+ color: Colors.textFile
+ wrapMode: Text.WordWrap
+ readOnly: true
+ antialiasing: true
+ background: null
+
+ onLinkActivated: function(link) {
+ Qt.openUrlExternally(link)
+ }
+ }
+ }
+
+ ResizeButton {
+ resizeWindow: root
+ }
+}
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/ColorScheme.qml b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/ColorScheme.qml
new file mode 100644
index 000000000..19c8cd905
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/ColorScheme.qml
@@ -0,0 +1,118 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls
+import FileSystemModule
+
+ColumnLayout {
+ id: colorScheme
+
+ spacing: 20
+
+ // Inline component that customizes TabButton
+ component MyTabButton: TabButton {
+ id: root
+
+ implicitWidth: 150
+ implicitHeight: 30
+ padding: 6
+ spacing: 6
+
+ contentItem: Text {
+ anchors.centerIn: parent
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+
+ text: root.text
+ font.bold: true
+ color: Colors.text
+ }
+
+ background: Rectangle {
+ anchors.fill: parent
+ implicitHeight: 40
+
+ color: root.checked ? Colors.active : Colors.selection
+ Rectangle {
+ height: 4
+ width: parent.width
+ color: root.checked ? Colors.color1 : Colors.selection
+ }
+ }
+ }
+
+ Item {
+ // Spacer item
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ }
+
+ Text {
+ Layout.alignment: Qt.AlignHCenter
+
+ text: "Select a Scheme!"
+ font.pointSize: 30
+ font.bold: true
+ color: Colors.text
+ }
+
+ // Display all the color-scheme names. The model is a string-list provided
+ // by our python class.
+ TabBar {
+ id: schemeSelector
+
+ Layout.alignment: Qt.AlignHCenter
+
+ background: Rectangle {
+ color: Colors.surface1
+ }
+
+ Repeater {
+ model: Colors.getKeys()
+ MyTabButton {
+ text: modelData
+ onClicked: {
+ Colors.setScheme(modelData)
+ themePreviewContainer.background
+ = (modelData === "Solarized") ? "#777777" : "#FEFAEC"
+ }
+ }
+ }
+ }
+
+ // The current colors can be visualized using the same method as above.
+ Rectangle {
+ id: themePreviewContainer
+
+ property color background: "#FEFAEC"
+
+ Layout.alignment: Qt.AlignHCenter
+
+ width: 700
+ height: 50
+ radius: 10
+ color: background
+
+ // Display all used colors inside a row
+ Row {
+ anchors.centerIn: parent
+ spacing: 10
+
+ Repeater {
+ model: Colors.currentColors
+ Rectangle {
+ width: 35
+ height: width
+ radius: width / 2
+ color: modelData
+ }
+ }
+ }
+ }
+ Item {
+ // Spacer item
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ }
+}
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/Editor.qml b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/Editor.qml
new file mode 100644
index 000000000..80f7c04c5
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/Editor.qml
@@ -0,0 +1,160 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls
+import FileSystemModule
+
+pragma ComponentBehavior: Bound
+
+// This is the text editor that displays the currently open file, including
+// their corresponding line numbers.
+Rectangle {
+ id: root
+
+ required property string currentFilePath
+ required property bool showLineNumbers
+ property alias text: textArea
+ property int currentLineNumber: -1
+ property int rowHeight: Math.ceil(fontMetrics.lineSpacing)
+
+ color: Colors.background
+
+ onWidthChanged: textArea.update()
+ onHeightChanged: textArea.update()
+
+ RowLayout {
+ anchors.fill: parent
+ // We use a flickable to synchronize the position of the editor and
+ // the line numbers. This is necessary because the line numbers can
+ // extend the available height.
+ Flickable {
+ id: lineNumbers
+
+ // Calculate the width based on the logarithmic scale.
+ Layout.preferredWidth: fontMetrics.averageCharacterWidth
+ * (Math.floor(Math.log10(textArea.lineCount)) + 1) + 10
+ Layout.fillHeight: true
+
+ interactive: false
+ contentY: editorFlickable.contentY
+ visible: textArea.text !== "" && root.showLineNumbers
+
+ Column {
+ anchors.fill: parent
+ Repeater {
+ id: repeatedLineNumbers
+
+ model: LineNumberModel {
+ lineCount: textArea.text !== "" ? textArea.lineCount : 0
+ }
+
+ delegate: Item {
+ required property int index
+
+ width: parent.width
+ height: root.rowHeight
+ Label {
+ id: numbers
+
+ text: parent.index + 1
+
+ width: parent.width
+ height: parent.height
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+
+ color: (root.currentLineNumber === parent.index)
+ ? Colors.iconIndicator : Qt.darker(Colors.text, 2)
+ font: textArea.font
+ }
+ Rectangle {
+ id: indicator
+
+ anchors.left: numbers.right
+ width: 1
+ height: parent.height
+ color: Qt.darker(Colors.text, 3)
+ }
+ }
+ }
+ }
+ }
+
+ Flickable {
+ id: editorFlickable
+
+ property alias textArea: textArea
+
+ // We use an inline component to customize the horizontal and vertical
+ // scroll-bars. This is convenient when the component is only used in one file.
+ component MyScrollBar: ScrollBar {
+ id: scrollBar
+ background: Rectangle {
+ implicitWidth: scrollBar.interactive ? 8 : 4
+ implicitHeight: scrollBar.interactive ? 8 : 4
+
+ opacity: scrollBar.active && scrollBar.size < 1.0 ? 1.0 : 0.0
+ color: Colors.background
+ Behavior on opacity {
+ OpacityAnimator {
+ duration: 500
+ }
+ }
+ }
+ contentItem: Rectangle {
+ implicitWidth: scrollBar.interactive ? 8 : 4
+ implicitHeight: scrollBar.interactive ? 8 : 4
+ opacity: scrollBar.active && scrollBar.size < 1.0 ? 1.0 : 0.0
+ color: Colors.color1
+ Behavior on opacity {
+ OpacityAnimator {
+ duration: 1000
+ }
+ }
+ }
+ }
+
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ ScrollBar.horizontal: MyScrollBar {}
+ ScrollBar.vertical: MyScrollBar {}
+
+ boundsBehavior: Flickable.StopAtBounds
+
+ TextArea.flickable: TextArea {
+ id: textArea
+ anchors.fill: parent
+
+ focus: false
+ topPadding: 0
+ leftPadding: 10
+
+ text: FileSystemModel.readFile(root.currentFilePath)
+ tabStopDistance: fontMetrics.averageCharacterWidth * 4
+
+ // Grab the current line number from the C++ interface.
+ onCursorPositionChanged: {
+ root.currentLineNumber = FileSystemModel.currentLineNumber(
+ textArea.textDocument, textArea.cursorPosition)
+ }
+
+ color: Colors.textFile
+ selectedTextColor: Colors.textFile
+ selectionColor: Colors.selection
+
+ textFormat: TextEdit.PlainText
+ renderType: Text.QtRendering
+ selectByMouse: true
+ antialiasing: true
+ background: null
+ }
+
+ FontMetrics {
+ id: fontMetrics
+ font: textArea.font
+ }
+ }
+ }
+}
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/FileSystemView.qml b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/FileSystemView.qml
new file mode 100644
index 000000000..db955168c
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/FileSystemView.qml
@@ -0,0 +1,156 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Effects
+import QtQuick.Controls.Basic
+import FileSystemModule
+
+pragma ComponentBehavior: Bound
+
+// This is the file system view which gets populated by the C++ model.
+Rectangle {
+ id: root
+
+ signal fileClicked(string filePath)
+ property alias rootIndex: fileSystemTreeView.rootIndex
+
+ TreeView {
+ id: fileSystemTreeView
+
+ property int lastIndex: -1
+
+ anchors.fill: parent
+ model: FileSystemModel
+ rootIndex: FileSystemModel.rootIndex
+ boundsBehavior: Flickable.StopAtBounds
+ boundsMovement: Flickable.StopAtBounds
+ clip: true
+
+ Component.onCompleted: fileSystemTreeView.toggleExpanded(0)
+
+ // The delegate represents a single entry in the filesystem.
+ delegate: TreeViewDelegate {
+ id: treeDelegate
+ indentation: 8
+ implicitWidth: fileSystemTreeView.width > 0 ? fileSystemTreeView.width : 250
+ implicitHeight: 25
+
+ // Since we have the 'ComponentBehavior Bound' pragma, we need to
+ // require these properties from our model. This is a convenient way
+ // to bind the properties provided by the model's role names.
+ required property int index
+ required property url filePath
+ required property string fileName
+
+ indicator: Image {
+ id: directoryIcon
+
+ x: treeDelegate.leftMargin + (treeDelegate.depth * treeDelegate.indentation)
+ anchors.verticalCenter: parent.verticalCenter
+ source: treeDelegate.hasChildren ? (treeDelegate.expanded
+ ? "../icons/folder_open.svg" : "../icons/folder_closed.svg")
+ : "../icons/generic_file.svg"
+ sourceSize.width: 20
+ sourceSize.height: 20
+ fillMode: Image.PreserveAspectFit
+
+ smooth: true
+ antialiasing: true
+ asynchronous: true
+ }
+
+ contentItem: Text {
+ text: treeDelegate.fileName
+ color: Colors.text
+ }
+
+ background: Rectangle {
+ color: (treeDelegate.index === fileSystemTreeView.lastIndex)
+ ? Colors.selection
+ : (hoverHandler.hovered ? Colors.active : "transparent")
+ }
+
+ // We color the directory icons with this MultiEffect, where we overlay
+ // the colorization color ontop of the SVG icons.
+ MultiEffect {
+ id: iconOverlay
+
+ anchors.fill: directoryIcon
+ source: directoryIcon
+ colorization: 1.0
+ brightness: 1.0
+ colorizationColor: {
+ const isFile = treeDelegate.index === fileSystemTreeView.lastIndex
+ && !treeDelegate.hasChildren;
+ if (isFile)
+ return Qt.lighter(Colors.folder, 3)
+
+ const isExpandedFolder = treeDelegate.expanded && treeDelegate.hasChildren;
+ if (isExpandedFolder)
+ return Colors.color2
+ else
+ return Colors.folder
+ }
+ }
+
+ HoverHandler {
+ id: hoverHandler
+ }
+
+ TapHandler {
+ acceptedButtons: Qt.LeftButton | Qt.RightButton
+ onSingleTapped: (eventPoint, button) => {
+ switch (button) {
+ case Qt.LeftButton:
+ fileSystemTreeView.toggleExpanded(treeDelegate.row)
+ fileSystemTreeView.lastIndex = treeDelegate.index
+ // If this model item doesn't have children, it means it's
+ // representing a file.
+ if (!treeDelegate.hasChildren)
+ root.fileClicked(treeDelegate.filePath)
+ break;
+ case Qt.RightButton:
+ if (treeDelegate.hasChildren)
+ contextMenu.popup();
+ break;
+ }
+ }
+ }
+
+ MyMenu {
+ id: contextMenu
+ Action {
+ text: qsTr("Set as root index")
+ onTriggered: {
+ fileSystemTreeView.rootIndex = fileSystemTreeView.index(treeDelegate.row, 0)
+ }
+ }
+ Action {
+ text: qsTr("Reset root index")
+ onTriggered: fileSystemTreeView.rootIndex = undefined
+ }
+ }
+ }
+
+ // Provide our own custom ScrollIndicator for the TreeView.
+ ScrollIndicator.vertical: ScrollIndicator {
+ active: true
+ implicitWidth: 15
+
+ contentItem: Rectangle {
+ implicitWidth: 6
+ implicitHeight: 6
+
+ color: Colors.color1
+ opacity: fileSystemTreeView.movingVertically ? 0.5 : 0.0
+
+ Behavior on opacity {
+ OpacityAnimator {
+ duration: 500
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/MyMenu.qml b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/MyMenu.qml
new file mode 100644
index 000000000..1f1d30c56
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/MyMenu.qml
@@ -0,0 +1,45 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls.Basic
+import FileSystemModule
+
+Menu {
+ id: root
+
+ delegate: MenuItem {
+ id: menuItem
+ contentItem: Item {
+ Text {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ anchors.leftMargin: 5
+
+ text: menuItem.text
+ color: enabled ? Colors.text : Colors.disabledText
+ }
+ Rectangle {
+ id: indicator
+
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.right
+ width: 6
+ height: parent.height
+
+ visible: menuItem.highlighted
+ color: Colors.color2
+ }
+ }
+ background: Rectangle {
+ implicitWidth: 210
+ implicitHeight: 35
+ color: menuItem.highlighted ? Colors.active : "transparent"
+ }
+ }
+ background: Rectangle {
+ implicitWidth: 210
+ implicitHeight: 35
+ color: Colors.surface2
+ }
+}
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/MyMenuBar.qml b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/MyMenuBar.qml
new file mode 100644
index 000000000..4874a2c03
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/MyMenuBar.qml
@@ -0,0 +1,177 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls.Basic
+import FileSystemModule
+
+// The MenuBar also serves as a controller for our window as we don't use any decorations.
+MenuBar {
+ id: root
+
+ required property ApplicationWindow dragWindow
+ property alias infoText: windowInfo.text
+
+ // Customization of the top level menus inside the MenuBar
+ delegate: MenuBarItem {
+ id: menuBarItem
+
+ contentItem: Text {
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+
+ text: menuBarItem.text
+ font: menuBarItem.font
+ elide: Text.ElideRight
+ color: menuBarItem.highlighted ? Colors.textFile : Colors.text
+ opacity: enabled ? 1.0 : 0.3
+ }
+
+ background: Rectangle {
+ id: background
+
+ color: menuBarItem.highlighted ? Colors.selection : "transparent"
+ Rectangle {
+ id: indicator
+
+ width: 0; height: 3
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.bottom: parent.bottom
+
+ color: Colors.color1
+ states: State {
+ name: "active"
+ when: menuBarItem.highlighted
+ PropertyChanges {
+ indicator.width: background.width - 2
+ }
+ }
+ transitions: Transition {
+ NumberAnimation {
+ properties: "width"
+ duration: 175
+ }
+ }
+ }
+ }
+ }
+ // We use the contentItem property as a place to attach our window decorations. Beneath
+ // the usual menu entries within a MenuBar, it includes a centered information text, along
+ // with the minimize, maximize, and close buttons.
+ contentItem: RowLayout {
+ id: windowBar
+
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+
+ spacing: root.spacing
+ Repeater {
+ id: menuBarItems
+
+ Layout.alignment: Qt.AlignLeft
+ model: root.contentModel
+ }
+
+ Item {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ Text {
+ id: windowInfo
+
+ width: parent.width; height: parent.height
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ leftPadding: windowActions.width
+ color: Colors.text
+ clip: true
+ }
+ }
+
+ RowLayout {
+ id: windowActions
+
+ Layout.alignment: Qt.AlignRight
+ Layout.fillHeight: true
+
+ spacing: 0
+
+ component InteractionButton: Rectangle {
+ id: interactionButton
+
+ signal action()
+ property alias hovered: hoverHandler.hovered
+
+ Layout.fillHeight: true
+ Layout.preferredWidth: height
+
+ color: hovered ? Colors.background : "transparent"
+ HoverHandler {
+ id: hoverHandler
+ }
+ TapHandler {
+ id: tapHandler
+ onTapped: interactionButton.action()
+ }
+ }
+
+ InteractionButton {
+ id: minimize
+
+ onAction: root.dragWindow.showMinimized()
+ Rectangle {
+ anchors.centerIn: parent
+ color: parent.hovered ? Colors.iconIndicator : Colors.icon
+ height: 2
+ width: parent.height - 14
+ }
+ }
+
+ InteractionButton {
+ id: maximize
+
+ onAction: root.dragWindow.showMaximized()
+ Rectangle {
+ anchors.fill: parent
+ anchors.margins: 7
+ border.color: parent.hovered ? Colors.iconIndicator : Colors.icon
+ border.width: 2
+ color: "transparent"
+ }
+ }
+
+ InteractionButton {
+ id: close
+
+ color: hovered ? "#ec4143" : "transparent"
+ onAction: root.dragWindow.close()
+ Rectangle {
+ anchors.centerIn: parent
+ width: parent.height - 8; height: 2
+
+ rotation: 45
+ antialiasing: true
+ transformOrigin: Item.Center
+ color: parent.hovered ? Colors.iconIndicator : Colors.icon
+
+ Rectangle {
+ anchors.centerIn: parent
+ width: parent.height
+ height: parent.width
+
+ antialiasing: true
+ color: parent.color
+ }
+ }
+ }
+ }
+ }
+
+ background: Rectangle {
+ color: Colors.surface2
+ // Make the empty space drag the specified root window.
+ WindowDragHandler {
+ dragWindow: root.dragWindow
+ }
+ }
+}
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/ResizeButton.qml b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/ResizeButton.qml
new file mode 100644
index 000000000..0df65bf82
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/ResizeButton.qml
@@ -0,0 +1,23 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick.Controls
+import FileSystemModule
+
+Button {
+ required property ApplicationWindow resizeWindow
+
+ icon.width: 20; icon.height: 20
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ rightPadding: 3
+ bottomPadding: 3
+
+ icon.source: "../icons/resize.svg"
+ icon.color: hovered ? Colors.iconIndicator : Colors.icon
+
+ background: null
+ checkable: false
+ display: AbstractButton.IconOnly
+ onPressed: resizeWindow.startSystemResize(Qt.BottomEdge | Qt.RightEdge)
+}
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/Sidebar.qml b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/Sidebar.qml
new file mode 100644
index 000000000..04880a55d
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/Sidebar.qml
@@ -0,0 +1,146 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls.Basic
+import FileSystemModule
+
+Rectangle {
+ id: root
+
+ property alias currentTabIndex: topBar.currentIndex
+ required property ApplicationWindow dragWindow
+ readonly property int tabBarSpacing: 10
+
+ color: Colors.surface2
+
+ component SidebarEntry: Button {
+ id: sidebarButton
+
+ Layout.alignment: Qt.AlignHCenter
+ Layout.fillWidth: true
+
+ icon.color: down || checked ? Colors.iconIndicator : Colors.icon
+ icon.width: 27
+ icon.height: 27
+
+ topPadding: 0
+ rightPadding: 0
+ bottomPadding: 0
+ leftPadding: 0
+ background: null
+
+ Rectangle {
+ id: indicator
+
+ anchors.verticalCenter: parent.verticalCenter
+ x: 2
+ width: 4
+ height: sidebarButton.icon.height * 1.2
+
+ visible: sidebarButton.checked
+ color: Colors.color1
+ }
+ }
+
+ // TabBar is designed to be horizontal, whereas we need a vertical bar.
+ // We can easily achieve that by using a Container.
+ component TabBar: Container {
+ id: tabBarComponent
+
+ Layout.fillWidth: true
+ // ButtonGroup ensures that only one button can be checked at a time.
+ ButtonGroup {
+ buttons: tabBarComponent.contentChildren
+
+ // We have to manage the currentIndex ourselves, which we do by setting it to the index
+ // of the currently checked button. We use setCurrentIndex instead of setting the
+ // currentIndex property to avoid breaking bindings. See "Managing the Current Index"
+ // in Container's documentation for more information.
+ onCheckedButtonChanged: tabBarComponent.setCurrentIndex(
+ Math.max(0, buttons.indexOf(checkedButton)))
+ }
+
+ contentItem: ColumnLayout {
+ spacing: tabBarComponent.spacing
+ Repeater {
+ model: tabBarComponent.contentModel
+ }
+ }
+ }
+
+ ColumnLayout {
+ anchors.fill: root
+ anchors.topMargin: root.tabBarSpacing
+ anchors.bottomMargin: root.tabBarSpacing
+
+ spacing: root.tabBarSpacing
+ TabBar {
+ id: topBar
+
+ spacing: root.tabBarSpacing
+ // Shows help text when clicked.
+ SidebarEntry {
+ id: infoTab
+ icon.source: "../icons/light_bulb.svg"
+ checkable: true
+ checked: true
+ }
+
+ // Shows the file system when clicked.
+ SidebarEntry {
+ id: filesystemTab
+
+ icon.source: "../icons/read.svg"
+ checkable: true
+ }
+
+ // Shows the scheme switcher
+ SidebarEntry {
+ icon.source: "../icons/leaf.svg"
+ checkable: true
+
+ Layout.alignment: Qt.AlignHCenter
+ }
+ }
+
+ // This item acts as a spacer to expand between the checkable and non-checkable buttons.
+ Item {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+
+ // Make the empty space drag our main window.
+ WindowDragHandler {
+ dragWindow: root.dragWindow
+ }
+ }
+
+ TabBar {
+ id: bottomBar
+
+ spacing: root.tabBarSpacing
+ // Opens the Qt website in the system's web browser.
+ SidebarEntry {
+ id: qtWebsiteButton
+ icon.source: "../icons/globe.svg"
+ checkable: false
+ onClicked: Qt.openUrlExternally("https://www.qt.io/")
+ }
+
+ // Opens the About Qt Window.
+ SidebarEntry {
+ id: aboutQtButton
+
+ icon.source: "../icons/info_sign.svg"
+ checkable: false
+ onClicked: aboutQtWindow.visible = !aboutQtWindow.visible
+ }
+ }
+ }
+
+ About {
+ id: aboutQtWindow
+ visible: false
+ }
+}
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/WindowDragHandler.qml b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/WindowDragHandler.qml
new file mode 100644
index 000000000..0e140aca3
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qml/WindowDragHandler.qml
@@ -0,0 +1,16 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+// Allows dragging the window when placed on an unused section of the UI.
+DragHandler {
+
+ required property ApplicationWindow dragWindow
+
+ target: null
+ onActiveChanged: {
+ if (active) dragWindow.startSystemMove()
+ }
+}
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qmldir b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qmldir
new file mode 100644
index 000000000..e9c99b07b
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/FileSystemModule/qmldir
@@ -0,0 +1,11 @@
+module FileSystemModule
+Main 1.0 Main.qml
+About 1.0 qml/About.qml
+Editor 1.0 qml/Editor.qml
+MyMenu 1.0 qml/MyMenu.qml
+Sidebar 1.0 qml/Sidebar.qml
+MyMenuBar 1.0 qml/MyMenuBar.qml
+ColorScheme 1.0 qml/ColorScheme.qml
+ResizeButton 1.0 qml/ResizeButton.qml
+FileSystemView 1.0 qml/FileSystemView.qml
+WindowDragHandler 1.0 qml/WindowDragHandler.qml
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/editormodels.py b/sources/pyside6/doc/tutorials/extendedexplorer/editormodels.py
new file mode 100644
index 000000000..688147726
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/editormodels.py
@@ -0,0 +1,116 @@
+# Copyright (C) 2024 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+from PySide6.QtWidgets import QFileSystemModel
+from PySide6.QtQuick import QQuickTextDocument
+from PySide6.QtQml import QmlElement, QmlSingleton
+from PySide6.QtCore import (Qt, QDir, QAbstractListModel, Slot, QFile, QTextStream,
+ QMimeDatabase, QFileInfo, QStandardPaths, QModelIndex,
+ Signal, Property)
+
+QML_IMPORT_NAME = "FileSystemModule"
+QML_IMPORT_MAJOR_VERSION = 1
+
+
+@QmlElement
+@QmlSingleton
+class FileSystemModel(QFileSystemModel):
+
+ rootIndexChanged = Signal()
+
+ def getDefaultRootDir():
+ return QStandardPaths.writableLocation(QStandardPaths.StandardLocation.HomeLocation)
+
+ def __init__(self, parent=None):
+ super().__init__(parent=parent)
+ self.mRootIndex = QModelIndex()
+ self.mDb = QMimeDatabase()
+ self.setFilter(QDir.Filter.AllEntries | QDir.Filter.Hidden | QDir.Filter.NoDotAndDotDot)
+ self.setInitialDirectory()
+
+ # check for the correct mime type and then read the file.
+ # returns the text file's content or an error message on failure
+ @Slot(str, result=str)
+ def readFile(self, path):
+ if path == "":
+ return ""
+
+ file = QFile(path)
+
+ mime = self.mDb.mimeTypeForFile(QFileInfo(file))
+ if ('text' in mime.comment().lower()
+ or any('text' in s.lower() for s in mime.parentMimeTypes())):
+ if file.open(QFile.OpenModeFlag.ReadOnly | QFile.OpenModeFlag.Text):
+ stream = QTextStream(file).readAll()
+ file.close()
+ return stream
+ else:
+ return self.tr("Error opening the file!")
+ return self.tr("File type not supported!")
+
+ @Slot(QQuickTextDocument, int, result=int)
+ def currentLineNumber(self, textDocument, cursorPosition):
+ td = textDocument.textDocument()
+ tb = td.findBlock(cursorPosition)
+ return tb.blockNumber()
+
+ def setInitialDirectory(self, path=getDefaultRootDir()):
+ dir = QDir(path)
+ if dir.makeAbsolute():
+ self.setRootPath(dir.path())
+ else:
+ self.setRootPath(self.getDefaultRootDir())
+ self.setRootIndex(self.index(dir.path()))
+
+ # we only need one column in this example
+ def columnCount(self, parent):
+ return 1
+
+ @Property(QModelIndex, notify=rootIndexChanged)
+ def rootIndex(self):
+ return self.mRootIndex
+
+ def setRootIndex(self, index):
+ if (index == self.mRootIndex):
+ return
+ self.mRootIndex = index
+ self.rootIndexChanged.emit()
+
+
+@QmlElement
+class LineNumberModel(QAbstractListModel):
+
+ lineCountChanged = Signal()
+
+ def __init__(self, parent=None):
+ self.mLineCount = 0
+ super().__init__(parent=parent)
+
+ @Property(int, notify=lineCountChanged)
+ def lineCount(self):
+ return self.mLineCount
+
+ @lineCount.setter
+ def lineCount(self, n):
+ if n < 0:
+ print("lineCount must be greater then zero")
+ return
+ if self.mLineCount == n:
+ return
+
+ if self.mLineCount < n:
+ self.beginInsertRows(QModelIndex(), self.mLineCount, n - 1)
+ self.mLineCount = n
+ self.endInsertRows()
+ else:
+ self.beginRemoveRows(QModelIndex(), n, self.mLineCount - 1)
+ self.mLineCount = n
+ self.endRemoveRows()
+
+ def rowCount(self, parent):
+ return self.mLineCount
+
+ def data(self, index, role):
+ if not self.checkIndex(index) or role != Qt.ItemDataRole.DisplayRole:
+ return
+ return index.row()
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/extendedexplorer.md b/sources/pyside6/doc/tutorials/extendedexplorer/extendedexplorer.md
new file mode 100644
index 000000000..0ac7bec18
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/extendedexplorer.md
@@ -0,0 +1,210 @@
+# Extending the file system explorer example
+
+This tutorial shows how to extend the
+[Filesystem Explorer Example](filesystemexplorer_example)
+by adding a simple scheme manager. This feature will allow you to switch color
+schemes during the application's runtime. The color schemes will be declared in
+JSON format and made available through a custom Python-QML plugin.
+
+![Extended Explorer GIF](resources/extendedexplorer.gif)
+
+## Defining the color schemes
+
+To define your color scheme, you can use the same color names as the original
+example, so you don't have to rename every occurrence. The original colors are
+defined in the `Colors.qml` file as follows:
+
+```{literalinclude} resources/Colors.qml
+---
+language: QML
+caption: true
+linenos: true
+lines: 7-22
+---
+```
+
+The `schemes.json` file holds the color schemes. To start implementing this, you
+can use the [Catppuccin](https://github.com/catppuccin/catppuccin) scheme.
+
+```{literalinclude} schemes.json
+---json
+caption: true
+linenos: true
+start-at: "Catppuccin"
+end-at: "},"
+---
+```
+
+In addition to the "Catppuccin" color scheme, four other color schemes got
+implemented: Nordic, One Dark, Gruvbox, and Solarized. However, feel free to get
+creative and experiment with **your** schemes.
+
+To define a new color scheme, copy the structure from above and provide your
+color values
+
+## Implement the scheme manager
+
+After defining the color schemes, you can implement the actual scheme manager.
+The manager will read the `schemes.json` file and provide QML bindings to switch
+between schemes during runtime.
+
+To implement the scheme manager, create a Python-QML plugin that exposes the
+`SchemeManager` object to QML. This object will have methods to load the color
+schemes from the `schemes.json` file and switch between them.
+
+Create a new Python file called `schememanager.py` in your project directory. In
+this file, define the **SchemeManager** class:
+
+```{literalinclude} scheme_manager.py
+---
+language: python
+caption: true
+linenos: true
+start-at: "QML_IMPORT_NAME"
+end-at: "class SchemeManager"
+---
+```
+
+To integrate smoothly into the already existing code, attach the SchemeManager
+to the same QML module that's already present with
+`QML_IMPORT_NAME = "FileSystemModule"`. Additionally, use the`@QmlNamedElement`
+decorator to smoothly transition to using the custom plugin instead of the
+`Colors.qml` file. With these changes, we can avoid editing all previous
+assignments like:
+
+```QML
+import FileSystemModule
+...
+Rectangle {
+ color: Colors.background
+}
+```
+
+The constructor reads the `schemes.json` file once upon application start and
+then calls the `setTheme` member function.
+
+```{literalinclude} scheme_manager.py
+---
+language: python
+caption: true
+linenos: true
+lines: 18-24
+---
+```
+
+By adding the `SchemeManager` as a callable QML element named **Colors** to the
+FileSystemModule, the class is now accessible in the code without the need to
+import it each time or edit previous assignments. This, in turn, will streamline
+the workflow.
+
+After defining the schemes in the JSON format and making the `SchemeManager`
+class a callable element from QML under the name **Colors**, there are two
+remaining steps to fully integrate the new scheme manager in the example.
+
+The **first step** is to create a function in the `SchemeManager` class that
+loads a color scheme from the JSON file. The **second step** is to make the
+individual colors available in QML with the *same name* as used before with the
+syntax `Colors.<previousName>` as assignable properties.
+
+
+```{literalinclude} scheme_manager.py
+---
+language: python
+caption: true
+linenos: true
+lines: 26-31
+---
+```
+
+The `setScheme` method is responsible for switching between color schemes. To
+make this method accessible in QML, use the `@Slot(str)` decorator and specify
+that it takes a string as its input parameter. In this method, we populate a
+dictionary with the color values from the JSON file.
+
+> Note: For simplicity reasons no other error checking is performed.
+> You would probably want to validate the keys contained in the json.
+
+```{literalinclude} scheme_manager.py
+---
+language: python
+caption: true
+linenos: true
+start-at: "@Property(QColor"
+end-at: "return"
+---
+```
+
+To make the color property assignable in QML, use the `@Property` decorator.
+We simply return the corresponding color value from the dictionary for each
+property. This process is repeated for all other colors that are used in the
+application.
+At this point the application should start with the colors provided by the
+active scheme in the constructor.
+
+## Add the scheme switching to QML
+
+To visualize the current scheme and enable interactive scheme switching, start
+by adding a new entry to the `Sidebar.qml` file.
+
+```{literalinclude} FileSystemModule/qml/Sidebar.qml
+---
+language: QML
+caption: true
+linenos: true
+lines: 99-105
+---
+```
+
+To update the main content area of the application to display the `ColorScheme`,
+the logic that checks the active index from the Sidebar buttons needs to be
+modified. The necessary changes will be made to the Main.qml file:
+
+```{literalinclude} FileSystemModule/Main.qml
+---
+language: QML
+caption: true
+linenos: true
+lines: 170-187
+---
+```
+
+In addition, change the behavior of the application so that there are two
+`StackLayouts`: one for the resizable navigation and one for the main content
+area where we display our color scheme switching functionality. These changes
+will also be made to the Main.qml file.
+
+```{literalinclude} FileSystemModule/Main.qml
+---
+language: QML
+caption: true
+linenos: true
+lines: 147-150
+---
+```
+
+To complete our implementation, the `ColorScheme.qml` file needs to be created.
+The implementation is straightforward and follows the same principles as in the
+original example. If anything is unclear, please refer to the documentation
+provided there. To display all colors and scheme names, use a `Repeater`. The
+model for the Repeater is provided by our `scheme_manager.py`file as a
+`QStringList`.
+
+```{literalinclude} FileSystemModule/qml/ColorScheme.qml
+---
+language: QML
+caption: true
+linenos: true
+lines: 97-111
+---
+```
+
+When examining the code in more detail, you will notice that there are different
+ways to retrieve the models. The `getKeys()` method is defined as a **Slot** and
+therefore requires parentheses when called. On the other hand, the `currentColors`
+model is defined as a **property** and is therefore assigned as a property in QML.
+The reason for this is to receive notifications when the color scheme is switched
+so that the colors displayed in the application can be updated. The keys for the
+color schemes are loaded only once at application startup and do not rely on any
+notifications.
+
+![Extended Explorer GIF](resources/colorscheme.png)
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/extendedexplorer.pyproject b/sources/pyside6/doc/tutorials/extendedexplorer/extendedexplorer.pyproject
new file mode 100644
index 000000000..77a3969ae
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/extendedexplorer.pyproject
@@ -0,0 +1,31 @@
+{
+ "files": [
+ "main.py",
+ "editormodels.py",
+ "scheme_manager.py",
+ "schemes.json",
+ "FileSystemModule/qmldir",
+ "FileSystemModule/app.qrc",
+ "FileSystemModule/icons.qrc",
+ "FileSystemModule/Main.qml",
+ "FileSystemModule/qml/About.qml",
+ "FileSystemModule/qml/ColorScheme.qml",
+ "FileSystemModule/qml/Editor.qml",
+ "FileSystemModule/qml/FileSystemView.qml",
+ "FileSystemModule/qml/MyMenu.qml",
+ "FileSystemModule/qml/MyMenuBar.qml",
+ "FileSystemModule/qml/ResizeButton.qml",
+ "FileSystemModule/qml/Sidebar.qml",
+ "FileSystemModule/qml/WindowDragHandler.qml",
+ "FileSystemModule/icons/app_icon.svg",
+ "FileSystemModule/icons/folder_closed.svg",
+ "FileSystemModule/icons/folder_open.svg",
+ "FileSystemModule/icons/generic_file.svg",
+ "FileSystemModule/icons/globe.svg",
+ "FileSystemModule/icons/info_sign.svg",
+ "FileSystemModule/icons/light_bulb.svg",
+ "FileSystemModule/icons/qt_logo.svg",
+ "FileSystemModule/icons/read.svg",
+ "FileSystemModule/icons/resize.svg"
+ ]
+}
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/main.py b/sources/pyside6/doc/tutorials/extendedexplorer/main.py
new file mode 100644
index 000000000..f1e6e7d93
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/main.py
@@ -0,0 +1,50 @@
+# Copyright (C) 2024 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+"""
+This example shows how to customize Qt Quick Controls by implementing a simple filesystem explorer.
+"""
+
+# Compile both resource files app.qrc and icons.qrc and include them here if you wish
+# to load them from the resource system. Currently, all resources are loaded locally
+# import FileSystemModule.rc_icons
+# import FileSystemModule.rc_app
+
+from scheme_manager import SchemeManager
+from editormodels import FileSystemModel
+import PySide6
+from PySide6.QtGui import QGuiApplication, QIcon
+from PySide6.QtQml import QQmlApplicationEngine
+from PySide6.QtCore import QCommandLineParser
+
+import sys
+
+if __name__ == '__main__':
+ app = QGuiApplication(sys.argv)
+ app.setOrganizationName("QtProject")
+ app.setApplicationName("File System Explorer")
+ app.setApplicationVersion(PySide6.__version__)
+ app.setWindowIcon(QIcon("FileSystemModule/icons/app_icon.svg"))
+
+ parser = QCommandLineParser()
+ parser.setApplicationDescription("Qt Filesystemexplorer Example")
+ parser.addHelpOption()
+ parser.addVersionOption()
+ parser.addPositionalArgument("", "Initial directory", "[path]")
+ parser.process(app)
+ args = parser.positionalArguments()
+
+ engine = QQmlApplicationEngine()
+ # Include the path of this file to search for the 'qmldir' module
+ engine.addImportPath(sys.path[0])
+
+ engine.loadFromModule("FileSystemModule", "Main")
+
+ if not engine.rootObjects():
+ sys.exit(-1)
+
+ if (len(args) == 1):
+ fsm = engine.singletonInstance("FileSystemModule", "FileSystemModel")
+ fsm.setInitialDirectory(args[0])
+
+ sys.exit(app.exec())
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/resources/Colors.qml b/sources/pyside6/doc/tutorials/extendedexplorer/resources/Colors.qml
new file mode 100644
index 000000000..280f89286
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/resources/Colors.qml
@@ -0,0 +1,22 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+pragma Singleton
+import QtQuick
+
+QtObject {
+ readonly property color background: "#23272E"
+ readonly property color surface1: "#1E2227"
+ readonly property color surface2: "#090A0C"
+ readonly property color text: "#ABB2BF"
+ readonly property color textFile: "#C5CAD3"
+ readonly property color disabledText: "#454D5F"
+ readonly property color selection: "#2C313A"
+ readonly property color active: "#23272E"
+ readonly property color inactive: "#3E4452"
+ readonly property color folder: "#3D4451"
+ readonly property color icon: "#3D4451"
+ readonly property color iconIndicator: "#E5C07B"
+ readonly property color color1: "#E06B74"
+ readonly property color color2: "#62AEEF"
+}
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/resources/colorscheme.png b/sources/pyside6/doc/tutorials/extendedexplorer/resources/colorscheme.png
new file mode 100644
index 000000000..410538ca3
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/resources/colorscheme.png
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/resources/extendedexplorer.gif b/sources/pyside6/doc/tutorials/extendedexplorer/resources/extendedexplorer.gif
new file mode 100644
index 000000000..9e59f64aa
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/resources/extendedexplorer.gif
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/resources/extendedexplorer.webp b/sources/pyside6/doc/tutorials/extendedexplorer/resources/extendedexplorer.webp
new file mode 100644
index 000000000..79a14f34c
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/resources/extendedexplorer.webp
Binary files differ
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/scheme_manager.py b/sources/pyside6/doc/tutorials/extendedexplorer/scheme_manager.py
new file mode 100644
index 000000000..8d732093c
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/scheme_manager.py
@@ -0,0 +1,97 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import json
+from pathlib import Path
+from PySide6.QtCore import Slot, QObject, Property, Signal
+from PySide6.QtGui import QColor
+from PySide6.QtQml import QmlNamedElement, QmlSingleton
+
+QML_IMPORT_NAME = "FileSystemModule"
+QML_IMPORT_MAJOR_VERSION = 1
+
+
+@QmlNamedElement("Colors")
+@QmlSingleton
+class SchemeManager(QObject):
+
+ schemeChanged = Signal()
+
+ def __init__(self, parent=None):
+ super().__init__(parent=parent)
+ with open(Path(__file__).parent / "schemes.json", 'r') as f:
+ self.m_schemes = json.load(f)
+ self.m_activeScheme = {}
+ self.m_activeSchemeName = "Catppuccin"
+ self.setScheme(self.m_activeSchemeName)
+
+ @Slot(str)
+ def setScheme(self, theme):
+ for k, v in self.m_schemes[theme].items():
+ self.m_activeScheme[k] = QColor.fromString(v)
+ self.m_activeSchemeName = theme
+ self.schemeChanged.emit()
+
+ @Slot(result='QStringList')
+ def getKeys(self):
+ return self.m_schemes.keys()
+
+ @Property('QStringList', notify=schemeChanged)
+ def currentColors(self):
+ return self.m_schemes[self.m_activeSchemeName].values()
+
+ @Property(QColor, notify=schemeChanged)
+ def background(self):
+ return self.m_activeScheme["background"]
+
+ @Property(QColor, notify=schemeChanged)
+ def surface1(self):
+ return self.m_activeScheme["surface1"]
+
+ @Property(QColor, notify=schemeChanged)
+ def surface2(self):
+ return self.m_activeScheme["surface2"]
+
+ @Property(QColor, notify=schemeChanged)
+ def text(self):
+ return self.m_activeScheme["text"]
+
+ @Property(QColor, notify=schemeChanged)
+ def textFile(self):
+ return self.m_activeScheme["textFile"]
+
+ @Property(QColor, notify=schemeChanged)
+ def disabledText(self):
+ return self.m_activeScheme["disabledText"]
+
+ @Property(QColor, notify=schemeChanged)
+ def selection(self):
+ return self.m_activeScheme["selection"]
+
+ @Property(QColor, notify=schemeChanged)
+ def active(self):
+ return self.m_activeScheme["active"]
+
+ @Property(QColor, notify=schemeChanged)
+ def inactive(self):
+ return self.m_activeScheme["inactive"]
+
+ @Property(QColor, notify=schemeChanged)
+ def folder(self):
+ return self.m_activeScheme["folder"]
+
+ @Property(QColor, notify=schemeChanged)
+ def icon(self):
+ return self.m_activeScheme["icon"]
+
+ @Property(QColor, notify=schemeChanged)
+ def iconIndicator(self):
+ return self.m_activeScheme["iconIndicator"]
+
+ @Property(QColor, notify=schemeChanged)
+ def color1(self):
+ return self.m_activeScheme["color1"]
+
+ @Property(QColor, notify=schemeChanged)
+ def color2(self):
+ return self.m_activeScheme["color2"]
diff --git a/sources/pyside6/doc/tutorials/extendedexplorer/schemes.json b/sources/pyside6/doc/tutorials/extendedexplorer/schemes.json
new file mode 100644
index 000000000..e4f2d8c81
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/extendedexplorer/schemes.json
@@ -0,0 +1,82 @@
+{
+ "Catppuccin": {
+ "background": "#1E1E2E",
+ "surface1": "#181825",
+ "surface2": "#11111B",
+ "text": "#CDD6F4",
+ "textFile": "#CDD6F4",
+ "disabledText": "#363659",
+ "selection": "#45475A",
+ "active": "#1E1E2E",
+ "inactive": "#6C7086",
+ "folder": "#6C7086",
+ "icon": "#6C7086",
+ "iconIndicator": "#FFCC66",
+ "color1": "#CBA6F7",
+ "color2": "#89DCEB"
+ },
+ "Nordic": {
+ "background": "#2E3440",
+ "surface1": "#2B2F3A",
+ "surface2": "#262A35",
+ "text": "#D8DEE9",
+ "textFile": "#D8DEE9",
+ "disabledText": "#4D556A",
+ "selection": "#495468",
+ "active": "#2E3440",
+ "inactive": "#555B6A",
+ "folder": "#495468",
+ "icon": "#495468",
+ "iconIndicator": "#FFC40D",
+ "color1": "#81B6C6",
+ "color2": "#5E81AC"
+ },
+ "One Dark": {
+ "background": "#23272E",
+ "surface1": "#1E2227",
+ "surface2": "#090A0C",
+ "text": "#ABB2BF",
+ "textFile": "#C5CAD3",
+ "disabledText": "#2B303B",
+ "selection": "#2C313A",
+ "active": "#23272E",
+ "inactive": "#3E4452",
+ "folder": "#3D4451",
+ "icon": "#3D4451",
+ "iconIndicator": "#E5C07B",
+ "color1": "#E06B74",
+ "color2": "#62AEEF"
+ },
+ "Gruvbox": {
+ "background": "#292828",
+ "surface1": "#171819",
+ "surface2": "#090A0C",
+ "text": "#D4BE98",
+ "textFile": "#E1D2B7",
+ "disabledText": "#2C313A",
+ "selection": "#333130",
+ "active": "#292828",
+ "inactive": "#383737",
+ "folder": "#383737",
+ "icon": "#383737",
+ "iconIndicator": "#FFCC66",
+ "color1": "#A7B464",
+ "color2": "#D3869B"
+ },
+ "Solarized": {
+ "background": "#FDF6E3",
+ "surface1": "#EEE8D5",
+ "surface2": "#DDD6C1",
+ "text": "#6D6D6D",
+ "textFile": "#333333",
+ "disabledText": "#ADADAD",
+ "selection": "#D1CBB8",
+ "active": "#FDF6E3",
+ "inactive": "#8C8364",
+ "folder": "#5F5944",
+ "icon": "#5F5944",
+ "iconIndicator": "#002B36",
+ "color1": "#B58900",
+ "color2": "#6B9E75"
+ }
+}
diff --git a/sources/pyside6/doc/tutorials/index.rst b/sources/pyside6/doc/tutorials/index.rst
index ae02153e4..8a69a3c6f 100644
--- a/sources/pyside6/doc/tutorials/index.rst
+++ b/sources/pyside6/doc/tutorials/index.rst
@@ -1,5 +1,5 @@
-|project| Tutorials
-====================
+Tutorials
+=========
A collection of tutorials with walkthrough guides are
provided with |project| to help new users get started.
@@ -8,21 +8,6 @@ Some of these documents were ported from C++ to Python and cover a range of
topics, from basic use of widgets to step-by-step tutorials that show how an
application is put together.
-Before you start
-----------------
-
-If you have not installed PySide yet, remember to check the
-`Quick Start <../quickstart.html>`_ section.
-
-.. toctree::
- :maxdepth: 1
-
- pretutorial/whatisqt.rst
- pretutorial/whichide.rst
- pretutorial/whatisshiboken.rst
- pretutorial/typesoffiles.rst
- pretutorial/distribution.rst
-
Qt Widgets: Basic tutorials
---------------------------
@@ -30,11 +15,85 @@ If you want to see the available widgets in action, you can check the
`Qt Widget Gallery <https://doc.qt.io/qt-6/gallery.html>`_ to learn their
names and how they look like.
+.. grid:: 1 3 3 3
+ :gutter: 2
+
+ .. grid-item-card:: Basic Widget
+ :class-item: cover-img
+ :link: basictutorial/widgets.html
+ :img-top: basictutorial/widgets.png
+
+ Your first QtWidgets Application
+
+ .. grid-item-card:: Basic Button
+ :class-item: cover-img
+ :link: basictutorial/clickablebutton.html
+ :img-top: basictutorial/clickablebutton.png
+
+ Using a Simple Button
+
+ .. grid-item-card:: Basic Connections
+ :class-item: cover-img
+ :link: basictutorial/signals_and_slots.html
+ :img-top: basictutorial/signals_slots.png
+
+ Signals and Slots
+
+ .. grid-item-card:: Basic Dialog
+ :class-item: cover-img
+ :link: basictutorial/dialog.html
+ :img-top: basictutorial/dialog.png
+
+ Creating a Dialog Application
+
+ .. grid-item-card:: Basic Table
+ :class-item: cover-img
+ :link: basictutorial/tablewidget.html
+ :img-top: basictutorial/tablewidget.png
+
+ Displaying Data Using a Table Widget
+
+ .. grid-item-card:: Basic Tree
+ :class-item: cover-img
+ :link: basictutorial/treewidget.html
+ :img-top: basictutorial/treewidget.png
+
+ Displaying Data Using a Tree Widget
+
+ .. grid-item-card:: Basic ``ui`` files
+ :class-item: cover-img
+ :link: basictutorial/uifiles.html
+ :img-top: basictutorial/uifiles.png
+
+ Using .ui files from Designer or QtCreator with QUiLoader and pyside6-uic
+
+ .. grid-item-card:: Basic ``qrc`` files
+ :class-item: cover-img
+ :link: basictutorial/qrcfiles.html
+ :img-top: basictutorial/player-new.png
+
+ Using .qrc Files (pyside6-rcc)
+
+ .. grid-item-card:: Basic Translations
+ :class-item: cover-img
+ :link: basictutorial/translations.html
+ :img-top: basictutorial/translations.png
+
+ Translating Applications
+
+ .. grid-item-card:: Basic Widget Style
+ :class-item: cover-img
+ :link: basictutorial/widgetstyling.html
+ :img-top: basictutorial/widgetstyling-yes.png
+
+ Styling the Widgets Application
+
.. toctree::
- :maxdepth: 1
+ :hidden:
basictutorial/widgets.rst
basictutorial/clickablebutton.rst
+ basictutorial/signals_and_slots.rst
basictutorial/dialog.rst
basictutorial/tablewidget.rst
basictutorial/treewidget.rst
@@ -47,25 +106,88 @@ names and how they look like.
Quick/QML: Basic tutorials
--------------------------
+.. grid:: 1 3 3 3
+ :gutter: 2
+
+ .. grid-item-card:: Basic Quick
+ :class-item: cover-img
+ :link: basictutorial/qml.html
+ :img-top: basictutorial/greenapplication.png
+
+ Your First QtQuick/QML Application
+
+ .. grid-item-card:: Basic QML Integration
+ :class-item: cover-img
+ :link: qmlintegration/qmlintegration.html
+ :img-top: qmlintegration/textproperties_material.png
+
+ Python-QML integration
+
+ .. grid-item-card:: QML Application
+ :class-item: cover-img
+ :link: qmlapp/qmlapplication.html
+ :img-top: qmlapp/qmlapplication.png
+
+ QML Application Tutorial (QtCreator)
+
+ .. grid-item-card:: Advanced QML Integration
+ :class-item: cover-img
+ :link: qmlsqlintegration/qmlsqlintegration.html
+ :img-top: qmlsqlintegration/example_list_view.png
+
+ QML, SQL and PySide Integration Tutorial
+
+ .. grid-item-card:: Extended Explorer
+ :class-item: cover-img
+ :link: extendedexplorer/extendedexplorer.html
+ :img-top: extendedexplorer/resources/extendedexplorer.webp
+
+ Extending an Qt Quick Controls example
+
.. toctree::
:maxdepth: 1
+ :hidden:
basictutorial/qml.rst
qmlintegration/qmlintegration.rst
+ qmlapp/qmlapplication.rst
+ qmlsqlintegration/qmlsqlintegration.rst
+ extendedexplorer/extendedexplorer.md
-Real use-cases applications
----------------------------
+General Applications
+--------------------
+
+.. grid:: 1 3 3 3
+ :gutter: 2
+
+ .. grid-item-card:: Data Visualization
+ :class-item: cover-img
+ :link: datavisualize/index.html
+ :img-top: datavisualize/images/datavisualization_app.png
+
+ Data Visualization Tool
+
+ .. grid-item-card:: Expenses Application
+ :class-item: cover-img
+ :link: expenses/expenses.html
+ :img-top: expenses/expenses_tool.png
+
+ Expenses administration tool
.. toctree::
- :maxdepth: 1
+ :hidden:
- qmlapp/qmlapplication.rst
- qmlsqlintegration/qmlsqlintegration.rst
-..
datavisualize/index.rst
-..
expenses/expenses.rst
+Qt Overviews
+------------
+
+.. toctree::
+ :maxdepth: 1
+
+ ../overviews/overviews-main.rst
+
C++ and Python
--------------
@@ -73,3 +195,12 @@ C++ and Python
:maxdepth: 1
portingguide/index.rst
+
+Debug a PySide6 Application
+---------------------------
+.. toctree::
+ :maxdepth: 1
+
+ debugging/mixed_debugging.rst
+ debugging/qml_debugging.rst
+
diff --git a/sources/pyside6/doc/tutorials/modelviewprogramming/qlistview-dnd.py b/sources/pyside6/doc/tutorials/modelviewprogramming/qlistview-dnd.py
new file mode 100644
index 000000000..3a37cc0f3
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/modelviewprogramming/qlistview-dnd.py
@@ -0,0 +1,137 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import sys
+
+from PySide6.QtWidgets import (QAbstractItemView, QApplication, QMainWindow,
+ QListView)
+from PySide6.QtCore import (QByteArray, QDataStream, QIODevice, QMimeData,
+ QModelIndex, QStringListModel, Qt)
+
+
+class DragDropListModel(QStringListModel):
+ """A simple model that uses a QStringList as its data source."""
+
+ def __init__(self, strings, parent=None):
+ super().__init__(strings, parent)
+
+#! [0]
+
+ def canDropMimeData(self, data, action, row, column, parent):
+ if not data.hasFormat("application/vnd.text.list"):
+ return False
+
+ if column > 0:
+ return False
+
+ return True
+#! [0]
+#! [1]
+ def dropMimeData(self, data, action, row, column, parent):
+ if not self.canDropMimeData(data, action, row, column, parent):
+ return False
+
+ if action == Qt.IgnoreAction:
+ return True
+#! [1]
+
+#! [2]
+ begin_row = 0
+
+ if row != -1:
+ begin_row = row
+#! [2] #! [3]
+ elif parent.isValid():
+ begin_row = parent.row()
+#! [3] #! [4]
+ else:
+ begin_row = self.rowCount(QModelIndex())
+#! [4]
+
+#! [5]
+ encoded_data = data.data("application/vnd.text.list")
+ stream = QDataStream(encoded_data, QIODevice.ReadOnly)
+ new_items = []
+ while not stream.atEnd():
+ new_items.append(stream.readQString())
+#! [5]
+
+#! [6]
+ self.insertRows(begin_row, len(new_items), QModelIndex())
+ for text in new_items:
+ idx = self.index(begin_row, 0, QModelIndex())
+ self.setData(idx, text)
+ begin_row += 1
+
+ return True
+#! [6]
+
+#! [7]
+ def flags(self, index):
+ default_flags = super().flags(index)
+ if index.isValid():
+ return Qt.ItemIsDragEnabled | Qt.ItemIsDropEnabled | default_flags
+ return Qt.ItemIsDropEnabled | default_flags
+#! [7]
+
+#! [8]
+ def mimeData(self, indexes):
+ mime_data = QMimeData()
+ encoded_data = QByteArray()
+ stream = QDataStream(encoded_data, QIODevice.WriteOnly)
+ for index in indexes:
+ if index.isValid():
+ text = self.data(index, Qt.DisplayRole)
+ stream.writeQString(text)
+
+ mime_data.setData("application/vnd.text.list", encoded_data)
+ return mime_data
+#! [8]
+
+#! [9]
+ def mimeTypes(self):
+ return ["application/vnd.text.list"]
+#! [9]
+
+#! [10]
+ def supportedDropActions(self):
+ return Qt.CopyAction | Qt.MoveAction
+#! [10]
+
+
+class MainWindow(QMainWindow):
+
+ def __init__(self, parent=None):
+ super().__init__(parent)
+
+ file_menu = self.menuBar().addMenu("&File")
+ quit_action = file_menu.addAction("E&xit")
+ quit_action.setShortcut("Ctrl+Q")
+
+#! [mainwindow0]
+ self._list_view = QListView(self)
+ self._list_view.setSelectionMode(QAbstractItemView.ExtendedSelection)
+ self._list_view.setDragEnabled(True)
+ self._list_view.setAcceptDrops(True)
+ self._list_view.setDropIndicatorShown(True)
+#! [mainwindow0]
+
+ quit_action.triggered.connect(self.close)
+
+ self.setup_list_items()
+
+ self.setCentralWidget(self._list_view)
+ self.setWindowTitle("List View")
+
+ def setup_list_items(self):
+ items = ["Oak", "Fir", "Pine", "Birch", "Hazel", "Redwood", "Sycamore",
+ "Chestnut", "Mahogany"]
+ model = DragDropListModel(items, self)
+ self._list_view.setModel(model)
+
+
+if __name__ == '__main__':
+ app = QApplication(sys.argv)
+ window = MainWindow()
+ window.show()
+ sys.exit(app.exec())
diff --git a/sources/pyside6/doc/tutorials/modelviewprogramming/simplemodel-use.py b/sources/pyside6/doc/tutorials/modelviewprogramming/simplemodel-use.py
new file mode 100644
index 000000000..1bacfd829
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/modelviewprogramming/simplemodel-use.py
@@ -0,0 +1,44 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import sys
+
+from PySide6.QtWidgets import (QApplication, QFileSystemModel, QLabel,
+ QVBoxLayout, QWidget)
+from PySide6.QtGui import QPalette
+from PySide6.QtCore import QDir, Qt
+
+
+if __name__ == '__main__':
+ app = QApplication(sys.argv)
+
+ window = QWidget()
+ layout = QVBoxLayout(window)
+ title = QLabel("Some items from the directory model", window)
+ title.setBackgroundRole(QPalette.Base)
+ title.setMargin(8)
+ layout.addWidget(title)
+
+#! [0]
+ model = QFileSystemModel()
+ model.setRootPath(QDir.currentPath())
+
+ def on_directory_loaded(directory):
+ parent_index = model.index(directory)
+ num_rows = model.rowCount(parent_index)
+#! [1]
+ for row in range(num_rows):
+ index = model.index(row, 0, parent_index)
+#! [1]
+#! [2]
+ text = model.data(index, Qt.DisplayRole)
+#! [2]
+ label = QLabel(text, window)
+ layout.addWidget(label)
+
+ model.directoryLoaded.connect(on_directory_loaded)
+#! [0]
+
+ window.setWindowTitle("A simple model example")
+ window.show()
+ sys.exit(app.exec())
diff --git a/sources/pyside6/doc/tutorials/modelviewprogramming/stringlistmodel.py b/sources/pyside6/doc/tutorials/modelviewprogramming/stringlistmodel.py
new file mode 100644
index 000000000..2c8493aa9
--- /dev/null
+++ b/sources/pyside6/doc/tutorials/modelviewprogramming/stringlistmodel.py
@@ -0,0 +1,124 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import sys
+
+from PySide6.QtWidgets import (QApplication, QListView)
+from PySide6.QtCore import QAbstractListModel, QStringListModel, QModelIndex, Qt
+
+
+#! [0]
+class StringListModel(QAbstractListModel):
+ def __init__(self, strings, parent=None):
+ super().__init__(parent)
+ self._strings = strings
+
+#! [0]
+ def rowCount(self, parent=QModelIndex()):
+ """Returns the number of items in the string list as the number of rows
+ in the model."""
+ return len(self._strings)
+#! [0]
+
+#! [1]
+ def data(self, index, role):
+ """Returns an appropriate value for the requested data.
+ If the view requests an invalid index, an invalid variant is returned.
+ Any valid index that corresponds to a string in the list causes that
+ string to be returned."""
+ row = index.row()
+ if not index.isValid() or row >= len(self._strings):
+ return None
+ if role != Qt.DisplayRole and role != Qt.EditRole:
+ return None
+ return self._strings[row]
+#! [1]
+
+#! [2]
+ def headerData(self, section, orientation, role=Qt.DisplayRole):
+ """Returns the appropriate header string depending on the orientation of
+ the header and the section. If anything other than the display role is
+ requested, we return an invalid variant."""
+ if role != Qt.DisplayRole:
+ return None
+ if orientation == Qt.Horizontal:
+ return f"Column {section}"
+ return f"Row {section}"
+#! [2]
+
+#! [3]
+ def flags(self, index):
+ """Returns an appropriate value for the item's flags. Valid items are
+ enabled, selectable, and editable."""
+
+ if not index.isValid():
+ return Qt.ItemIsEnabled
+ return super().flags(index) | Qt.ItemIsEditable
+#! [3]
+
+ #! [4]
+ def setData(self, index, value, role=Qt.EditRole):
+ """Changes an item in the string list, but only if the following conditions
+ are met:
+
+ # The index supplied is valid.
+ # The index corresponds to an item to be shown in a view.
+ # The role associated with editing text is specified.
+
+ The dataChanged() signal is emitted if the item is changed."""
+
+ if index.isValid() and role == Qt.EditRole:
+ self._strings[index.row()] = value
+ self.dataChanged.emit(index, index, {role})
+ return True
+#! [4] #! [5]
+ return False
+#! [5]
+
+#! [6]
+ def insertRows(self, position, rows, parent):
+ """Inserts a number of rows into the model at the specified position."""
+ self.beginInsertRows(QModelIndex(), position, position + rows - 1)
+ for row in range(rows):
+ self._strings.insert(position, "")
+ self.endInsertRows()
+ return True
+#! [6] #! [7]
+#! [7]
+
+#! [8]
+ def removeRows(self, position, rows, parent):
+ """Removes a number of rows from the model at the specified position."""
+ self.beginRemoveRows(QModelIndex(), position, position + rows - 1)
+ for row in range(rows):
+ del self._strings[position]
+ self.endRemoveRows()
+ return True
+#! [8] #! [9]
+#! [9]
+
+
+#! [main0]
+if __name__ == '__main__':
+ app = QApplication(sys.argv)
+
+#! [main1]
+ numbers = ["One", "Two", "Three", "Four", "Five"]
+ model = StringListModel(numbers)
+#! [main0] #! [main1] #! [main2] #! [main3]
+ view = QListView()
+#! [main2]
+ view.setWindowTitle("View onto a string list model")
+#! [main4]
+ view.setModel(model)
+#! [main3] #! [main4]
+
+ model.insertRows(5, 7, QModelIndex())
+ for row in range(5, 12):
+ index = model.index(row, 0, QModelIndex())
+ model.setData(index, f"{row+1}")
+
+#! [main5]
+ view.show()
+ sys.exit(app.exec())
+#! [main5]
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter1/chapter1.rst b/sources/pyside6/doc/tutorials/portingguide/chapter1/chapter1.rst
index 20b11065a..87fb97660 100644
--- a/sources/pyside6/doc/tutorials/portingguide/chapter1/chapter1.rst
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter1/chapter1.rst
@@ -17,7 +17,7 @@ the beginning of ``createdb.py``:
.. literalinclude:: createdb.py
:language: python
:linenos:
- :lines: 40-44
+ :lines: 3-5
The ``initDb`` function does most of the work needed to
set up the database, but it depends on the ``addAuthor``,
@@ -26,40 +26,40 @@ the tables. Port these helper functions first. Here is how
the C++ and Python versions of these functions look like:
C++ version
-------------
+-----------
.. literalinclude:: initdb.h
:language: c++
:linenos:
- :lines: 55-81
+ :lines: 9-33
Python version
----------------
+--------------
.. literalinclude:: createdb.py
:language: python
:linenos:
- :lines: 44-65
+ :lines: 7-28
Now that the helper functions are in place, port ``initDb``.
Here is how the C++ and Python versions of this function
looks like:
-C++ version
-------------
+C++ version (initDb)
+--------------------
.. literalinclude:: initdb.h
:language: c++
:linenos:
- :lines: 81-159
+ :lines: 35-112
-Python version
----------------
+Python version (init_db)
+------------------------
.. literalinclude:: createdb.py
:language: python
:linenos:
- :lines: 65-
+ :lines: 28-
.. note:: The Python version uses the ``check`` function to
execute the SQL statements instead of the ``if...else``
@@ -73,11 +73,11 @@ test it, add the following code to ``main.py`` and run it:
.. literalinclude:: main.py
:language: python
:linenos:
- :lines: 40-
+ :lines: 3-
Use the following command from the prompt to run:
-.. code-block::
+.. code-block:: bash
python main.py
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter1/createdb.py b/sources/pyside6/doc/tutorials/portingguide/chapter1/createdb.py
index c3f27162d..da7d201a8 100644
--- a/sources/pyside6/doc/tutorials/portingguide/chapter1/createdb.py
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter1/createdb.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
from PySide6.QtSql import QSqlDatabase, QSqlError, QSqlQuery
from datetime import date
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter1/initdb.h b/sources/pyside6/doc/tutorials/portingguide/chapter1/initdb.h
index 773e3fb74..5596defc0 100644
--- a/sources/pyside6/doc/tutorials/portingguide/chapter1/initdb.h
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter1/initdb.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef INITDB_H
#define INITDB_H
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter1/main.py b/sources/pyside6/doc/tutorials/portingguide/chapter1/main.py
index c60ff6839..c1293bcbd 100644
--- a/sources/pyside6/doc/tutorials/portingguide/chapter1/main.py
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter1/main.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.cpp b/sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.cpp
index 4115f80cf..3d246667b 100644
--- a/sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.cpp
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "bookdelegate.h"
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.h b/sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.h
index f1b432699..d0b157b39 100644
--- a/sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.h
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.h
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef BOOKDELEGATE_H
#define BOOKDELEGATE_H
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.py b/sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.py
index 31acc901b..2c2b80157 100644
--- a/sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.py
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter2/bookdelegate.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import copy
import os
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter2/chapter2.rst b/sources/pyside6/doc/tutorials/portingguide/chapter2/chapter2.rst
index a574218fd..83ba3357b 100644
--- a/sources/pyside6/doc/tutorials/portingguide/chapter2/chapter2.rst
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter2/chapter2.rst
@@ -12,7 +12,7 @@ editor for foreign key fields. To begin with, create
.. literalinclude:: bookdelegate.py
:language: python
:linenos:
- :lines: 40-47
+ :lines: 3-10
After the necessary ``import`` statements, port the
constructor code for the ``BookDelegate`` class. Both
@@ -26,7 +26,7 @@ C++ version
.. literalinclude:: bookdelegate.cpp
:language: c++
:linenos:
- :lines: 54-59
+ :lines: 17-22
Python version
---------------
@@ -34,7 +34,7 @@ Python version
.. literalinclude:: bookdelegate.py
:language: python
:linenos:
- :lines: 47-54
+ :lines: 10-17
.. note:: The Python version loads the ``QPixmap`` using
the absolute path of ``star.png`` in the local
@@ -47,21 +47,21 @@ For example, painting stars to represent the rating for
each book in the table. Here is how the reimplemented
code looks like:
-C++ version
-------------
+C++ version (bookdelegate)
+--------------------------
.. literalinclude:: bookdelegate.cpp
:language: c++
:linenos:
- :lines: 59-
+ :lines: 22-
-Python version
----------------
+Python version (bookdelegate)
+-----------------------------
.. literalinclude:: bookdelegate.py
:language: python
:linenos:
- :lines: 55-
+ :lines: 18-
Now that the delegate is in place, run the following
``main.py`` to see how the data is presented:
@@ -69,7 +69,7 @@ Now that the delegate is in place, run the following
.. literalinclude:: main.py
:language: python
:linenos:
- :lines: 40-
+ :lines: 3-
Here is how the application will look when you run it:
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter2/createdb.py b/sources/pyside6/doc/tutorials/portingguide/chapter2/createdb.py
index c3f27162d..da7d201a8 100644
--- a/sources/pyside6/doc/tutorials/portingguide/chapter2/createdb.py
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter2/createdb.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
from PySide6.QtSql import QSqlDatabase, QSqlError, QSqlQuery
from datetime import date
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter2/main.py b/sources/pyside6/doc/tutorials/portingguide/chapter2/main.py
index cf023fb35..3cc55fa46 100644
--- a/sources/pyside6/doc/tutorials/portingguide/chapter2/main.py
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter2/main.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter3/bookdelegate-old.py b/sources/pyside6/doc/tutorials/portingguide/chapter3/bookdelegate-old.py
index 3ca6a6953..b3187e054 100644
--- a/sources/pyside6/doc/tutorials/portingguide/chapter3/bookdelegate-old.py
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/bookdelegate-old.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import copy
import os
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter3/bookdelegate.py b/sources/pyside6/doc/tutorials/portingguide/chapter3/bookdelegate.py
index 4594508d5..145d6b73e 100644
--- a/sources/pyside6/doc/tutorials/portingguide/chapter3/bookdelegate.py
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/bookdelegate.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import copy, os
from PySide6.QtSql import QSqlRelationalDelegate
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.cpp b/sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.cpp
index 76f3c9da8..6ec1b9e19 100644
--- a/sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.cpp
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "bookwindow.h"
#include "bookdelegate.h"
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.py b/sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.py
index e080d7c11..bb033c6d2 100644
--- a/sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.py
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/bookwindow.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
from PySide6.QtGui import QAction
from PySide6.QtWidgets import (QAbstractItemView, QDataWidgetMapper,
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter3/chapter3.rst b/sources/pyside6/doc/tutorials/portingguide/chapter3/chapter3.rst
index b2e06b144..98d4d3982 100644
--- a/sources/pyside6/doc/tutorials/portingguide/chapter3/chapter3.rst
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/chapter3.rst
@@ -11,7 +11,7 @@ and add the following imports to it:
.. literalinclude:: bookwindow.py
:language: python
:linenos:
- :lines: 40-53
+ :lines: 3-16
.. note:: The imports include the ``BookDelegate`` you
ported earlier and the ``Ui_BookWindow``. The pyside-uic
@@ -21,9 +21,9 @@ and add the following imports to it:
To generate this Python code, run the following command on the
prompt:
-.. code-block::
+.. code-block:: bash
- pyside6-uic bookwindow.ui > ui_bookwindow.py
+ pyside6-uic bookwindow.ui -o ui_bookwindow.py
Try porting the remaining code now. To begin with, here is
how both the versions of the constructor code looks:
@@ -34,7 +34,7 @@ C++ version
.. literalinclude:: bookwindow.cpp
:language: c++
:linenos:
- :lines: 57-140
+ :lines: 20-103
Python version
---------------
@@ -42,7 +42,7 @@ Python version
.. literalinclude:: bookwindow.py
:language: python
:linenos:
- :lines: 53-116
+ :lines: 16-79
.. note:: The Python version of the ``BookWindow`` class
definition inherits from both ``QMainWindow`` and
@@ -57,7 +57,7 @@ C++ version
.. literalinclude:: bookwindow.cpp
:language: c++
:linenos:
- :lines: 115-
+ :lines: 78-
Python version
---------------
@@ -65,7 +65,7 @@ Python version
.. literalinclude:: bookwindow.py
:language: python
:linenos:
- :lines: 117-
+ :lines: 80-
Now that all the necessary pieces are in place, try to put
them together in ``main.py``.
@@ -73,7 +73,7 @@ them together in ``main.py``.
.. literalinclude:: main.py
:language: python
:linenos:
- :lines: 40-
+ :lines: 3-
Try running this to see if you get the following output:
@@ -101,9 +101,9 @@ image only.
Now, run the ``pyside6-rcc`` tool on the ``books.qrc`` file
to generate ``rc_books.py``.
-.. code-block::
+.. code-block:: bash
- pyside6-rcc books.qrc > rc_books.py
+ pyside6-rcc books.qrc -o rc_books.py
Once you have the Python script generated, make the
following changes to ``bookdelegate.py`` and ``main.py``:
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter3/createdb.py b/sources/pyside6/doc/tutorials/portingguide/chapter3/createdb.py
index c3f27162d..da7d201a8 100644
--- a/sources/pyside6/doc/tutorials/portingguide/chapter3/createdb.py
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/createdb.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
from PySide6.QtSql import QSqlDatabase, QSqlError, QSqlQuery
from datetime import date
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter3/main-old.py b/sources/pyside6/doc/tutorials/portingguide/chapter3/main-old.py
index edaf5cf60..164fc589a 100644
--- a/sources/pyside6/doc/tutorials/portingguide/chapter3/main-old.py
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/main-old.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
from PySide6.QtWidgets import QApplication
diff --git a/sources/pyside6/doc/tutorials/portingguide/chapter3/main.py b/sources/pyside6/doc/tutorials/portingguide/chapter3/main.py
index 3994a66b4..9a6575dc2 100644
--- a/sources/pyside6/doc/tutorials/portingguide/chapter3/main.py
+++ b/sources/pyside6/doc/tutorials/portingguide/chapter3/main.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
from PySide6.QtWidgets import QApplication
diff --git a/sources/pyside6/doc/tutorials/portingguide/hello_world_ex.py b/sources/pyside6/doc/tutorials/portingguide/hello_world_ex.py
index f29cbd9ba..d67906fa7 100644
--- a/sources/pyside6/doc/tutorials/portingguide/hello_world_ex.py
+++ b/sources/pyside6/doc/tutorials/portingguide/hello_world_ex.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2019 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
import random
diff --git a/sources/pyside6/doc/tutorials/portingguide/index.rst b/sources/pyside6/doc/tutorials/portingguide/index.rst
index bc7e6dee5..0b89c2ff8 100644
--- a/sources/pyside6/doc/tutorials/portingguide/index.rst
+++ b/sources/pyside6/doc/tutorials/portingguide/index.rst
@@ -8,7 +8,7 @@ to Python to understand this.
Before you start, ensure that all the prerequisites for
Qt for Python are met. See
-:doc:`Getting Started <../../gettingstarted>` for more
+:doc:`Getting Started <../../gettingstarted/index>` for more
information. In addition, familiarize yourself with the
basic differences between Qt in C++ and in Python.
@@ -63,7 +63,7 @@ C++ vs Python
doStuff(key, value)
In this example, ``func()`` would treat ``var`` as a local
-name without the ``global`` statement. This would lead to
+name without the ``global`` statement. This would lead to
a ``NameError`` in the ``value is None`` handling, on
accessing ``var``. For more information about this, see
`Python refernce documentation <python refdoc>`_.
@@ -153,7 +153,7 @@ demonstrating some of these differences:
.. literalinclude:: hello_world_ex.py
:linenos:
- :lines: 40-
+ :lines: 3-
.. note:: The ``if`` block is just a good practice when
developing a Python application. It lets the Python file
diff --git a/sources/pyside6/doc/tutorials/qmlapp/main.py b/sources/pyside6/doc/tutorials/qmlapp/main.py
index 490cb79ea..8b1b25440 100644
--- a/sources/pyside6/doc/tutorials/qmlapp/main.py
+++ b/sources/pyside6/doc/tutorials/qmlapp/main.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2021 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
import urllib.request
diff --git a/sources/pyside6/doc/tutorials/qmlapp/qmlapplication.rst b/sources/pyside6/doc/tutorials/qmlapp/qmlapplication.rst
index 082490f4b..c6d72e742 100644
--- a/sources/pyside6/doc/tutorials/qmlapp/qmlapplication.rst
+++ b/sources/pyside6/doc/tutorials/qmlapp/qmlapplication.rst
@@ -9,21 +9,21 @@ QtQml and QtQuick modules provides the necessary infrastructure for
QML-based UIs.
In this tutorial, you'll also learn how to provide data from Python
-as a QML context property, which is then consumed by the ListView
+as a QML initial property, which is then consumed by the ListView
defined in the QML file.
Before you begin, install the following prerequisites:
* The `PySide6 <https://pypi.org/project/PySide6/>`_ Python packages.
-* Qt Creator v4.9 beta1 or later from
- `http://download.qt.io
- <http://download.qt.io/snapshots/qtcreator/4.9/4.9.0-beta1/>`_.
+* *Qt Creator* from
+ `https://download.qt.io
+ <https://download.qt.io/snapshots/qtcreator/>`_.
The following step-by-step instructions guide you through application
-development process using Qt Creator:
+development process using *Qt Creator*:
-#. Open Qt Creator and select **File > New File or Project..** menu item
+#. Open *Qt Creator* and select **File > New File or Project..** menu item
to open following dialog:
.. image:: newpyproject.png
@@ -61,8 +61,8 @@ development process using Qt Creator:
.. literalinclude:: main.py
:linenos:
- :lines: 40-60
- :emphasize-lines: 12-20
+ :lines: 3-23
+ :emphasize-lines: 7-9,14-17
#. Now, set up the application window using
:ref:`PySide6.QtGui.QGuiApplication<qguiapplication>`, which manages the application-wide
@@ -70,7 +70,7 @@ development process using Qt Creator:
.. literalinclude:: main.py
:linenos:
- :lines: 40-65
+ :lines: 3-28
:emphasize-lines: 23-25
.. note:: Setting the resize policy is important if you want the
@@ -78,28 +78,28 @@ development process using Qt Creator:
Otherwise, the root item will retain its original size on
resizing the window.
-#. You can now expose the ``data_list`` variable as a QML context
+#. You can now expose the ``data_list`` variable as a QML initial
property, which will be consumed by the QML ListView item in ``view.qml``.
.. literalinclude:: main.py
:linenos:
- :lines: 40-70
- :emphasize-lines: 27-30
+ :lines: 3-33
+ :emphasize-lines: 28-31
#. Load the ``view.qml`` to the ``QQuickView`` and call ``show()`` to
display the application window.
.. literalinclude:: main.py
:linenos:
- :lines: 40-79
- :emphasize-lines: 33-39
+ :lines: 3-42
+ :emphasize-lines: 33-40
#. Finally, execute the application to start the event loop and clean up.
.. literalinclude:: main.py
:linenos:
- :lines: 40-
- :emphasize-lines: 41-43
+ :lines: 3-
+ :emphasize-lines: 42-44
#. Your application is ready to be run now. Select **Projects** mode to
choose the Python version to run it.
diff --git a/sources/pyside6/doc/tutorials/qmlapp/view.qml b/sources/pyside6/doc/tutorials/qmlapp/view.qml
index 5590fd1f8..7f9b1d777 100644
--- a/sources/pyside6/doc/tutorials/qmlapp/view.qml
+++ b/sources/pyside6/doc/tutorials/qmlapp/view.qml
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick 2.12
import QtQuick.Controls 2.12
diff --git a/sources/pyside6/doc/tutorials/qmlintegration/main.py b/sources/pyside6/doc/tutorials/qmlintegration/main.py
index 0408313d3..0a751d7d1 100644
--- a/sources/pyside6/doc/tutorials/qmlintegration/main.py
+++ b/sources/pyside6/doc/tutorials/qmlintegration/main.py
@@ -1,42 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2021 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python examples of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:BSD$
-## You may use this file under the terms of the BSD license as follows:
-##
-## "Redistribution and use in source and binary forms, with or without
-## modification, are permitted provided that the following conditions are
-## met:
-## * Redistributions of source code must retain the above copyright
-## notice, this list of conditions and the following disclaimer.
-## * Redistributions in binary form must reproduce the above copyright
-## notice, this list of conditions and the following disclaimer in
-## the documentation and/or other materials provided with the
-## distribution.
-## * Neither the name of The Qt Company Ltd nor the names of its
-## contributors may be used to endorse or promote products derived
-## from this software without specific prior written permission.
-##
-##
-## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import sys
from pathlib import Path
@@ -46,6 +9,7 @@ from PySide6.QtGui import QGuiApplication
from PySide6.QtQml import QQmlApplicationEngine, QmlElement
from PySide6.QtQuickControls2 import QQuickStyle
+import style_rc
# To be used on the @QmlElement decorator
# (QML_IMPORT_MINOR_VERSION is optional)
diff --git a/sources/pyside6/doc/tutorials/qmlintegration/qmlintegration.rst b/sources/pyside6/doc/tutorials/qmlintegration/qmlintegration.rst
index 46b055e13..ff6fe3e31 100644
--- a/sources/pyside6/doc/tutorials/qmlintegration/qmlintegration.rst
+++ b/sources/pyside6/doc/tutorials/qmlintegration/qmlintegration.rst
@@ -1,18 +1,18 @@
-Python-based context properties
-===============================
+Python-QML integration
+======================
This tutorial provides a quick walk-through of a python application that loads, and interacts with
-a QML file. QML is a declarative language that lets you design UIs faster than a traditional
-language, such as C++. The QtQml and QtQuick modules provides the necessary infrastructure for
+a QML file. QML is a declarative language that lets you design UIs faster than a traditional
+language, such as C++. The QtQml and QtQuick modules provides the necessary infrastructure for
QML-based UIs.
-In this tutorial, you will learn how to integrate Python with a QML application through a context
-property. This mechanism will help us to understand how to use Python as a backend for certain
-signals from the UI elements in the QML interface. Additionally, you will learn how to provide
+In this tutorial, you will learn how to integrate Python with a QML application.
+This mechanism will help us to understand how to use Python as a backend for certain
+signals from the UI elements in the QML interface. Additionally, you will learn how to provide
a modern look to your QML application using one of the features from Qt Quick Controls 2.
The tutorial is based on an application that allow you to set many text properties, like increasing
-the font size, changing the color, changing the style, and so on. Before you begin, install the
+the font size, changing the color, changing the style, and so on. Before you begin, install the
`PySide6 <https://pypi.org/project/PySide6/>`_ Python packages.
The following step-by-step process will guide you through the key elements of the QML based
@@ -29,29 +29,47 @@ application and PySide6 integration:
.. literalinclude:: main.py
:linenos:
- :lines: 98-108
- :emphasize-lines: 6,9
+ :lines: 63-76
+ :emphasize-lines: 4,9
- Notice that we specify the name of the context property, **con**,
- and also we explicitly load our QML file.
+ Notice that we only need a :code:`QQmlApplicationEngine` to
+ :code:`load` the QML file.
-#. Define the `Bridge` class, containing all the logic for the context property:
+#. Define the ``Bridge`` class, containing all the logic for the element
+ that will be register in QML:
.. literalinclude:: main.py
:linenos:
- :lines: 51-91
+ :lines: 14-54
+ :emphasize-lines: 3,4,7
-#. Now, go back to the QML file and connect the signals to the slots defined in the `Bridge` class:
+ Notice that the registration happens thanks to the :code:`QmlElement`
+ decorator, that underneath uses the reference to the :code:`Bridge`
+ class and the variables :code:`QML_IMPORT_NAME` and
+ :code:`QML_IMPORT_MAJOR_VERSION`.
+
+#. Now, go back to the QML file and connect the signals to the slots defined in the ``Bridge`` class:
+
+ .. code:: js
+
+ Bridge {
+ id: bridge
+ }
+
+ Inside the :code:`ApplicationWindow` we declare a component
+ with the same name as the Python class, and provide an :code:`id:`.
+ This :code:`id` will help you to get a reference to the element
+ that was registered from Python.
.. literalinclude:: view.qml
:linenos:
- :lines: 85-93
- :emphasize-lines: 5-7
+ :lines: 45-55
+ :emphasize-lines: 6-8
The properties *Italic*, *Bold*, and *Underline* are mutually
exclusive, this means only one can be active at any time.
- To achieve this each time we select one of these options, we
- check the three properties via the context property as you can
+ To achieve this each time we select one of these options, we
+ check the three properties via the QML element property as you can
see in the above snippet.
Only one of the three will return *True*, while the other two
will return *False*, that is how we make sure only one is being
@@ -62,7 +80,7 @@ application and PySide6 integration:
.. literalinclude:: main.py
:linenos:
- :lines: 79-84
+ :lines: 42-47
:emphasize-lines: 4,6
Returning *True* or *False* allows you to activate and deactivate
@@ -73,31 +91,31 @@ application and PySide6 integration:
.. literalinclude:: main.py
:linenos:
- :lines: 64-70
+ :lines: 34-39
#. Now, for changing the look of our application, you have two options:
- 1. Use the command line: execute the python file adding the option, `--style`::
+ 1. Use the command line: execute the python file adding the option, ``--style``::
python main.py --style material
- 2. Use a `qtquickcontrols2.conf` file:
+ 2. Use a ``qtquickcontrols2.conf`` file:
.. literalinclude:: qtquickcontrols2.conf
:linenos:
- Then add it to your `.qrc` file:
+ Then add it to your ``.qrc`` file:
.. literalinclude:: style.qrc
:linenos:
- Generate the *rc* file running, `pyside6-rcc style.qrc > style_rc.py`
- And finally import it from your `main.py` script.
+ Generate the *rc* file running, ``pyside6-rcc style.qrc -o style_rc.py``
+ And finally import it from your ``main.py`` script.
.. literalinclude:: main.py
:linenos:
- :lines: 41-48
- :emphasize-lines: 8
+ :lines: 4-12
+ :emphasize-lines: 9
You can read more about this configuration file
`here <https://doc.qt.io/qt-5/qtquickcontrols2-configuration.html>`_.
diff --git a/sources/pyside6/doc/tutorials/qmlintegration/view.qml b/sources/pyside6/doc/tutorials/qmlintegration/view.qml
index de9715ee1..635603fac 100644
--- a/sources/pyside6/doc/tutorials/qmlintegration/view.qml
+++ b/sources/pyside6/doc/tutorials/qmlintegration/view.qml
@@ -1,42 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt for Python examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick 2.0
diff --git a/sources/pyside6/doc/tutorials/qmlsqlintegration/chat.qml b/sources/pyside6/doc/tutorials/qmlsqlintegration/chat.qml
index 453be1252..da58ae9b2 100644
--- a/sources/pyside6/doc/tutorials/qmlsqlintegration/chat.qml
+++ b/sources/pyside6/doc/tutorials/qmlsqlintegration/chat.qml
@@ -1,46 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-import QtQuick 2.12
-import QtQuick.Layouts 1.12
-import QtQuick.Controls 2.12
-import ChatModel 1.0
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls
+import ChatModel
ApplicationWindow {
id: window
@@ -54,7 +18,7 @@ ApplicationWindow {
}
ColumnLayout {
- anchors.fill: parent
+ anchors.fill: window
ListView {
id: listView
diff --git a/sources/pyside6/doc/tutorials/qmlsqlintegration/main.py b/sources/pyside6/doc/tutorials/qmlsqlintegration/main.py
index 3cd19e96e..314fd5aa5 100644
--- a/sources/pyside6/doc/tutorials/qmlsqlintegration/main.py
+++ b/sources/pyside6/doc/tutorials/qmlsqlintegration/main.py
@@ -1,41 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2021 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python project.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
import sys
import logging
diff --git a/sources/pyside6/doc/tutorials/qmlsqlintegration/qmlsqlintegration.rst b/sources/pyside6/doc/tutorials/qmlsqlintegration/qmlsqlintegration.rst
index b7d627282..eee3f807e 100644
--- a/sources/pyside6/doc/tutorials/qmlsqlintegration/qmlsqlintegration.rst
+++ b/sources/pyside6/doc/tutorials/qmlsqlintegration/qmlsqlintegration.rst
@@ -4,7 +4,7 @@ QML, SQL and PySide Integration Tutorial
This tutorial is very similar to the `Qt Chat Tutorial`_ one but it focuses on explaining how to
integrate a SQL database into a PySide6 application using QML for its UI.
-.. _`Qt Chat Tutorial`: https://doc.qt.io/qt-5/qtquickcontrols-chattutorial-example.html
+.. _`Qt Chat Tutorial`: https://doc.qt.io/qt-6/qtquickcontrols-chattutorial-example.html
sqlDialog.py
------------
@@ -14,9 +14,9 @@ name of our table, and define the global function ``createTable()`` that creates
doesn't already exist.
The database contains a single line to mock the beginning of a conversation.
- .. literalinclude:: sqlDialog.py
- :linenos:
- :lines: 40-77
+.. literalinclude:: sqlDialog.py
+ :linenos:
+ :lines: 4-43
The ``SqlConversationModel`` class offers the read-only data model required for the non-editable
contacts list. It derives from the :ref:`QSqlQueryModel` class, which is the logical choice for
@@ -26,25 +26,25 @@ Then, we proceed to create the table, set its name to the one defined previously
We add the necessary attributes to the table, to have a program that reflects the idea
of a chat application.
- .. literalinclude:: sqlDialog.py
- :linenos:
- :lines: 80-91
+.. literalinclude:: sqlDialog.py
+ :linenos:
+ :lines: 47-59
In ``setRecipient()``, you set a filter over the returned results from the database, and
emit a signal every time the recipient of the message changes.
- .. literalinclude:: sqlDialog.py
- :linenos:
- :lines: 93-103
+.. literalinclude:: sqlDialog.py
+ :linenos:
+ :lines: 61-70
The ``data()`` function falls back to ``QSqlTableModel``'s implementation if the role is not a
custom user role.
If you get a user role, we can subtract :meth:`~.QtCore.Qt.UserRole` from it to get the index of
that field, and then use that index to find the value to be returned.
- .. literalinclude:: sqlDialog.py
- :linenos:
- :lines: 105-112
+.. literalinclude:: sqlDialog.py
+ :linenos:
+ :lines: 72-79
In ``roleNames()``, we return a Python dictionary with our custom role and role names as key-values
@@ -53,27 +53,27 @@ Alternatively, it can be useful to declare an Enum to hold all of the role value
Note that ``names`` has to be a hash to be used as a dictionary key,
and that's why we're using the ``hash`` function.
- .. literalinclude:: sqlDialog.py
- :linenos:
- :lines: 114-128
+.. literalinclude:: sqlDialog.py
+ :linenos:
+ :lines: 81-95
The ``send_message()`` function uses the given recipient and message to insert a new record into
the database.
Using :meth:`~.QSqlTableModel.OnManualSubmit` requires you to also call ``submitAll()``,
since all the changes will be cached in the model until you do so.
- .. literalinclude:: sqlDialog.py
- :linenos:
- :lines: 130-145
+.. literalinclude:: sqlDialog.py
+ :linenos:
+ :lines: 97-116
chat.qml
--------
Let's look at the ``chat.qml`` file.
- .. literalinclude:: chat.qml
- :linenos:
- :lines: 40-42
+.. literalinclude:: chat.qml
+ :linenos:
+ :lines: 4-6
First, import the Qt Quick module.
This gives us access to graphical primitives such as Item, Rectangle, Text, and so on.
@@ -86,9 +86,9 @@ root type, Window:
Let's step through the ``chat.qml`` file.
- .. literalinclude:: chat.qml
- :linenos:
- :lines: 44-49
+.. literalinclude:: chat.qml
+ :linenos:
+ :lines: 9-14
``ApplicationWindow`` is a Window with some added convenience for creating a header and a footer.
It also provides the foundation for popups and supports some basic styling, such as the background
@@ -98,6 +98,13 @@ There are three properties that are almost always set when using ApplicationWind
``height``, and ``visible``.
Once we've set these, we have a properly sized, empty window ready to be filled with content.
+Because we are exposing the :code:`SqlConversationModel` class to QML, we will
+declare a component to access it:
+
+.. literalinclude:: chat.qml
+ :linenos:
+ :lines: 16-18
+
There are two ways of laying out items in QML: `Item Positioners`_ and `Qt Quick Layouts`_.
- Item positioners (`Row`_, `Column`_, and so on) are useful for situations where the size of items
@@ -106,9 +113,13 @@ There are two ways of laying out items in QML: `Item Positioners`_ and `Qt Quick
resizable user interfaces.
Below, we use `ColumnLayout`_ to vertically lay out a `ListView`_ and a `Pane`_.
- .. literalinclude:: chat.qml
- :linenos:
- :lines: 50-53
+ .. literalinclude:: chat.qml
+ :linenos:
+ :lines: 20-23
+
+ .. literalinclude:: chat.qml
+ :linenos:
+ :lines: 72-74
Pane is basically a rectangle whose color comes from the application's style.
It's similar to `Frame`_, but it has no stroke around its border.
@@ -133,18 +144,16 @@ remaining space that is left after accommodating the Pane.
.. _attached properties: https://doc.qt.io/qt-5/qml-qtquick-layouts-layout.html
.. _Layout.fillWidth: https://doc.qt.io/qt-5/qml-qtquick-layouts-layout.html#fillWidth-attached-prop
.. _Layout.fillHeight: https://doc.qt.io/qt-5/qml-qtquick-layouts-layout.html#fillHeight-attached-prop
-.. _ListView: https://doc.qt.io/qt-5/qml-qtquick-listview.html
.. _Qt Quick QML Types: https://doc.qt.io/qt-5/qtquick-qmlmodule.html
Let's look at the ``Listview`` in detail:
- .. literalinclude:: chat.qml
- :linenos:
- :lines: 53-99
+.. literalinclude:: chat.qml
+ :linenos:
+ :lines: 23-70
After filling the ``width`` and ``height`` of its parent, we also set some margins on the view.
-
Next, we set `displayMarginBeginning`_ and `displayMarginEnd`_.
These properties ensure that the delegates outside the view don't disappear when you
scroll at the edges of the view.
@@ -168,9 +177,9 @@ At the bottom of the screen, we place a `TextArea`_ item to allow multi-line tex
button to send the message.
We use Pane to cover the area under these two items:
- .. literalinclude:: chat.qml
- :linenos:
- :lines: 101-125
+.. literalinclude:: chat.qml
+ :linenos:
+ :lines: 72-96
The `TextArea`_ should fill the available width of the screen.
We assign some placeholder text to provide a visual cue to the contact as to where they should begin
@@ -192,18 +201,16 @@ main.py
We use ``logging`` instead of Python's ``print()``, because it provides a better way to control the
messages levels that our application will generate (errors, warnings, and information messages).
- .. literalinclude:: main.py
- :linenos:
- :lines: 40-50
+.. literalinclude:: main.py
+ :linenos:
+ :lines: 4-16
``connectToDatabase()`` creates a connection with the SQLite database, creating the actual file
if it doesn't already exist.
- .. literalinclude:: main.py
- :linenos:
- :lines: 53-72
-
-
+.. literalinclude:: main.py
+ :linenos:
+ :lines: 19-39
A few interesting things happen in the ``main`` function:
@@ -212,14 +219,14 @@ A few interesting things happen in the ``main`` function:
using the **QtWidgets** module.
- Connecting to the database,
- Declaring a :ref:`QQmlApplicationEngine`.
- This allows you to access the QML context property to connect Python
+ This allows you to access the QML Elements to connect Python
and QML from the conversation model we built on ``sqlDialog.py``.
- Loading the ``.qml`` file that defines the UI.
Finally, the Qt application runs, and your program starts.
- .. literalinclude:: main.py
- :linenos:
- :lines: 75-85
+.. literalinclude:: main.py
+ :linenos:
+ :lines: 42-52
.. image:: example_list_view.png
diff --git a/sources/pyside6/doc/tutorials/qmlsqlintegration/sqlDialog.py b/sources/pyside6/doc/tutorials/qmlsqlintegration/sqlDialog.py
index 4ebb19ce2..d728aee59 100644
--- a/sources/pyside6/doc/tutorials/qmlsqlintegration/sqlDialog.py
+++ b/sources/pyside6/doc/tutorials/qmlsqlintegration/sqlDialog.py
@@ -1,41 +1,5 @@
-#############################################################################
-##
-## Copyright (C) 2021 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the Qt for Python project.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
import datetime
import logging
diff --git a/sources/pyside6/doc/typesystem_doc.xml.in b/sources/pyside6/doc/typesystem_doc.xml.in
index 94260fea0..86a4d0eae 100644
--- a/sources/pyside6/doc/typesystem_doc.xml.in
+++ b/sources/pyside6/doc/typesystem_doc.xml.in
@@ -1,53 +1,7 @@
<?xml version="1.0" ?>
<!--
-/****************************************************************************
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-->
<typesystem package="PySide">
<suppress-warning text="File containing conversion code for *" />
diff --git a/sources/pyside6/doc/videos.rst b/sources/pyside6/doc/videos.rst
index 5c72c90df..919c9ff38 100644
--- a/sources/pyside6/doc/videos.rst
+++ b/sources/pyside6/doc/videos.rst
@@ -1,96 +1,155 @@
-|project| Videos
-================
-
-.. raw:: html
-
- <style>
- .embed-container {
- margin-top: 10px;
- position: relative;
- padding-bottom: 56.25%;
- height: 0;
- overflow: hidden;
- max-width: 100%;
- }
- .embed-container iframe, .embed-container object, .embed-container embed {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- }
- .video-title {
- font-weight: bold;
- text-align: center;
- }
- </style>
- <table>
- <tr>
- <td style="width: 30%;">
- <p class="video-title">QtVirtualTechCon2020: From Prototypes to Hybrid Applications</p>
- <div class="embed-container">
- <iframe src="https://www.youtube.com/embed/Vb1dbLQafyM" frameborder="0" allowfullscreen>
- </iframe>
- </div>
- </td>
- <td style="width: 30%;">
- <p class="video-title">QtWS2019: Utilizing Shiboken to Enhance your Application</p>
- <div class='embed-container'>
- <iframe src="https://www.youtube.com/embed/mAfEVPgHRt8" frameborder="0" allowfullscreen>
- </iframe>
- </div>
- </td>
- <td style="width: 30%;">
- <p class="video-title">QtWS2019: Introduction to Qt for Python</p>
- <div class='embed-container'>
- <iframe src="https://www.youtube.com/embed/214TWASZVgA" frameborder="0" allowfullscreen>
- </iframe>
- </div>
- </td>
- </tr>
- </tr>
- <td style="width: 30%;">
- <p class="video-title">Webinar: Python and C++ interoperability with Shiboken</p>
- <div class='embed-container'>
- <iframe src="https://www.youtube.com/embed/wOMlDutOWXI" frameborder="0" allowfullscreen>
- </iframe>
- </div>
- </td>
- <td style="width: 30%;">
- <p class="video-title">QtWS2019: How to bring your C++ project to Python land</p>
- <div class='embed-container'>
- <iframe src="https://www.youtube.com/embed/XmY-tWTi9gY" frameborder="0" allowfullscreen>
- </iframe>
- </div>
- </td>
- <td style="width: 30%;">
- <p class="video-title">QtWS2018: Mastering Qt for Python in 20 min</p>
- <div class='embed-container'>
- <iframe src="https://www.youtube.com/embed/IhxZ99usPqY" frameborder="0" allowfullscreen>
- </iframe>
- </td>
- </tr>
- </tr>
- <td style="width: 30%;">
- <p class="video-title">Webinar: Develop your first Qt for Python application</p>
- <div class='embed-container'>
- <iframe src="https://www.youtube.com/embed/HDBjmSiOBxY" frameborder="0" allowfullscreen>
- </iframe>
- </div>
- </td>
- <td style="width: 30%;">
- <p class="video-title">Webinar: Creating user interfaces with Qt for Python</p>
- <div class='embed-container'>
- <iframe src="https://www.youtube.com/embed/wKqLaNqxgas" frameborder="0" allowfullscreen>
- </iframe>
- </div>
- </td>
- <td style="width: 30%;">
- <p class="video-title">QtWS2017: Take a walk on the PySide</p>
- <div class="embed-container">
- <iframe src="https://www.youtube.com/embed/Sb4FV6SdHHQ" frameborder="0" allowfullscreen>
- </iframe>
- </div>
- </td>
- </tr>
- </table>
+.. _video-gallery:
+
+Videos
+======
+
+Tutorials
+---------
+
+.. grid:: 1 3 3 3
+ :gutter: 2
+
+ .. grid-item-card:: Resources overview
+ :img-top: https://img.youtube.com/vi/sywLvidNkbw/mqdefault.jpg
+ :link: https://www.youtube.com/embed/sywLvidNkbw
+
+ .. grid-item-card:: Repository overview
+ :img-top: https://img.youtube.com/vi/RP0K1B7fqMs/mqdefault.jpg
+ :link: https://www.youtube.com/embed/RP0K1B7fqMs
+
+ .. grid-item-card:: Shiboken overview
+ :img-top: https://img.youtube.com/vi/RUwV_sx_gBM/mqdefault.jpg
+ :link: https://www.youtube.com/embed/RUwV_sx_gBM
+
+ .. grid-item-card:: Tutorial
+ :img-top: https://img.youtube.com/vi/Cqo0-EQmy1Q/mqdefault.jpg
+ :link: https://www.youtube.com/embed/Cqo0-EQmy1Q
+
+ How to create a simple Qt Widgets app with PySide6
+
+ .. grid-item-card:: Tutorial
+ :img-top: https://img.youtube.com/vi/JxfiUx60Mbg/mqdefault.jpg
+ :link: https://www.youtube.com/embed/JxfiUx60Mbg
+
+ Making a QML Application in Python
+
+ .. grid-item-card:: Tutorial
+ :img-top: https://img.youtube.com/vi/i-utZN_NP6c/mqdefault.jpg
+ :link: https://www.youtube.com/embed/i-utZN_NP6c
+
+ How to install PySide6 on a new virtual environment
+
+
+Community events
+----------------
+
+.. grid:: 1 3 3 3
+ :gutter: 2
+
+ .. grid-item-card:: Akademy 2021
+ :img-top: https://img.youtube.com/vi/Ftm68AzYvr8/mqdefault.jpg
+ :link: https://www.youtube.com/embed/Ftm68AzYvr8
+
+ Qt for Python
+
+Webinars
+--------
+
+.. grid:: 1 3 3 3
+ :gutter: 2
+
+ .. grid-item-card:: Online Webinar
+ :img-top: https://img.youtube.com/vi/eqHveQ5JTZU/mqdefault.jpg
+ :link: https://www.youtube.com/embed/eqHveQ5JTZU
+
+ How your Python projects can benefit from Qt
+
+ .. grid-item-card:: Online Webinar
+ :img-top: https://img.youtube.com/vi/wOMlDutOWXI/mqdefault.jpg
+ :link: https://www.youtube.com/embed/wOMlDutOWXI
+
+ Interoperability of Python and C++ using Shiboken
+
+ .. grid-item-card:: Online Webinar
+ :img-top: https://img.youtube.com/vi/HDBjmSiOBxY/mqdefault.jpg
+ :link: https://www.youtube.com/embed/HDBjmSiOBxY
+
+ Developing your first Qt for Python application
+
+ .. grid-item-card:: Online Webinar
+ :img-top: https://img.youtube.com/vi/wKqLaNqxgas/mqdefault.jpg
+ :link: https://www.youtube.com/embed/wKqLaNqxgas
+
+ Creating user interfaces with Qt for Python
+
+Conferences
+-----------
+
+.. grid:: 1 3 3 3
+ :gutter: 2
+
+ .. grid-item-card:: PyConES 2023
+ :img-top: https://img.youtube.com/vi/XuqdTvisqkQ/mqdefault.jpg
+ :link: https://www.youtube.com/embed/XuqdTvisqkQ
+
+ Asynchronous programming with asyncio and Qt
+
+ .. grid-item-card:: QtWS 2022
+ :img-top: https://img.youtube.com/vi/8wcdN1Iw1Uk/mqdefault.jpg
+ :link: https://www.youtube.com/embed/8wcdN1Iw1Uk
+
+ 5 Reasons Why You Should Use the Latest Qt for Python
+
+ .. grid-item-card:: QtDeCon 2022
+ :img-top: https://img.youtube.com/vi/ZUNg19OlDeE/mqdefault.jpg
+ :link: https://www.youtube.com/embed/ZUNg19OlDeE
+
+ Hybrid Qt Development: Boosting Your Projects with Python
+
+ .. grid-item-card:: QtWS 2021
+ :img-top: https://img.youtube.com/vi/SylgpRc-Lrg/mqdefault.jpg
+ :link: https://www.youtube.com/embed/SylgpRc-Lrg
+
+ Hybrid Qt Development: boosting Projects with Python
+
+ .. grid-item-card:: QtWS 2020
+ :img-top: https://img.youtube.com/vi/Vb1dbLQafyM/mqdefault.jpg
+ :link: https://www.youtube.com/embed/Vb1dbLQafyM
+
+ Prototypes to Hybrid Applications
+
+ .. grid-item-card:: QtWS 2019
+ :img-top: https://img.youtube.com/vi/mAfEVPgHRt8/mqdefault.jpg
+ :link: https://www.youtube.com/embed/mAfEVPgHRt8
+
+ Using Shiboken to Enhance Application
+
+ .. grid-item-card:: QtWS 2019
+ :img-top: https://img.youtube.com/vi/214TWASZVgA/mqdefault.jpg
+ :link: https://www.youtube.com/embed/214TWASZVgA
+
+ Intro to Qt for Python
+
+ .. grid-item-card:: QtWS 2019
+ :img-top: https://img.youtube.com/vi/XmY-tWTi9gY/mqdefault.jpg
+ :link: https://www.youtube.com/embed/XmY-tWTi9gY
+
+ Using C++ project in Python
+
+ .. grid-item-card:: QtWS 2019
+ :img-top: https://img.youtube.com/vi/rRDoToEOlbY/mqdefault.jpg
+ :link: https://www.youtube.com/embed/rRDoToEOlbY
+
+ Using Qt for Python for embedded system development
+
+ .. grid-item-card:: QtWS 2018
+ :img-top: https://img.youtube.com/vi/IhxZ99usPqY/mqdefault.jpg
+ :link: https://www.youtube.com/embed/IhxZ99usPqY
+
+ Qt for Python in 20 min
+
+ .. grid-item-card:: QtWS 2017
+ :img-top: https://img.youtube.com/vi/Sb4FV6SdHHQ/mqdefault.jpg
+ :link: https://www.youtube.com/embed/Sb4FV6SdHHQ
+
+ A walk to PySide