aboutsummaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
...
* Finance Manager - Part 3 - ExampleShyamnath Premnadh2024-11-1313-0/+732
| | | | | | | | | | - Expands on part2 by adding a FastAPI Backend thereby creating a REST API to interact with the database. Pick-to: 6.8 Task-number: PYSIDE-2850 Change-Id: Ibdcc47b7998923616959e6001eda0de6cabd300c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Finance Manager - Part 2 - DocumentationShyamnath Premnadh2024-11-131-0/+11
| | | | | | | | | | - This tutorial expands on part1 by integrating SqlAlchemy with PySide6, by storing the data in a SQLite database. Pick-to: 6.8 Task-number: PYSIDE-2850 Change-Id: I195149bd861b1fb1a25623a9fe05e42f1e85054c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Finance Manager - Part 2 - ExampleShyamnath Premnadh2024-11-1311-0/+656
| | | | | | | | | | | - Example that extends on the Finance Manager application from Part 1 to use a SQLite database to store the data, thereby showing the how to use SqlAlchemy with PySide6. Pick-to: 6.8 Task-number: PYSIDE-2850 Change-Id: I2cce6d033812796ea2fe5cc200c1854494a308f5 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Finance Mananger - Part 1 - DocumentationShyamnath Premnadh2024-11-131-0/+12
| | | | | | | | | | | | - Detailed tutorial with instructions, explanaton of code concepts, gifs, steps to run and deploy the application. - Additionally, register a new role {deco} to be used in markdown. It is the same as :deco: in reStructuredText. Pick-to: 6.8 Task-number: PYSIDE-2850 Change-Id: Icb732e830948ee7ad1cb9dcf6bd07b5077c89497 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Finance Manager - Part 1 - ExampleShyamnath Premnadh2024-11-139-0/+574
| | | | | | | | | | | | - Example of a simple finance manager application that allows the user to add expenses and view them in a pie chart. - Part 1 of the Finance Manager tutorial series. Pick-to: 6.8 Task-number: PYSIDE-2850 Change-Id: If13ea04d4e734fe93bfbacc37a121ff902211629 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Example: Add zoomlinechartEce CinΓΌΓ§en2024-11-116-0/+164
| | | | | | | | | Adding missing example from c++ Task-number: PYSIDE-841 Pick-to: 6.8 Change-Id: I029d7c2c20affa2445e9558403bdaf114fa0f847 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Documentation: Use more references in the QML tutorial examplesFriedemann Kleint2024-11-079-33/+37
| | | | | | Pick-to: 6.8 Change-Id: Id40b51d321830477ad67545ef0e96124ccafc894 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Port the osmbuildings demo (maps part)Friedemann Kleint2024-10-1810-0/+793
| | | | | | | | | The buildings part was omitted as it requires a license key. Task-number: PYSIDE-2206 Pick-to: 6.8 Change-Id: I561fb098786d9e894e5102073db3e7d02f66d8f9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Documentation/examples: Show/bundle utils/pyside_config.pyFriedemann Kleint2024-10-043-4/+7
| | | | | | Task-number: PYSIDE-2882 Change-Id: Id3c5e0d934b36b0a1f43069022f7be9060f0ea8b Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* widgetgraphgallery: Fix up and port away from deprecated ↡Friedemann Kleint2024-09-186-49/+44
| | | | | | | | | | | | QCheckBox::checkStateChanged() Adapt to qtbase/3512fb1ec5ff088772170540c4e91b1886fbea45 . Remove obsolete options and adapt to some API changes. Task-number: PYSIDE-2620 Change-Id: I11738858cc9107129c0d0137043bae65d8cb4ac9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Update Qt Widgets Designer formsFriedemann Kleint2024-09-1855-250/+312
| | | | | | | | Load and save once so that fully qualified enumerations are used. Task-number: PYSIDE-2846 Change-Id: I544467c1d9254533bf62e1344c26c90c7d17d118 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* PySide6/SerialBus: Fix CAN bus exampleFriedemann Kleint2024-09-182-5/+5
| | | | | | | | Amends e4199ec3881d8e556385af98084856be857e0dbe . Task-number: PYSIDE-2846 Change-Id: I562aa4cfb30b92b698be440d3302ecd06f7d6722 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Port away from deprecated QCheckBox::checkStateChanged()Friedemann Kleint2024-09-182-4/+4
| | | | | | | | | Adapt to qtbase/3512fb1ec5ff088772170540c4e91b1886fbea45 . widgetgraphgallery will be fixed in a separate change. Change-Id: I1b6ebb56bf17fb64581e0180fce236255c5114fd Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* type hints: Fix some typing bugs for mypy (forgiveness)Friedemann Kleint2024-09-18123-359/+370
| | | | | | | | | | | | | The new enums still support old syntax by the forgiveness mode. Nevertheless, when using mypy to check files, strict correctness is enforced. We correct a large number of forgiveness-induced errors, but there is still a whole lot of other complaints to fix. Task-number: PYSIDE-2846 Change-Id: If566187d268ef75bc09b8d86f73d2c7d19f284f9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtHttpServer: Fix exampleFriedemann Kleint2024-09-094-11/+18
| | | | | | | | | | Rename the example, adapt to 6.8 and add a pyproject file. Make it clear that it is a simplified version. Task-number: QTBUG-128113 Task-number: PYSIDE-2620 Change-Id: If6cb578f3f0c7405041404f90e014dcfb3903e03 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Adapt the graphs examples to 6.8Friedemann Kleint2024-09-0514-582/+482
| | | | | | Task-number: PYSIDE-2620 Change-Id: If99122740848dacff2850549fdd8ff912a100a1b Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Documentation: Remove example anchorsFriedemann Kleint2024-08-1623-58/+12
| | | | | | | The example_gallery tools also adds anchors, use these instead. Change-Id: I488250fae608cf50804c3edfe0ec12d4aa08194a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Docs: Fix broken links from base documentationShyamnath Premnadh2024-08-162-2/+2
| | | | | | | | - Many https links and sphinx references which were broken have been fixed. Change-Id: Ia10a44bbbbe4ed7e761c72042b45a46030d02186 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Docs: Update examples documentation to use sphinx referencesShyamnath Premnadh2024-08-141-4/+4
| | | | | | | | | | | | | - The autogenerated examples documentation was updated to use sphinx references instead of relative paths because they are easier to maintain. - Additionally the 'bindings.rst' was updated to use the correct sphinx references. This has been historically broken. Task-number: PYSIDE-2837 Change-Id: I0c9f2f2e40dbadf8387e62cae05ff7aa12f43f72 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* widgetbinding example: Add missing files to the downloadFriedemann Kleint2024-08-141-1/+4
| | | | | | | Pick-to: 6.7 6.5 Change-Id: I8d5ab02e25dda5e04c501cd5e5ad1021dae00e76 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* build: remove pyopengl dependencyCristiΓ‘n Maureira-Fredes2024-08-136-0/+6
| | | | | | | | | | | PyOpenGL is only used for a few modules, not the build process. This removes the requirements.txt entry and add one file on each example that uses it. Change-Id: Ia0965eb97645343b7e2c96095bef7c9ba46b322a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use QQmlApplicationEngine.setInitialProperties() in the minibrowser exampleFriedemann Kleint2024-08-082-8/+2
| | | | | | | | | | Port qtwebview/3cbbf09d189db4dd1d9421f86446e3b03831a2a0. Amends c042e74cb490905c5cf5dc7d1c3887f627291019. Task-number: PYSIDE-2206 Pick-to: 6.5 6.7 Change-Id: Ic372da014132c19bed187ff369403ed0fd09bcb5 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Examples: Add minibrowserShyamnath Premnadh2024-08-0512-0/+608
| | | | | | | | | - tests the working of the QtWebView module Task-number: PYSIDE-2206 Pick-to: 6.5 6.7 Change-Id: I8d75e427f1b26ead1d37693701fe77cca9e4c03b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtAsyncio: Fix wrong args in examplesAdrian Herrmann2024-07-052-2/+2
| | | | | | | | | | The minimal and eratosthenes examples kept now-invalid arguments to QtAsyncio.run() as leftovers from a previous change. Pick-to: 6.7 Task-number: PYSIDE-769 Change-Id: I64ec3dcf136f44b757ef93743b96aa0a2d8a91be Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* ModBus client example: Avoid keeping a reference to the QModbusReply in ↡Friedemann Kleint2024-06-281-9/+11
| | | | | | | | | | | | signal handling Use QObject.sender() instead of functools.partial to retrieve the reply. The callable stored in the signal manager then no longer references it. Pick-to: 6.7 Task-number: PYSIDE-2793 Change-Id: I43e9f393a7291944da0a7b0b310f8ff889d7906e Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* QtAsyncio: Remove application arg from loop policyAdrian Herrmann2024-06-272-2/+2
| | | | | | | | | | | | | Remove the optional application argument from the constructor of QAsyncioEventLoopPolicy, as it is unnecessary. If a QCoreApplication or other type of qApp was created outside of QtAsyncio, it will always be retrieved by QCoreApplication.instance(), and therefore passing it as an argument makes little sense. Task-number: PYSIDE-769 Change-Id: Iac7a913a1c9d6ebbb0984fe11f8b5cda955baab1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* ModBus example: Fix default TCP portFriedemann Kleint2024-06-271-1/+1
| | | | | | | | | Use 50200 as does the C++ example, Pick-to: 6.7 6.5 Task-number: PYSIDE-2793 Change-Id: Ie827a1f0d3f3b0c0e2bf8ed4ffe343ac26f62275 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Use modern typing syntaxAdrian Herrmann2024-06-208-20/+11
| | | | | | | | | | | | We can already use the modern typing syntax introduced with Python 3.10 in 3.9 via future statement definitions, even before we raise the minimum Python version to 3.10. Note that direct expressions with "|" don't work yet. Task-number: PYSIDE-2786 Change-Id: Ie36c140fc960328322502ea29cf6868805a7c558 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Python-3.10: Allow the new syntax for Python 3.9Christian Tismer2024-06-20415-0/+415
| | | | | | | | Add a future statement to all Python source files. Task-number: PYSIDE-2786 Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Fix some documentation warnings and broken linksFriedemann Kleint2024-06-171-0/+1
| | | | | | Pick-to: 6.7 Change-Id: I5fbc1be390c7d24ef7f204721cd060e5d61c88e0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* minimalsurfacegraph example: Add missing pyproject fileFriedemann Kleint2024-06-171-0/+3
| | | | | | Pick-to: 6.7 Change-Id: If870ad3e34721da6c7f3d618b1b36378ec4bc754 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Examples: Update CMake instructionsFriedemann Kleint2024-06-043-17/+26
| | | | | | | | Remove -S and use -DCMAKE_C_COMPILER=cl.exe consistently. Pick-to: 6.7 Change-Id: I73a4e9aaf37bb082d8a4398113c8752caebf9358 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix naming of the QtGraphs widget graph gallery exampleFriedemann Kleint2024-05-2230-11/+11
| | | | | | | | Rename it to widgetgraphgallery, matching the name in the qtgraphs repo. Change-Id: I5e43b9d9c738860d6e5ede5687fec03b952188fe Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* File System Explorer: Fix app icon when launched from another directoryFriedemann Kleint2024-04-301-1/+1
| | | | | | | | | Prepend path, fixing: qt.svg: Cannot open file '../FileSystemModule/icons/app_icon.svg', because: No such file or directory Pick-to: 6.7 Change-Id: I82876af19a63110f46f85222fb2bfb92ec8f1965 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* QtAsyncio: Let examples handle SIGINTAdrian Herrmann2024-04-242-2/+2
| | | | | | | | | | Make the two QtAsyncio examples handle the Ctrl + C interrupt for a more natural user experience. Pick-to: 6.7 Task-number: PYSIDE-769 Change-Id: I1dd87227fd1f1b70684476087f776ccc82da9571 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Documentation: Add QtQml.ListPropertyFriedemann Kleint2024-04-232-9/+10
| | | | | | | Pick-to: 6.7 Task-number: PYSIDE-2698 Change-Id: If9b9af49bb351fcb4e2355277ff84bd0936b5033 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Examples: Fix contactlist applicationShyamnath Premnadh2024-04-181-1/+2
| | | | | | | | | - Application breaks because deleting engine before calling app.exec_(). Pick-to: 6.7 6.6 6.5 Task-number: PYSIDE-2206 Change-Id: Ifb049788227dd19b851babc7ed7c00c1609d01db Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Multimedia: Adapt to revert of QAudio->QtAudio namespace renamingFriedemann Kleint2024-04-122-19/+19
| | | | | | | | | | | | Partially revert 4d761eaaf852f8d82925e111150f25c0dd5f3e83. Adapt to qtmultimedia/7fcea568c9c64f3bcebda21f0df02aa0107dfd0c, reverting qtmultimedia/edaec2bf714c98d65f12c8ed9a2ffbd1603635a7. Task-number: QTBUG-123997 Pick-to: 6.7 Change-Id: Ibd0ad737293f4b9107909f37554c03f64bce5d1e Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Multimedia/capture example: Fix message box flood on errorFriedemann Kleint2024-04-101-4/+15
| | | | | | | | Replace the message box by a status label. Pick-to: 6.7 Change-Id: Ic046e3a7b9c818079760aef90cce3f6a42baf1f0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Examples: Update ui_*.py filesFriedemann Kleint2024-04-0930-81/+81
| | | | | | | | As a drive-by, fix the resource file name of the PDF viewer example. Pick-to: 6.7 Change-Id: Ie86ee8d7ed538bc2e55018913b547add88f48efa Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Documentation: Link the Qt Widgets Designer custom widget examplesFriedemann Kleint2024-03-252-6/+6
| | | | | | | | As a drive-by, fix the headlines and remove a dead link. Pick-to: 6.7 6.6 Change-Id: Ifb92c0ac7e02e04f3cffe1cb0cc8ff82e8fd803e Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* hellographs example: Fix sphinx warningFriedemann Kleint2024-03-191-1/+1
| | | | | | | | | | | Fix: example_graphs_2d_hellographs.rst:27: WARNING: Title underline too short. Amends 0414eec326959e40907b5aeb5db2e19f1c3dedd5. Task-number: PYSIDE-2497 Change-Id: I2e519e06cf9f30bca844a9f4a82a5a5edbe4a412 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Examples: Use theme iconsFriedemann Kleint2024-03-148-52/+66
| | | | | | | | Add some missing icons. Task-number: PYSIDE-2206 Change-Id: I7763f3ad145427dd97084e6191fd4828c2432baa Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* simplebrowser example: Use new theme iconsFriedemann Kleint2024-03-123-7/+16
| | | | | Change-Id: I3f4a1eda4a72e6de1101ba83907019d3f1f24183 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Deprecation Python 3.8CristiΓ‘n Maureira-Fredes2024-03-121-1/+1
| | | | | | | | | | | The changes related PYSIDE-939 can be removed when 3.9 support is dropped, because the problem was fixed and included in 3.9.13 so we cannot assume everyone will be on that version or superior. Change-Id: I78afc660edc6fbb3bb1a2438e17366e63b24e375 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Replace cmake -H with -SAdrian Herrmann2024-03-113-7/+7
| | | | | | | | | | | | The previously undocumented cmake -H has been replaced with the official -S in 3.13, update the documentation accordingly: https://cgold.readthedocs.io/en/latest/glossary/-H.html Pick-to: 6.6 Change-Id: I54fb700a36746b49a04449e8c9af21fd2bd235c7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Port the HelloGraphs exampleFriedemann Kleint2024-03-076-0/+231
| | | | | | Task-number: PYSIDE-2497 Change-Id: Ifa5ac24a5abf2f9a17736942bbeb8bb0f18e7067 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Port the colorpaletteclient exampleFriedemann Kleint2024-03-0737-0/+2976
| | | | | | Task-number: PYSIDE-2497 Change-Id: Ic57785fa221afa7d3d5cd5f3550c5a6e2d38f08b Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* filesystemexplorer example: Remove import PySide6Friedemann Kleint2024-03-041-3/+2
| | | | | | | | | | This is bad practice which slows down the application startup. Task-number: PYSIDE-2576 Task-number: QTBUG-119785 Pick-to: 6.6 Change-Id: I761bceab9c2a3071a9a63c347df08c75fffec84f Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Adapt to renaming of namespace QAudio->QtAudioFriedemann Kleint2024-02-282-19/+19
| | | | | | | | | | | - Adapt the examples. - Create an alias into the module. - Add a hack to the signal manager for signals which maintain the old string-based signature. Task-number: PYSIDE-2497 Change-Id: I9db5e59851a2cb9161fdcecf87e78d980eda2045 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>