mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +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
|
from PIL.ImageQt import QPixmap
|
||||||
|
|
||||||
if ImageQt.qt_version == "side6":
|
if ImageQt.qt_version == "side6":
|
||||||
from PySide6 import QtGui
|
|
||||||
from PySide6.QtWidgets import QApplication, QHBoxLayout, QLabel, QWidget
|
from PySide6.QtWidgets import QApplication, QHBoxLayout, QLabel, QWidget
|
||||||
elif ImageQt.qt_version == "5":
|
elif ImageQt.qt_version == "5":
|
||||||
from PyQt5 import QtGui
|
|
||||||
from PyQt5.QtWidgets import QApplication, QHBoxLayout, QLabel, QWidget
|
from PyQt5.QtWidgets import QApplication, QHBoxLayout, QLabel, QWidget
|
||||||
elif ImageQt.qt_version == "side2":
|
elif ImageQt.qt_version == "side2":
|
||||||
from PySide2 import QtGui
|
|
||||||
from PySide2.QtWidgets import QApplication, QHBoxLayout, QLabel, QWidget
|
from PySide2.QtWidgets import QApplication, QHBoxLayout, QLabel, QWidget
|
||||||
|
|
||||||
class Example(QWidget):
|
class Example(QWidget):
|
||||||
|
@ -25,7 +22,7 @@ if ImageQt.qt_is_installed:
|
||||||
|
|
||||||
qimage = ImageQt.ImageQt(img)
|
qimage = ImageQt.ImageQt(img)
|
||||||
|
|
||||||
pixmap1 = QtGui.QPixmap.fromImage(qimage)
|
pixmap1 = ImageQt.QPixmap.fromImage(qimage)
|
||||||
|
|
||||||
QHBoxLayout(self) # hbox
|
QHBoxLayout(self) # hbox
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user