aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/text.py
diff options
context:
space:
mode:
authorBrianna2017-06-24 20:02:14 -0400
committerGitHub2017-06-24 20:02:14 -0400
commit1bb67d1513122ca7fb02e60a92339bd1a73dbee3 (patch)
treebd4497b3332f758da373393bfb58178f536b1b09 /src/components/text.py
parent68ac0cf755c6c3dbcef4abbb934cd1ead2d713c5 (diff)
parent4d955c5a06d8d77c968f594a85b71b516919bcfb (diff)
Merge pull request #34 from djfun/feature-newgui-qt5
Update to Qt5
Diffstat (limited to '')
-rw-r--r--src/components/text.py (renamed from components/text.py)6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/text.py b/src/components/text.py
index 2375dcd..76961c9 100644
--- a/components/text.py
+++ b/src/components/text.py
@@ -1,6 +1,6 @@
from PIL import Image, ImageDraw
-from PyQt4.QtGui import QPainter, QColor, QFont
-from PyQt4 import uic, QtGui, QtCore
+from PyQt5.QtGui import QPainter, QColor, QFont
+from PyQt5 import uic, QtGui, QtCore, QtWidgets
from PIL.ImageQt import ImageQt
import os
import io
@@ -138,7 +138,7 @@ class Component(__base__.Component):
painter.drawText(x, y, self.title)
painter.end()
- imBytes = image.bits().asstring(image.numBytes())
+ imBytes = image.bits().asstring(image.byteCount())
return Image.frombytes('RGBA', (width, height), imBytes)