aboutsummaryrefslogtreecommitdiffstats
path: root/examples/multimedia
Commit message (Collapse)AuthorAgeFilesLines
* Camera example: Fix choosing a cameraFriedemann Kleint2025-07-011-1/+1
| | | | | | | | | The camera device is stored in the action's data. Fixes: PYSIDE-3127 Pick-to: 6.9 6.8 Change-Id: I6dd252ceaab038311b48b1511072682d3a6e2c1e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Use fully qualified enumerations in more examples, round 2Friedemann Kleint2025-01-061-3/+3
| | | | | | | | | Complements 7189a4c5ec193d30c6bd4e68701038880cbc5982. Pick-to: 6.8 Task-number: PYSIDE-1735 Change-Id: Ifbfd48e953e74c18c02fbe075ad51dfeb56b97c9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Use fully qualified enumerations in more examplesFriedemann Kleint2025-01-064-49/+49
| | | | | | | Pick-to: 6.8 Task-number: PYSIDE-1735 Change-Id: Ic2c478ef363d73f65f366e21529c0429c86539aa Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix trailing empty linesFriedemann Kleint2024-12-131-1/+0
| | | | | | Pick-to: 6.8 Change-Id: I1a5964463f703ade0657816cb974206355a5ae5b Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Example: Fix on slider in example playerEce Cinucen2024-11-291-3/+10
| | | | | | | | Slider was not adjusting the volume. This bug on multimedia/player example fixed. Pick-to: 6.8 Change-Id: If73eed44959acaf66727412f2ddff42eb616abee Reviewed-by: Christian Tismer <tismer@stackless.com>
* Update Qt Widgets Designer formsFriedemann Kleint2024-09-1810-51/+51
| | | | | | | | 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>
* type hints: Fix some typing bugs for mypy (forgiveness)Friedemann Kleint2024-09-185-5/+6
| | | | | | | | | | | | | 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>
* Docs: Fix broken links from base documentationShyamnath Premnadh2024-08-161-1/+1
| | | | | | | | - 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>
* Use modern typing syntaxAdrian Herrmann2024-06-201-2/+1
| | | | | | | | | | | | 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-2012-0/+12
| | | | | | | | Add a future statement to all Python source files. Task-number: PYSIDE-2786 Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690 Reviewed-by: Adrian Herrmann <adrian.herrmann@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-095-19/+19
| | | | | | | | 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>
* Examples: Use theme iconsFriedemann Kleint2024-03-141-8/+9
| | | | | | | | Add some missing icons. Task-number: PYSIDE-2206 Change-Id: I7763f3ad145427dd97084e6191fd4828c2432baa Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@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>
* Examples: adapt to consider permission API on macOSShyamnath Premnadh2024-02-262-4/+20
| | | | | | | | | | - 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>
* 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: fix flake8 issues and add exceptionsCristián Maureira-Fredes2024-01-254-9/+9
| | | | | | | | | | 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>
* Examples: Add Android tagShyamnath Premnadh2024-01-123-0/+6
| | | | | | | | | | | | | | | - 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>
* Examples: Fix a number of flake8 errors (part 3)Adrian Herrmann2023-12-061-5/+4
| | | | | | | | | | 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-062-2/+2
| | | | | | | | 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-063-24/+8
| | | | | | | | | 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>
* Examples: Fix some flake warningsFriedemann Kleint2023-11-284-3/+3
| | | | | | | | Mostly spacing related. Pick-to: 6.6 Change-Id: If0d5b25e1c60b7b216f970d1e57613f00bd04a37 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Example Revamp: CameraShyamnath Premnadh2023-10-027-9/+1193
| | | | | | | | | | | | | | - Changes as per e3c0c190136a55634451024cfa3ac8024c74caa3 - New UI for Android as per the corresponding Qt example - Add the new permission API functions to request and check for Android runtime permissions - Update .pyproject file Task-number: PYSIDE-1612 Task-number: PYSIDE-2206 Pick-to: 6.6 Change-Id: I8b9c41c6cd12388addb5a8a4049c1126b62e098b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Example Revamp: Audiosource exampleShyamnath Premnadh2023-09-251-1/+30
| | | | | | | | | | | | - Changes as per e3c0c190136a55634451024cfa3ac8024c74caa3 - Add the new permission API functions to request and check for Android runtime permissions Task-number: PYSIDE-1612 Task-number: PYSIDE-2206 Pick-to: 6.6 Change-Id: Ie1213872775f1570dff7b9a7102fe3494996b9a9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Multimedia screen capture example: Add window captureFriedemann Kleint2023-08-046-53/+171
| | | | | | | | | | Port from qtmultimedia/3edff8e367b9060dd138a2b67cb87d2246a4a3e6. Task-number: PYSIDE-2206 Change-Id: Ia702faf47946a0f656b1546b205dfb442cf2f56a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* examples: remove unused importsCristián Maureira-Fredes2023-04-053-4/+4
| | | | | | Change-Id: I88a7bb2fe91abcfdef6e6014b088d08c4e613893 Pick-to: 6.5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Port the screencapture exampleFriedemann Kleint2023-04-056-0/+166
| | | | | | | Pick-to: 6.5 Task-number: PYSIDE-2206 Change-Id: I31c9a770b51f012d9f9e7c74bf59c88b3ee5a11d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Re-port the camera exampleFriedemann Kleint2023-03-2815-152/+1966
| | | | | | | Task-number: PYSIDE-2206 Pick-to: 6.5 Change-Id: I0f7e66eedf92c0d00ed47d6e55acec7c1819065b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Examples: Add some missing slot decoratorsFriedemann Kleint2022-08-242-2/+3
| | | | | | | | | | As unearthed by the warnings added by the logging category. As a drive-by, fix some imports. Pick-to: 6.3 6.2 Task-number: PYSIDE-2033 Change-Id: I3812c705b60eb7be744c3532fcfb0e4024763885 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Use SPDX license identifiersLucie Gérard2022-05-274-160/+9
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: I065150015bdb84a3096b5b39c061cf0a20ab637d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* examples: replace http by httpsCristián Maureira-Fredes2022-04-014-4/+4
| | | | | | Pick-to: 6.2 Change-Id: Ib53667e03a2dea2afea73a344d5749d37d59c52b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* examples: Turn most QPainter instances into context managersChristian Tismer2022-01-261-14/+10
| | | | | | | | | | | | | | | After the new context manager is in place, most of the examples benefit from moving QPainter into a `with` statement. The comments concerning PyPy could be removed, again. [ChangeLog][PySide6] The examples are updated to use the new context manager for QPainter. Task-number: PYSIDE-535 Change-Id: Idf7e1f734d549ed663383ffbb2416297ebb1e0c7 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Examples: Fix example URLs and documentation warningsFriedemann Kleint2022-01-261-3/+2
| | | | | | | | | | | | | Fix: sources/pyside6/doc/examples/example_corelib__mimetypesbrowser.rst:4: WARNING: Unknown target name: "mime type browser example https://doc.qt.io/qt-6/qtcore-mimetypes-mimetypebrowser-example.html". sources/pyside6/doc/examples/example_multimedia__audiosource.rst:4: WARNING: Unknown target name: "audio source example https://doc-snapshots.qt.io/qt6-dev/qtmultimedia-multimedia-audiosource-example.html". sources/pyside6/doc/examples/example_widgets_tools_regularexpression.rst:4: WARNING: Unknown target name: "qregularexpression example https://doc.qt.io/qt-6/qtwidgets-tools-regularexpression-example.html". sources/pyside6/doc/examples/example_widgets_tools_regularexpression.rst:: WARNING: image file not readable: examples/regularexpression.png Pick-to: 6.2 Task-number: PYSIDE-841 Change-Id: I541df87560227d4361823b2948890fb2bf949d8e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PyPySide: handle QPainter correctly with GCChristian Tismer2022-01-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | While testing the examples with PyPy, a number of examples used QPainter without explicitly calling painter.end() and crashed. This works in standard Python, but leaves the painter open in other implementations, because the implicit deletion of objects when going out of scope does not work in the wrapper when garbage collection is used. Fixed by providing the missing painter.end() calls. This problem should finally be fixed by making QPainter a context manager. The same approach was taken by Python.org and the file open/close functions. The context manager was needed for implementations like IronPython, Jython and PyPy. [ChangeLog][PySide6] The examples were adapted to PyPy's need to close QPainter, explicitly. Eventually, we may turn this into a context manager. Change-Id: I18eeeff7df800bafce91a1e5c98c469aa3bcc41b Pick-to: 6.2 Task-number: PYSIDE-535 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* AudioSource Example + Binding for QAudioFormat.normalizedSampleValue(data: ↵Shyamnath Premnadh2021-12-284-0/+256
| | | | | | | | | | | | | | | | | | | | bytes) In order to make the AudioSource example available in Python, the following functions were properly exposed to Python. - normalizedSampleSource(const void* data) const in QAudioFormat Previously, Shiboken took care of exposing these functions on its own. The fix here is to use PyBuffer as the counterpart for const char* in the Python side. The patch also consists of the working AudioSource example. Currently only the Push Mode works. Inorder to make the pull mode work, the function writeData(const char* data, qint64 len) should be properly exposed from C++ to Python through typestem, without code duplication. Task-number: PYSIDE-841 Task-number: PYSIDE-1743 Pick-to: 6.2 Change-Id: I1cd2c28136836c9bdf1021693f74e59eb98f390b Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide6/QtMultiMedia: Adapt to API recent changesFriedemann Kleint2021-06-233-16/+26
| | | | | | | | | | | | | | | | | | | | | | Build against qtmultimedia/a6e014eb088cb9b7bf55bf87c814e75cd4037dc2: - Re-add QAudioInput, QAudioOutput, qtmultimedia/9fd208f11a218d8a8b07fc525258eea3b3596d62 - Rename QCameraImageCapture to QImageCapture, qtmultimedia/83a031c56b74d68fe6d349f78c48a1681e40374e - Remove QImageEncoderSettings, qtmultimedia/d58d93b8e45b2bf62221b104914df771849c007c - Remove QMediaEncoderSettings, qtmultimedia/9c309ede2feb598908b1476062b79d0d23759bf3 - Changes around QMediaEncoder, qtmultimedia/fde5d6f7cce6118cac4ce7b92cd056225737917f qtmultimedia/994bcb23af8399485ddfdd16d2ba34c20326b432 - Comment out QMediaPlaylist, qtmultimedia/5773f7214c7430a98dea3974c0597cb3ee0ea7f5 Pick-to: 6.1 Change-Id: I9beb96c34ebe6132ad68e3628fcbbf0bc48127ef Reviewed-by: Christian Tismer <tismer@stackless.com>
* examples: add screenshots to widgets and othersCristian Maureira-Fredes2021-06-126-0/+33
| | | | | | | | | | | | | | | Adding screenshots to: - declarative - multimedia - network - widgets Renaming examples to avoid conflict on images names. Task-number: PYSIDE-841 Pick-to: 6.1 Change-Id: I21f403ee62b45c0cb2a45eca6c5c99f11901610e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* PySide6: Adapt to latest changes in QtMultimediaFriedemann Kleint2021-06-091-1/+1
| | | | | | | | | | Rename QCameraInfo/QAudioDeviceInfo to QCamera/AudioDevice, adapting to qtmultimedia/1c4dd0c23c0a7bdefaeecbae491a12f49a6b9ce5. Pick-to: 6.1 Task-number: PYSIDE-1482 Change-Id: I1a2972300aa0a8119e4c90919ed464124a7a6419 Reviewed-by: Christian Tismer <tismer@stackless.com>
* PySide6: Adapt to latest changes in QtMultimediaFriedemann Kleint2021-06-071-23/+23
| | | | | | | | | | Rename QAudioOutput to QAudioSink and QAudioInput to QAudioSource, following qtmultimedia/3350275e25c96b391e31d2c9c472b4f0aa58b8f7, qtmultimedia/aa1f073a32147d147e4e9a0fee9dde8ccc30531e. Pick-to: 6.1 Change-Id: I78bca6f8e9c43ef42753b3a81921440afe4ad387 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Multimedia player example: Add "Open" to toolbarFriedemann Kleint2021-05-281-0/+1
| | | | | | Pick-to: 6.1 Change-Id: I1f6226ece1e12aa5886d1093fee87b5a520416b0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix the multimedia examples to workFriedemann Kleint2021-05-183-260/+366
| | | | | | | | | | | | | | | - Port to qtmultimedia/9a4822037def3b9d48abea8bbfd7ea20fd19849b (wip/qt6). - Add Slot decorators - Rename according to snake case conventions - Connect error signals of player and camera - Use theme icons in player Pick-to: 6.1 Task-number: PYSIDE-1112 Task-number: PYSIDE-1482 Change-Id: Ib79614e56b2b1ad7ea6cd0406efa1d91ce1abdb1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Re-add QtMultimedia/WidgetsFriedemann Kleint2021-05-141-3/+3
| | | | | | | | | | | | | | | | | Fix it to build with qtmultimedia/9a4822037def3b9d48abea8bbfd7ea20fd19849b (wip/qt6). Remove typesystem_multimedia_forward_declarations.xml as the forward declarations of QVideoWidget and QGraphicsVideoItem no longer exist. Fix the tests. Fix the player example to run/crash. Pick-to: 6.1 Task-number: PYSIDE-1482 Change-Id: I340693e3510347f95b55395985bd2b0f294769a1 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix further f-string errors in examplesFriedemann Kleint2021-05-141-1/+1
| | | | | | | | | | | | | | | examples/multimedia/camera/camera.py", line 141 pattern = f"{picturesLocation}/pyside6_camera_{dateString}_{:03d}.jpg" SyntaxError f-string: empty expression not allowed examples/external/matplotlib/widget3d/widget3d.py", line 91 self.slider_azim_layout.addWidget(QLabel(f"{self.slider_azim.maximum())) SyntaxError EOL while scanning string literal Amends c5db9d63277201ee58829f7eb0656c534d04c249. Pick-to: 6.1 Change-Id: If6ca3deae03ecb39d58d1eea0ba1802c8b954b57 Reviewed-by: Christian Tismer <tismer@stackless.com>
* examples: clean and improve codeCristian Maureira-Fredes2021-05-132-23/+26
| | | | | | | | | | - removing '\' from long lines, - use f-strings instead of concatenating strings - Use f-strings instead of the old '%' formatting Task-number: PYSIDE-841 Change-Id: I4983c25a6272e10119d5d1a74c180828ca6f64e6 Reviewed-by: Christian Tismer <tismer@stackless.com>
* examples: use f-stringsCristian Maureira-Fredes2021-05-121-1/+1
| | | | | Change-Id: I0360f1476af666494c730e4f3c8f4f3c562abc09 Reviewed-by: Christian Tismer <tismer@stackless.com>
* examples: use exec() instead of exec_()Cristian Maureira-Fredes2021-05-053-4/+4
| | | | | Change-Id: I07dd4339093be8fcc80e63a2ff0448e998356203 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Examples: Fix some space-related flake warningsFriedemann Kleint2021-04-292-1/+6
| | | | | | Task-number: PYSIDE-1112 Change-Id: Ib8991199e4822673d6a25cba0023dbe3b03f5938 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Examples: Use new form of super()Friedemann Kleint2021-04-283-5/+5
| | | | | | Task-number: PYSIDE-1112 Change-Id: Ifcb4da974bdcad7af536404fffdbffc585d3d167 Reviewed-by: Christian Tismer <tismer@stackless.com>
* examples: directory structureCristian Maureira-Fredes2021-02-098-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | When generating the gallery automatically, the structure of the examples was not the same for all the modules. This reorganization was made under the following assumption: An example requires: - its own directory, - a '.pyproject' file, - one or more '.py' files, - extra files (likes images, .rc, .ui, etc) Even for cases when subdirectories are made to depict categories, like 'widgets/state-machine/...', one directory is required per example. There should not be '.pyproject' files for categories, except for the general 'examples.pyproject' to open all of them. Task-number: PYSIDE-1490 Pick-to: 6.0 Change-Id: Ie690773c816a248016dbebaad90fbb1d1c2aeea5 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>