aboutsummaryrefslogtreecommitdiffstats
path: root/examples/widgets/dialogs
Commit message (Collapse)AuthorAgeFilesLines
* Use fully qualified enumerations in more examples, round 2Friedemann Kleint2025-01-062-9/+11
| | | | | | | | | Complements 7189a4c5ec193d30c6bd4e68701038880cbc5982. Pick-to: 6.8 Task-number: PYSIDE-1735 Change-Id: Ifbfd48e953e74c18c02fbe075ad51dfeb56b97c9 Reviewed-by: Cristian Maureira-Fredes <[email protected]>
* Widget examples: Use fully qualified enumerationsFriedemann Kleint2024-12-184-56/+58
| | | | | | | Pick-to: 6.8 Task-number: PYSIDE-1735 Change-Id: I99890e66ff29600072175185f471be0d7646c45b Reviewed-by: Cristian Maureira-Fredes <[email protected]>
* standarddialogs example: Fix error when checking dialog optionsFriedemann Kleint2024-12-181-5/+6
| | | | | | | | | | | | | | | | | | | The helper widget displaying the dialog options used int(0) as default value when building the options flags, causing: standarddialogs.py", line 274, in set_color options_value = self._color_options.value() File "examples/widgets/dialogs/standarddialogs/standarddialogs.py", line 33, in value result |= value TypeError: unsupported operand type(s) for |=: 'int' and 'ColorDialogOption' options_value = self._color_options.value() Fix this by passing a zero value of the correct options type. Pick-to: 6.8 Task-number: PYSIDE-1735 Change-Id: Ia82edb2403a9b4580fe3202d75e77da86290fdfe Reviewed-by: Cristian Maureira-Fredes <[email protected]>
* Documentation/Examples: Add missing docsShyamnath Premnadh2024-12-126-0/+30
| | | | | | | | | Some examples did not have any documentation. This patch adds the respective documentation. Pick-to: 6.8 Change-Id: I9698752b654c2df29fd3572f6bc66a9df56f9903 Reviewed-by: Friedemann Kleint <[email protected]>
* type hints: Fix some typing bugs for mypy (forgiveness)Friedemann Kleint2024-09-181-3/+3
| | | | | | | | | | | | | 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 <[email protected]>
* Python-3.10: Allow the new syntax for Python 3.9Christian Tismer2024-06-208-0/+8
| | | | | | | | Add a future statement to all Python source files. Task-number: PYSIDE-2786 Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690 Reviewed-by: Adrian Herrmann <[email protected]>
* examples: fix flake8 issues and add exceptionsCristián Maureira-Fredes2024-01-251-1/+1
| | | | | | | | | | 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 <[email protected]>
* Examples: Fix a number of flake8 errors (part 1)Adrian Herrmann2023-12-061-21/+16
| | | | | | | | | First batch, including low-hanging fruit like Alignments, whitespaces, line length, indents, etc. Pick-to: 6.6 Change-Id: I55966876077f7fddfdc82cbe376677af9995f329 Reviewed-by: Friedemann Kleint <[email protected]>
* Examples: Fix some flake warningsFriedemann Kleint2023-11-283-3/+3
| | | | | | | | Mostly spacing related. Pick-to: 6.6 Change-Id: If0d5b25e1c60b7b216f970d1e57613f00bd04a37 Reviewed-by: Adrian Herrmann <[email protected]>
* examples: remove unused importsCristián Maureira-Fredes2023-04-051-1/+1
| | | | | | Change-Id: I88a7bb2fe91abcfdef6e6014b088d08c4e613893 Pick-to: 6.5 Reviewed-by: Friedemann Kleint <[email protected]>
* Remove generated files from the example project filesFriedemann Kleint2023-03-231-2/+1
| | | | | | | Pick-to: 6.5 6.2 Task-number: PYSIDE-1106 Change-Id: Ic198a3ff73a82f4ad490fdb90d0a1aa839f5ebb2 Reviewed-by: Shyamnath Premnadh <[email protected]>
* examples: Remove the Find Files exampleAdrian Herrmann2023-03-022-187/+0
| | | | | | | | | | | | | | | | | | The example follows bad and outdated practices: - running time consuming and I/O heavy workload in the GUI thread - calling processEvents to keep the UI responsive - showing results only at the end of a search rather than continuously Perhaps this example can be rewritten at some point to apply modern practices (at least use a thread and emit signals), but it seems to have low overall educational value. Fixes: QTBUG-111002 Task-number: QTBUG-108751 Task-number: PYSIDE-2206 Change-Id: I6bd6a77e34fa59de548e2ba53483eda092165c33 Reviewed-by: Friedemann Kleint <[email protected]>
* Adapt the standarddialogs exampleFriedemann Kleint2023-02-201-29/+56
| | | | | | | | | Follow up qtbase/5789ffd9ccd67ffaa45f42fe3e96355ad7311eb4, qtbase/83b31a3d99dd96fadd65c25dc6b2b5de1351e300. Task-number: PYSIDE-2206 Change-Id: Ib51be975f9358c9d9f9d64505a2f175ce5769ab1 Reviewed-by: Christian Tismer <[email protected]>
* examples: fix unused imports and minor errors in 'widgets'Cristián Maureira-Fredes2022-09-215-17/+14
| | | | | | Change-Id: I0aad3aefb2f036bf4edc2d0942f007045d605e26 Reviewed-by: Adrian Herrmann <[email protected]> Reviewed-by: Friedemann Kleint <[email protected]>
* Examples: Add some missing slot decoratorsFriedemann Kleint2022-08-241-1/+17
| | | | | | | | | | 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 <[email protected]>
* examples: add license wizardjaime022022-06-297-0/+325
| | | | | | | | | Ported from c++. Pick-to: 6.2 6.3 Task-number: PYSIDE-841 Change-Id: I8cac7256d38a37d2c94967fec4e9349e8b17ec6a Reviewed-by: Cristian Maureira-Fredes <[email protected]>
* Use SPDX license identifiersLucie Gérard2022-05-277-282/+19
| | | | | | | | | | | 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 <[email protected]> Reviewed-by: Cristian Maureira-Fredes <[email protected]>
* examples: replace http by httpsCristián Maureira-Fredes2022-04-017-7/+7
| | | | | | Pick-to: 6.2 Change-Id: Ib53667e03a2dea2afea73a344d5749d37d59c52b Reviewed-by: Friedemann Kleint <[email protected]>
* Fix examples/widgets/dialogs/classwizard.pyShyamnath Premnadh2022-01-281-1/+1
| | | | | | | | - Changed str to QPixmap Pick-to: 6.2 Change-Id: I591fee0bf254e2c0c5684fc5982d5a3d57695e6d Reviewed-by: Friedemann Kleint <[email protected]>
* Regenerate the example resource filesFriedemann Kleint2021-12-151-4/+4
| | | | | | Pick-to: 6.2 Change-Id: I6e92728d6208aad0c0d8871ef362da30a61e358e Reviewed-by: Cristian Maureira-Fredes <[email protected]>
* Add tab dialog exampleJaime Resano2021-10-174-0/+231
| | | | | | | | | Ported from c++ Change-Id: I3589a66f8335e808bcc81796fa4aa3e2401b5973 Task-number: PYSIDE-841 Pick-to: 6.2 Reviewed-by: Christian Tismer <[email protected]>
* examples: clean and improve codeCristian Maureira-Fredes2021-05-132-11/+11
| | | | | | | | | | - 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 <[email protected]>
* examples: avoid built-in functions names as variableCristian Maureira-Fredes2021-05-121-4/+4
| | | | | | | | | There were many variable names using built-in python functions so this patch renames them to something safe. Task-number: PYSIDE-841 Change-Id: Iade34711ba31797f08f3f924be05023a7f12d5ef Reviewed-by: Christian Tismer <[email protected]>
* examples: use exec() instead of exec_()Cristian Maureira-Fredes2021-05-056-8/+8
| | | | | Change-Id: I07dd4339093be8fcc80e63a2ff0448e998356203 Reviewed-by: Friedemann Kleint <[email protected]>
* Examples: Fix some space-related flake warningsFriedemann Kleint2021-04-292-6/+6
| | | | | | Task-number: PYSIDE-1112 Change-Id: Ib8991199e4822673d6a25cba0023dbe3b03f5938 Reviewed-by: Cristian Maureira-Fredes <[email protected]>
* Examples: Use new form of super()Friedemann Kleint2021-04-284-11/+10
| | | | | | Task-number: PYSIDE-1112 Change-Id: Ifcb4da974bdcad7af536404fffdbffc585d3d167 Reviewed-by: Christian Tismer <[email protected]>
* Remaining examples: Use per-class importsFriedemann Kleint2021-04-233-88/+88
| | | | | | Task-number: PYSIDE-1112 Change-Id: I8534e911959d6eed2ed6d3f7741e99929ff0125e Reviewed-by: Christian Tismer <[email protected]>
* classwizard example: Use and generate super() without parametersFriedemann Kleint2021-04-231-8/+8
| | | | | | | | | | As a drive-by, add a missing comma. Amends 9a9f9fd2528c03df4b0e9dde48026a2181e8a410. Task-number: PYSIDE-1112 Change-Id: I5e7205609b460f56324a8ec193948250e6e38d6b Reviewed-by: Cristian Maureira-Fredes <[email protected]>
* classwizard example: Update documentation and screenshotFriedemann Kleint2021-04-222-1/+1
| | | | | | | | Complements 9a9f9fd2528c03df4b0e9dde48026a2181e8a410. Task-number: PYSIDE-1112 Change-Id: If239fea81f5db505aaaf1fff2cd6d0b8ad7c98f9 Reviewed-by: Christian Tismer <[email protected]>
* classwizard example: Update iconsFriedemann Kleint2021-04-129-3611/+2031
| | | | | | | | | Recreate the watermarks with Python code. Use the standard Qt for Python logo and remove the C++ logos. Task-number: PYSIDE-1112 Change-Id: I29679f7f6f4e245d7d29099648fea9678e6706f8 Reviewed-by: Christian Tismer <[email protected]>
* Rewrite the classwizard exampleFriedemann Kleint2021-04-123-276/+501
| | | | | | | | | | | | | | The classwizard created some outdated C++ header and source which is not useful for Qt for Python. Rewrite it to generate a Python class and add a special page allowing for specifying properties and signals of QObjects. Add an overwrite check and a 'Launch' checkbox to the conclusion page. Use QFormLayout instead QGridLayout for the pages. Task-number: PYSIDE-1112 Change-Id: Ice158553571e30ea069ceda8873bf165dc704afc Reviewed-by: Christian Tismer <[email protected]>
* Port QWidget examples to snake caseFriedemann Kleint2021-04-064-281/+281
| | | | | | Task-number: PYSIDE-1112 Change-Id: Ia42e395a3c650f4c11f05cfe5c6f67d309c4a3d3 Reviewed-by: Christian Tismer <[email protected]>
* Brush up the standarddialogs exampleFriedemann Kleint2021-03-291-210/+327
| | | | | | | | | | | | | | - Sync it up with the C++ example: * Add a widget for the dialog options * Add QInputDialog.getMultiLineText() - Port to snake case - Use per-class imports - Fix a crash in the font dialog code by using QFont.fromString() Task-number: PYSIDE-1112 Change-Id: I27df02ce0448fbd8dad529500652d58d23b0379c Reviewed-by: Christian Tismer <[email protected]> Reviewed-by: Cristian Maureira-Fredes <[email protected]>
* Replace % formatting in examples by f-stringsFriedemann Kleint2021-03-223-8/+16
| | | | | | | | As drive-by, Fix fortune server, addressbook and dombookmarks examples to work. Task-number: PYSIDE-1112 Change-Id: I8ef7759ed56aeb7157cf2222bee9b6481973112a Reviewed-by: Christian Tismer <[email protected]>
* doc: migrate qdoc approach to document examplesCristian Maureira-Fredes2021-03-172-0/+11
| | | | | | | | | | | | | | | | | There were two previous documented examples using the approach based on qdoc: stardelegate, and classwizard. This patch moves them into the 'doc/' directory for each example, and partially revert the changes from 308157f01260c640e21f6972619d3b380c007acb Additionally, an unrelated screenshot was moved to a new general 'images/' directory. Task-number: PYSIDE-1112 Pick-to: 6.0 Change-Id: I239a24fa4e4f970540857ba8b33b9b13c18142b1 Reviewed-by: Christian Tismer <[email protected]>
* examples: directory structureCristian Maureira-Fredes2021-02-099-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* Rename PySide2 to PySide6Friedemann Kleint2020-11-026-10/+10
| | | | | | | | Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I845f7b006e9ad274fed5444ec4c1f9dbe176ff88 Reviewed-by: Christian Tismer <[email protected]>
* examples: Remove Python 2.7 and <3.6 related codeCristian Maureira-Fredes2020-10-281-2/+0
| | | | | | | | | | * removing from __future__ import ... * updating CMakeLists.txt files * removing special if-else for Python 2 and 3 Change-Id: I8a34b06b6b384ebc5323f20f7c15c357a5be6d62 Reviewed-by: Christian Tismer <[email protected]> Reviewed-by: Friedemann Kleint <[email protected]>
* Fix a few examples to workFriedemann Kleint2020-07-271-1/+1
| | | | | | | | | Adapt to the Qt 6 API. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: Ia471ae8acc454dbbdd05700d08aee5bd6a265cee Reviewed-by: Christian Tismer <[email protected]>
* Port some examples from QRegExp to QRegularExpressionFriedemann Kleint2020-07-061-1/+1
| | | | | | | | | QRegExp is deprecated. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I5c5dc4965a03fbd1a3370be3fa9e64c5df6a9fd8 Reviewed-by: Cristian Maureira-Fredes <[email protected]>
* Examples: Adapt to new qApp variableFriedemann Kleint2020-02-251-1/+1
| | | | | | | | Amends d579912b31d7cfa7b0b216916fbbf3eb632a9d9d. Task-number: PYSIDE-571 Change-Id: Ide49ef2c9f99335b5019daea7d27cd1d86e896a4 Reviewed-by: Cristian Maureira-Fredes <[email protected]>
* Add .pyproject files for each exampleCristián Maureira-Fredes2019-09-272-0/+8
| | | | | Change-Id: I4dec66067aa2b0cc50d1ac3226537e4f09006132 Reviewed-by: Venugopal Shivashankar <[email protected]>
* Regenerate all example forms using the python-extended rcc of 5.14Friedemann Kleint2019-04-261-3829/+3793
| | | | | | Task-number: PYSIDE-855 Change-Id: Ib6f3989f1303f59c095cb12060f45388f0500b41 Reviewed-by: Alexandru Croitor <[email protected]>
* Examples: classwizard import __future__ firstCristian Maureira-Fredes2019-03-281-1/+1
| | | | | Change-Id: Iee3070f59472ee6a75495304f841ba012c90e873 Reviewed-by: Christian Tismer <[email protected]>
* Fix classwizard example (str -> QByteArray)Cristian Maureira-Fredes2019-03-271-3/+4
| | | | | Change-Id: I0c82e2d5a8fb431f55dd9d54ecaab48d8f40adb6 Reviewed-by: Friedemann Kleint <[email protected]>
* Fix standarddialog QFontDialog.getFont (returns)Cristian Maureira-Fredes2019-03-211-1/+1
| | | | | | Change-Id: I3b5420963445987f407d4332d0823e2790210f0a Reviewed-by: Alexandru Croitor <[email protected]> Reviewed-by: Friedemann Kleint <[email protected]>
* Change example scripts permissions to 644Cristian Maureira-Fredes2018-12-125-5/+0
| | | | | | | | | | | There was a mix of 644 and 755, since we expect the users to execute: python example.py we do not need to have files with 755. Change-Id: Iba9b2f5dbb57fe2a3503d8dfe971a4e92e764022 Reviewed-by: Friedemann Kleint <[email protected]> Reviewed-by: Simo Fält <[email protected]>
* Change license from all the filesCristian Maureira-Fredes2018-05-036-6/+6
| | | | | | | | | | | | | | | | | Removing the word 'project' from all the headers, and changing the PySide reference from the examples to Qt for Python: The following line was used inside the source/ and build_scripts/ directory: for i in $(grep -r "the Qt for Python project" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/the\ Qt\ for\ Python\ project/Qt\ for\ Python/g' $i;done and the following line was used inside the examples/ directory: for i in $(grep -r "of the PySide" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/of\ the\ PySide/of\ the\ Qt\ for\ Python/g' $i;done Change-Id: Ic480714686ad62ac4d81c670f87f1c2033d4ffa1 Reviewed-by: Friedemann Kleint <[email protected]> Reviewed-by: Alex Blasche <[email protected]>
* Move examples from submodule to pyside-setupFriedemann Kleint2018-01-1214-0/+5101
Move PySide2 examples that are owned by the Qt Company to a new examples directory. Done-with: Venugopal Shivashankar <[email protected]> Task-number: PYSIDE-363 Change-Id: I14099764d9eef2bc35e067086121427955862e3a Reviewed-by: Alexandru Croitor <[email protected]>