aboutsummaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* File System Explorer: Fix app icon when launched from another directoryFriedemann Kleint4 days1-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 Herrmann10 days2-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 Kleint11 days2-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>
* Adapt to QtGraphs changed APIFriedemann Kleint2024-02-288-66/+60
| | | | | | | | Task-number: QTBUG-114091 Task-number: PYSIDE-2497 Change-Id: I62b6c50ea4cafd240ef75b2814849821f4eb2c3b Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Examples: adapt to consider permission API on macOSShyamnath Premnadh2024-02-265-11/+41
| | | | | | | | | | - When Python is run in interpreter mode, we print and exist with a message. Pick-to: 6.5 6.6 Task-number: PYSIDE-2468 Change-Id: I79ce06eb2b96418fc2f84c11cccbd2e72207f3c1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Move QtGraphs examples aroundFriedemann Kleint2024-02-2631-0/+0
| | | | | | | Match the structure in the Qt repo. Change-Id: I372ef102165ce9bbe3cef03f915ad44b82f1fc44 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Port the simplerhiwidget exampleFriedemann Kleint2024-02-2612-7/+406
| | | | | | | | Task-number: QTBUG-113331 Task-number: PYSIDE-2497 Task-number: PYSIDE-2206 Change-Id: I69b69a761eb4485b8a0f6c14d92065b0699336ea Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Fix exit crashes of the audiooutput exampleFriedemann Kleint2024-02-211-2/+9
| | | | | | | | | Make sure it stops in closeEvent(). Pick-to: 6.6 6.5 6.2 Task-number: PYSIDE-2206 Change-Id: I749e82b6bd689b8c608c3438fe3480581e82bf14 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* examples: Simplify minimal_asyncioAdrian Herrmann2024-02-161-24/+2
| | | | | | | | | | | | For historical reasons, the minimal asyncio example was unnecessarily complicated (as it tried to follow the trio example's approach of an AsyncHelper class). Simplify the code to make it more straightforward and understandable. Pick-to: 6.6 Task-number: PYSIDE-769 Change-Id: I376b73356f7e46f640db482a9e149f1a6fa54dd6 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Qt Linguist example: Enable building translations with pyside6-projectFriedemann Kleint2024-02-121-2/+2
| | | | | | | | | Remove the use of the "translations" directory and make it a resource prefix instead. Adapt the tutorial accordingly. Pick-to: 6.6 6.5 Change-Id: I9b7da17b4aac6a1470f5105b33a6267c78e1c26b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Improve the samplebinding build instructions for WindowsFriedemann Kleint2024-02-121-1/+1
| | | | | | | | | Add CMAKE_C_COMPILER definition to prevent CMake from falling back to Clang. Pick-to: 6.6 6.5 Change-Id: I755d6c99f84293c680e56b7cfa7af3f7fb0dd934 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Brush up the usingmodel exampleFriedemann Kleint2024-02-072-32/+28
| | | | | | | | | | | | | | | Although not any more in Qt, it nicely shows the use of roles and delegates in QML. - Use a little data class for Person. - Change the custom role name away from "modelData" which is now a reserved name and caused it to no longer work. - Use a modern decorator. Pick-to: 6.6 6.5 Task-number: PYSIDE-2206 Change-Id: I3a3c1ad96f3a7ee89ada839236b45f461af149c7 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Documentation: Link the Qt Linguist and GNU gettext examplesFriedemann Kleint2024-02-012-0/+14
| | | | | | | Pick-to: 6.6 Task-number: PYSIDE-1112 Change-Id: Ica9c369f488afae6206b30e17d3743e0f3772642 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Adapt to glue code to namespaced Qt buildsFriedemann Kleint2024-01-302-2/+2
| | | | | | Task-number: PYSIDE-2590 Change-Id: I7269b0f1c1758a9d26579267fc0b423c6a0422ac Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* examples: fix flake8 issues and add exceptionsCristián Maureira-Fredes2024-01-2587-130/+131
| | | | | | | | | | Exception for: - qApp and tr not being directly imported: F821 - *rc and qml modules being imported but not used: F401 Pick-to: 6.6 6.5 6.2 Change-Id: I5e40f3f54c1721ef3dc5d7f1e87d5fd8ec771b8e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Filesystemexplorer-example: port v2Dennis Oberst2024-01-2320-451/+834
| | | | | | | | | | Since we're touching the example: improve the visualization of files inside the tree-view and provide a minimum width and height. Task-number: PYSIDE-2576 Task-number: QTBUG-119785 Change-Id: I47c6d3eb02436a9ab4213e9b8195b32eaaf37573 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Examples: Add Android tagShyamnath Premnadh2024-01-1214-0/+28
| | | | | | | | | | | | | | | - Examples that work on Android are tagged Android. - Clicking the tag lists all PySide6 examples supported in Android. - sphinx-tags package added to add blog like tags to examples. [ChangeLog][PySide6] Examples supported on Android are tagged `Android` in documentation Pick-to: 6.6 Task-number: PYSIDE-1612 Change-Id: Ic4ea2c63756d060aeea85b0088da9ae248eda24e Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add QLatin1StringFriedemann Kleint2024-01-081-0/+2
| | | | | | | | | It is needed For the QIcon::ThemeIcon fields. Task-number: PYSIDE-2497 Task-number: PYSIDE-2537 Change-Id: I11d94c150dfa614797038e56cd37128bf3e88cff Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* examples: update sql/books iconsCristián Maureira-Fredes2024-01-056-60/+97
| | | | | | | Change-Id: I4fe6e62fa643b1e073eea8ec49f3864abc810108 Fixes: PYSIDE-2521 Pick-to: 6.6 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* QtAsyncio: Add QtAsyncio.run() functionAdrian Herrmann2023-12-202-7/+4
| | | | | | | | | | | | | | | | | Add a QtAsyncio.run() function as the new recommended method to launch QtAsyncio programs. This abstracts the event loop policy and reduces the API to one single call. Additionally, this will allow to transparently replace the event loop policy with a loop factory when event loop policies are removed in Python 3.15 following their deprecation in 3.12. More information: https://discuss.python.org/t/removing-the-asyncio-policy-system-asyncio-set-event-loop-policy-in-python-3-15/37553 Pick-to: 6.6 Task-number: PYSIDE-769 Change-Id: I59d7eeb81debe92315351995f041caead4f51d8b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* QtAsyncio: Catch keyboard interruptsAdrian Herrmann2023-12-192-6/+0
| | | | | | | | | | | | | Catch keyboard interrupts by catching the SIGINT signal and handling it with the default handler. Register the handler with the QAsyncioEventLoopPolicy so that this is always done when using QtAsyncio. Pick-to: 6.6 Task-number: PYSIDE-769 Change-Id: I7b35367a50ab03eb014faabf6b6a3b21a6a3cd6c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Examples: Fix a number of flake8 errors (part 3)Adrian Herrmann2023-12-0614-39/+17
| | | | | | | | | | Fix unused variable errors and other miscellaneous errors not included in parts 1 and 2. Pick-to: 6.6 Change-Id: Ifb4336cd4ecdd62928042e1011d4430a461efc7c Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Examples: Fix a number of flake8 errors (part 2)Adrian Herrmann2023-12-0614-19/+15
| | | | | | | | Import changes, i.e., removed or added imports. Pick-to: 6.6 Change-Id: Iadfa8f77846d8ffef0aeea9fd1a6e7e9c4df5106 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Examples: Fix a number of flake8 errors (part 1)Adrian Herrmann2023-12-06104-698/+673
| | | | | | | | | First batch, including low-hanging fruit like Alignments, whitespaces, line length, indents, etc. Pick-to: 6.6 Change-Id: I55966876077f7fddfdc82cbe376677af9995f329 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix example quick3d/proceduraltextureFriedemann Kleint2023-12-061-1/+1
| | | | | | | | | | | Update QML file from C++, fixing error: ProceduralTextureModule/Main.qml:85:26: ArrayBuffer is not a type Pick-to: 6.6 Task-number: PYSIDE-2206 Change-Id: Ib2c2c7429acd251e9b28c78283c0ef50a077244b Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* PySide Examples: Add Contactslist exampleShyamnath Premnadh2023-12-0412-0/+496
| | | | | | | | | - Also works for Android Pick-to: 6.5 6.6 Task-number: PYSIDE-2206 Change-Id: Ib41b004a343c64a355187c9ef1780a8da4bd0553 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Examples: Fix some flake warningsFriedemann Kleint2023-11-2870-112/+135
| | | | | | | | Mostly spacing related. Pick-to: 6.6 Change-Id: If0d5b25e1c60b7b216f970d1e57613f00bd04a37 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* doc: Use different titles for async examplesAdrian Herrmann2023-11-242-4/+4
| | | | | | | | | Give the two async examples different titles in documentation so they don't appear with the same name in navigation. Pick-to: 6.6 Change-Id: I342a5b611e3d2b6cc415162c8ce5a0ee9441c8a8 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* doc: remove double white spaceCristián Maureira-Fredes2023-11-213-6/+6
| | | | | | Pick-to: 6.6 Change-Id: I68b835bb5fa00d35fe5406deee2acc83c7bac7cb Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Scene Graph Painted Item Example: Prototypically enable QML debuggingFriedemann Kleint2023-11-201-1/+9
| | | | | | | | Task-number: PYSIDE-2206 Pick-to: 6.6 6.5 Change-Id: I8112a1bd5c6020373d11a70a0043ccd1273735de Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update the clock exampleFriedemann Kleint2023-11-201-32/+48
| | | | | | | | | | | Port qtbase/619ec1a6406a8be7bfa9d96b9e693e7a3323d8dc to our QWindow example. Pick-to: 6.6 6.5 Task-number: QTBUG-118871 Task-number: PYSIDE-2206 Change-Id: Ib8ab8bf6f415b31d1493b3ea21f2c93aca4ed13d Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Add QtQuick3D Procedural texture exampleCristián Maureira-Fredes2023-11-158-0/+350
| | | | | | | | | Pick-to: 6.6 Task-number: PYSIDE-841 Co-authored-by: Dennis Oberst <dennis.oberst@qt.io> Change-Id: I191965e81aa93b812b128ad2045da1ef13f157b5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add rhiwindow exampleFriedemann Kleint2023-11-0215-0/+938
| | | | | | | Pick-to: 6.6 Task-number: QTBUG-113331 Change-Id: I4d775ecaeab5e8692a06d19b9951b139bc3d1051 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* File system explorer example: Improve shortcutsFriedemann Kleint2023-10-251-2/+3
| | | | | | | | Use the standard keys for zoom and the common Ctrl+Q for quit. Pick-to: 6.6 Change-Id: I3659a5a84bc1e46938729710af31c834b8a50ed8 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Browser examples: Some improvementsFriedemann Kleint2023-10-123-3/+13
| | | | | | | | | | - Output the Render process exit code in hex - Add an option for single process mode for trouble shooting Pick-to: 6.6 Change-Id: Ia9c9f7b7879b8a0b763f8bd74ac57c3d3579c06f Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* async: Remove unneeded signal from exampleAdrian Herrmann2023-10-101-6/+0
| | | | | | | | | Remove the unneeded done_signal from the eratosthenes asyncio example. Pick-to: 6.6 Task-number: PYSIDE-769 Change-Id: I5cc347ebb265e55afa82d37ce07fa2c6378ce133 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>