aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtWidgets/qpicture_test.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix tests using the Wayland platform pluginFriedemann Kleint2025-10-231-3/+1
| | | | | | | | | | | | | Remove the loop ensuring the window is mapped introduced by 918cd72f5eaebf56287a5ab0ac2e149ba1617a57, since on Wayland, the paint event occurs there, causing a hang. This loop is usually used to ensure a window is in a deterministic state for playing mouse events, etc, but for paint events it should not be required. Skip the native event test for Wayland, too. Change-Id: I2b44dc098873614e2b8d9bc54444917fd4905e9f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* tests: Fix warning about QBackingStore::flush() being called without handleFriedemann Kleint2025-03-141-6/+10
| | | | | | | | | | | Call qApp->quit() delayed from the paint event. This fixes crashes on macOS and warnings: QBackingStore::flush() called for QWidgetWindow(0x600003a22460, name="MyWidgetClassWindow") which does not have a handle. Pick-to: 6.8 Change-Id: I2e5d8aa1cfc36c4c247f681b4219f52c1a618737 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>
* Python-3.10: Allow the new syntax for Python 3.9Christian Tismer2024-06-201-0/+1
| | | | | | | | Add a future statement to all Python source files. Task-number: PYSIDE-2786 Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-271-27/+2
| | | | | | | | | | | 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-4/+2
| | | | | | | | | | | | | | | 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: Implement a context manager for QPainterChristian Tismer2022-01-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Context managers existed in Python since 2005 (PEP 343). They were invented to support resource management for different Python implementations that cannot rely on immediate object destruction. PyPy is the first alternate Python implementation that can run PySide. QPainter does not work in PyPy without an explicit end() call. For convenience, we supply a context manager that handles this. Like in file I/O, we now prefer instead of painter = QPainter(paintable) the new indented form with QPainter(paintable) as painter: [ChangeLog][PySide6] QPainter has become a context manager. Using a with statement saves the need to call painter.end() . Task-number: PYSIDE-535 Change-Id: Ib8bebbe121dc08334d31c9663a1e5bc8042c3b62 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* tests: use exec() instead of exec_()Cristian Maureira-Fredes2021-05-041-1/+1
| | | | | | Change-Id: I0868f70d7dfeafa7762296da5aa6efc2f32fcb5e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* Tests: Fix some space-related flake8 warningsFriedemann Kleint2021-04-291-1/+4
| | | | | Change-Id: I9b0ad08839bf1246620c557ec304dfa90882907b Reviewed-by: Christian Tismer <tismer@stackless.com>
* Switch from os.path to pathlib.Path, systematic test changesChristian Tismer2021-02-081-1/+2
| | | | | | | | | | | | | | | | | | This patch does the systematic changes on all tests. Note that there was a bug in principle: os.path was used without importing os.path This worked through the way how the os module initializes itself, but you always will find the explicit import in the python library. But the problem is going away anyway after the transition to pathlib.Path :) Change-Id: I95144d7f9bb07a38376c3aa428df663f2e64bcb7 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Rename PySide2 to PySide6Friedemann Kleint2020-11-021-0/+71
Adapt CMake files, build scripts, tests and examples. Task-number: PYSIDE-904 Change-Id: I845f7b006e9ad274fed5444ec4c1f9dbe176ff88 Reviewed-by: Christian Tismer <tismer@stackless.com>