mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 01:47:47 +03:00 
			
		
		
		
	Detach PyQt6 QPixmap instance before returning
This commit is contained in:
		
							parent
							
								
									9a4b3e05d6
								
							
						
					
					
						commit
						73600eea94
					
				
							
								
								
									
										6
									
								
								.github/workflows/test-windows.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/test-windows.yml
									
									
									
									
										vendored
									
									
								
							| 
						 | 
					@ -80,6 +80,12 @@ jobs:
 | 
				
			||||||
        pytest-cov
 | 
					        pytest-cov
 | 
				
			||||||
        pytest-timeout
 | 
					        pytest-timeout
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: Install CPython dependencies
 | 
				
			||||||
 | 
					      if: "!contains(matrix.python-version, 'pypy')"
 | 
				
			||||||
 | 
					      run: >
 | 
				
			||||||
 | 
					        python3 -m pip install
 | 
				
			||||||
 | 
					        PyQt6
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Install dependencies
 | 
					    - name: Install dependencies
 | 
				
			||||||
      id: install
 | 
					      id: install
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -213,4 +213,7 @@ def toqimage(im: Image.Image | str | QByteArray) -> ImageQt:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def toqpixmap(im: Image.Image | str | QByteArray) -> QPixmap:
 | 
					def toqpixmap(im: Image.Image | str | QByteArray) -> QPixmap:
 | 
				
			||||||
    qimage = toqimage(im)
 | 
					    qimage = toqimage(im)
 | 
				
			||||||
    return getattr(QPixmap, "fromImage")(qimage)
 | 
					    pixmap = getattr(QPixmap, "fromImage")(qimage)
 | 
				
			||||||
 | 
					    if qt_version == "6":
 | 
				
			||||||
 | 
					        pixmap.detach()
 | 
				
			||||||
 | 
					    return pixmap
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user