From 83d55593d005cd540b042b27e6141a3d506d4215 Mon Sep 17 00:00:00 2001 From: DH4 Date: Fri, 23 Jun 2017 23:39:22 -0500 Subject: Fixed QtWidgets not imported on some components. --- src/components/text.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/text.py') diff --git a/src/components/text.py b/src/components/text.py index 0f599ed..76961c9 100644 --- a/src/components/text.py +++ b/src/components/text.py @@ -1,6 +1,6 @@ from PIL import Image, ImageDraw from PyQt5.QtGui import QPainter, QColor, QFont -from PyQt5 import uic, QtGui, QtCore +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) -- cgit v1.2.3