Skip to content

Commit 467f120

Browse files
authored
Merge branch 'main' into homebrew-isolation
2 parents 6d13704 + 2d1d801 commit 467f120

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.github/workflows/test-windows.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ jobs:
8080
pytest-cov
8181
pytest-timeout
8282
83+
- name: Install CPython dependencies
84+
if: "!contains(matrix.python-version, 'pypy')"
85+
run: >
86+
python3 -m pip install
87+
PyQt6
88+
8389
- name: Install dependencies
8490
id: install
8591
run: |

CHANGES.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ Changelog (Pillow)
55
11.1.0 (unreleased)
66
-------------------
77

8+
- Detach PyQt6 QPixmap instance before returning #8509
9+
[radarhere]
10+
811
- Corrected EMF DPI #8485
912
[radarhere]
1013

src/PIL/ImageQt.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,7 @@ def toqimage(im: Image.Image | str | QByteArray) -> ImageQt:
213213

214214
def toqpixmap(im: Image.Image | str | QByteArray) -> QPixmap:
215215
qimage = toqimage(im)
216-
return getattr(QPixmap, "fromImage")(qimage)
216+
pixmap = getattr(QPixmap, "fromImage")(qimage)
217+
if qt_version == "6":
218+
pixmap.detach()
219+
return pixmap

0 commit comments

Comments
 (0)