aboutsummaryrefslogtreecommitdiffstats
path: root/examples/widgetbinding
Commit message (Collapse)AuthorAgeFilesLines
* Documentation: Link the Qt Widgets Designer custom widget examplesFriedemann Kleint2024-03-251-4/+2
| | | | | | | | 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>
* Replace cmake -H with -SAdrian Herrmann2024-03-111-1/+1
| | | | | | | | | | | | 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>
* widgetbinding example: Move .md file aroundFriedemann Kleint2023-05-122-0/+10
| | | | | | | | | Also add a dummy .pyproject Task-number: PYSIDE-1106 Change-Id: I1a8f4e4dd19b232e59e6e0007e39eb57b4efa0c1 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Switch the widget binding example to C++ 17Friedemann Kleint2023-03-061-2/+2
| | | | | | | Pick-to: 6.4 Change-Id: I08a2a5f1fdb029a3aefde4919b4f16b7460ec6e7 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Adapt the widgetbinding exampleFriedemann Kleint2023-02-202-6/+9
| | | | | | | | | Port qtbase/4a5abfcea4ec2e494efd117d278a929f020816c0, fixing the C++ code to handle UCS4 Emojis correctly. Task-number: PYSIDE-2206 Change-Id: Ia5cdf7e6579b1400dc16ca47ec2adcd6cfe66877 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add license headers to cmake filesFriedemann Kleint2023-02-161-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Task-number: QTBUG-105718 Task-number: QTBUG-88621 Change-Id: I98bd2e80f182d8bf7aef6b633f37a428e2dac69b Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Build system: Use modern form of finding and linking Qt librariesFriedemann Kleint2022-11-291-3/+1
| | | | | | | Pick-to: 6.4 Task-number: PYSIDE-962 Change-Id: I91aed62a8e14bbc1101b4f23e25f57a5d6bca173 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Build system: Bump versionsFriedemann Kleint2022-10-251-2/+2
| | | | | | | | | | | | State CMake 3.18+ and Python >= 3.7 Task-number: PYSIDE-2091 Pick-to: 6.4 Change-Id: Iad906a48bf4378ceeeebe5a55aeaa3f27ea0a61f Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix binding,scriptable examples when no build typeAdrian Herrmann2022-08-221-2/+2
| | | | | | | | | | | | Fix a problem where building the samplebinding, widgetbinding and scriptableapplication examples would fail if the CMAKE_BUILD_TYPE variable was not explicitly set. Amends f9f620436058efe93d086c5214955c4d56e70e26. Pick-to: 6.2 6.3 Change-Id: I6fa8afc386d259a16812bd69148d6299f3b70233 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix binding, scriptable examples for Windows debugAdrian Herrmann2022-08-091-2/+20
| | | | | | | | | | | | | | Fix the samplebinding, widgetbinding and scriptableapplication examples for debug configurations on Windows: 1. Account for the python_d executable name vs python 2. Same for the pyd file name for the binding examples (module_d.pyd instead of module.pyd) Pick-to: 6.2 6.3 Change-Id: I60933e8968401e03c829b797c5bc67a4db8d115d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-279-441/+18
| | | | | | | | | | | 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: Turn most QPainter instances into context managersChristian Tismer2022-01-261-12/+9
| | | | | | | | | | | | | | | 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>
* PyPySide: handle QPainter correctly with GCChristian Tismer2022-01-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* examples: use exec() instead of exec_()Cristian Maureira-Fredes2021-05-051-1/+1
| | | | | Change-Id: I07dd4339093be8fcc80e63a2ff0448e998356203 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Examples: Use new form of super()Friedemann Kleint2021-04-282-2/+2
| | | | | | Task-number: PYSIDE-1112 Change-Id: Ifcb4da974bdcad7af536404fffdbffc585d3d167 Reviewed-by: Christian Tismer <tismer@stackless.com>
* wheel_tester: Enable it again for Qt >= 6 with NuitkaChristian Tismer2021-04-071-1/+1
| | | | | | | | | | | | With the usage of nuitka, we have a working compiled test, again. Only the scriptableapplication fails, and only for CMake. This will be fixed in another check-in. The PyInstaller test remains in the code for being re-enabled. Task-number: PYSIDE-1523 Change-Id: Ic831fa5b110bbff4150a01cb8a7344ae050aae02 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Port the Qt bindings examples to the <QtModule/QtClass> conventionFriedemann Kleint2021-02-243-10/+7
| | | | | | | | | This simplifies the shiboken call; the global Qt include directory can be passed instead of each single QtCore/QtGui/QtWidgets directory. Pick-to: 6.0 Change-Id: I55a59ad12b0a9596a2c8d9dc7f0b9c041c38665c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Update and unify README.md of our binding examplesFriedemann Kleint2021-02-231-20/+22
| | | | | | | | ninja is the only working generator for Qt 6. Pick-to: 6.0 Change-Id: I9640f646ffea7b21659966680df52a21ead7119d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* PySide6: Add a Designer pluginFriedemann Kleint2021-02-161-0/+78
| | | | | | | | | | | | | | Add a convencience class QPyDesignerCustomWidgetCollection to the Qt Designer module, which provides functions for registering widget types or adding QDesignerCustomWidgetInterface instances. A static instance of it is stored as a dynamic property on QCoreApplication, which is retrieved by a Qt Designer plugin, which provides the collection of widgets registered in Python. Task-number: PYSIDE-1455 Change-Id: If4055e6c9db6a03b32016b013a1130051bbd472a Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Prepare the wiggly widget example for use in DesignerFriedemann Kleint2021-01-114-30/+83
| | | | | | | | | | | | | Refactor and brush up the code to C++/Python naming conventions. Turn text/running into properties. Most importantly, fix it to not crash when the text initially is empty. Task-number: PYSIDE-1455 Task-number: PYSIDE-841 Change-Id: If94558a453b1824ba54bd4f94808ced5798b2dc3 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Rename PySide2 to PySide6Friedemann Kleint2020-11-023-5/+5
| | | | | | | | Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I845f7b006e9ad274fed5444ec4c1f9dbe176ff88 Reviewed-by: Christian Tismer <tismer@stackless.com>
* Binding Example helpers: Remove version numbersFriedemann Kleint2020-11-022-27/+27
| | | | | | | | - Rename the scripts - Introduce variables for the versions in pyside_config.py Change-Id: I1dcb8ca7eee259f25af0db7c09abd30484c7e99c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Fix the C++ - based examples to workFriedemann Kleint2020-10-291-7/+10
| | | | | | | Adapt CMakeList.txt, fix includes. Change-Id: Idc9636bee798c4a025b70f91b8379a9b9c79a82c Reviewed-by: Christian Tismer <tismer@stackless.com>
* examples: Remove Python 2.7 and <3.6 related codeCristian Maureira-Fredes2020-10-281-1/+1
| | | | | | | | | | * 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>
* Rename shiboken2 to shiboken6Friedemann Kleint2020-10-281-6/+6
| | | | | | | | Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I4cb5ee4c8df539546014b08202a7b1e98ed3ff07 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Bump cmake version to 3.16Friedemann Kleint2020-09-041-2/+2
| | | | | | | | | | Streamline the features list handling in the module CMakeLists to use the list functionality introduced in cmake 3.3. Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: I184034cae408c815bd80a09016a21fde2969449e Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add custom widget shiboken exampleCristian Maureira-Fredes2020-06-1910-0/+949
This example is based on the WigglyWidget Qt/C++ example, and shows two ways of using a Custom Widget: * A full translation to Python, wigglywidget.py * Exposing the widget via Shiboken. The main.py file includes both scenarios and display them. Task-number: PYSIDE-841 Change-Id: I53c6db540aae2d5672a96bcf8f0e4a3e06b7ce9e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>