aboutsummaryrefslogtreecommitdiffstats
path: root/examples/widgets/dialogs
Commit message (Collapse)AuthorAgeFilesLines
* Regenerate the example resource filesFriedemann Kleint2021-12-151-4/+4
| | | | | | Pick-to: 6.2 Change-Id: I6e92728d6208aad0c0d8871ef362da30a61e358e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* 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 <tismer@stackless.com>
* 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 <tismer@stackless.com>
* 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 <tismer@stackless.com>
* examples: use exec() instead of exec_()Cristian Maureira-Fredes2021-05-056-8/+8
| | | | | Change-Id: I07dd4339093be8fcc80e63a2ff0448e998356203 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Examples: Fix some space-related flake warningsFriedemann Kleint2021-04-292-6/+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-284-11/+10
| | | | | | Task-number: PYSIDE-1112 Change-Id: Ifcb4da974bdcad7af536404fffdbffc585d3d167 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Remaining examples: Use per-class importsFriedemann Kleint2021-04-233-88/+88
| | | | | | Task-number: PYSIDE-1112 Change-Id: I8534e911959d6eed2ed6d3f7741e99929ff0125e Reviewed-by: Christian Tismer <tismer@stackless.com>
* 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 <cristian.maureira-fredes@qt.io>
* classwizard example: Update documentation and screenshotFriedemann Kleint2021-04-222-1/+1
| | | | | | | | Complements 9a9f9fd2528c03df4b0e9dde48026a2181e8a410. Task-number: PYSIDE-1112 Change-Id: If239fea81f5db505aaaf1fff2cd6d0b8ad7c98f9 Reviewed-by: Christian Tismer <tismer@stackless.com>
* 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 <tismer@stackless.com>
* 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 <tismer@stackless.com>
* Port QWidget examples to snake caseFriedemann Kleint2021-04-064-281/+281
| | | | | | Task-number: PYSIDE-1112 Change-Id: Ia42e395a3c650f4c11f05cfe5c6f67d309c4a3d3 Reviewed-by: Christian Tismer <tismer@stackless.com>
* 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 <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* 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 <tismer@stackless.com>
* 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 <tismer@stackless.com>
* 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 <cristian.maureira-fredes@qt.io>
* 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 <tismer@stackless.com>
* 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 <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* 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 <tismer@stackless.com>
* 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 <cristian.maureira-fredes@qt.io>
* 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 <cristian.maureira-fredes@qt.io>
* Add .pyproject files for each exampleCristián Maureira-Fredes2019-09-272-0/+8
| | | | | Change-Id: I4dec66067aa2b0cc50d1ac3226537e4f09006132 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* 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 <alexandru.croitor@qt.io>
* Examples: classwizard import __future__ firstCristian Maureira-Fredes2019-03-281-1/+1
| | | | | Change-Id: Iee3070f59472ee6a75495304f841ba012c90e873 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Fix classwizard example (str -> QByteArray)Cristian Maureira-Fredes2019-03-271-3/+4
| | | | | Change-Id: I0c82e2d5a8fb431f55dd9d54ecaab48d8f40adb6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix standarddialog QFontDialog.getFont (returns)Cristian Maureira-Fredes2019-03-211-1/+1
| | | | | | Change-Id: I3b5420963445987f407d4332d0823e2790210f0a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* 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 <Friedemann.Kleint@qt.io> Reviewed-by: Simo Fält <simo.falt@qt.io>
* 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 <Friedemann.Kleint@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* 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 <Venugopal.Shivashankar@qt.io> Task-number: PYSIDE-363 Change-Id: I14099764d9eef2bc35e067086121427955862e3a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>