mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Refactor
This commit is contained in:
parent
4e3dc9a06b
commit
effa65cb38
|
@ -8,13 +8,10 @@ if ImageQt.qt_is_installed:
|
|||
from PIL.ImageQt import QPixmap
|
||||
|
||||
if ImageQt.qt_version == "side6":
|
||||
from PySide6 import QtGui
|
||||
from PySide6.QtWidgets import QApplication, QHBoxLayout, QLabel, QWidget
|
||||
elif ImageQt.qt_version == "5":
|
||||
from PyQt5 import QtGui
|
||||
from PyQt5.QtWidgets import QApplication, QHBoxLayout, QLabel, QWidget
|
||||
elif ImageQt.qt_version == "side2":
|
||||
from PySide2 import QtGui
|
||||
from PySide2.QtWidgets import QApplication, QHBoxLayout, QLabel, QWidget
|
||||
|
||||
class Example(QWidget):
|
||||
|
@ -25,7 +22,7 @@ if ImageQt.qt_is_installed:
|
|||
|
||||
qimage = ImageQt.ImageQt(img)
|
||||
|
||||
pixmap1 = QtGui.QPixmap.fromImage(qimage)
|
||||
pixmap1 = ImageQt.QPixmap.fromImage(qimage)
|
||||
|
||||
QHBoxLayout(self) # hbox
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user