1
0
mirror of https://gitlab.com/openlp/openlp.git synced 2024-12-25 11:14:07 +00:00

Remove dependency on PIL since the latest version does not support PyQt5

This commit is contained in:
Tomas Groth 2023-07-13 14:09:11 +00:00 committed by Raoul Snyman
parent 3d21a6acf5
commit b0bf26e530
3 changed files with 7 additions and 8 deletions

View File

@ -22,9 +22,8 @@
The :mod:`~openlp.core.api.tab` module contains the settings tab for the API
"""
import PIL.ImageQt
import PIL.Image
import qrcode
from qrcode.image.svg import SvgPathFillImage
from time import sleep
@ -287,10 +286,12 @@ class ApiTab(SettingsTab):
self.stage_url.setText(f'<a href="{http_url}stage">{http_url}stage</a>')
self.chords_url.setText(f'<a href="{http_url}chords">{http_url}chords</a>')
self.live_url.setText(f'<a href="{http_url}main">{http_url}main</a>')
img = qrcode.make(http_url)
img = PIL.ImageQt.ImageQt(img)
image = QtGui.QPixmap.fromImage(img)
self.app_qr_code_label.setPixmap(image)
# create a QR code SVG, size will be about 300x300
qr = qrcode.QRCode(box_size=24)
qr.add_data(http_url)
img = qr.make_image(image_factory=SvgPathFillImage)
qimg = QtGui.QImage.fromData(img.to_string())
self.app_qr_code_label.setPixmap(QtGui.QPixmap.fromImage(qimg))
def set_server_states(self):
"""

View File

@ -151,7 +151,6 @@ class UiAboutDialog(object):
'<li><a href="https://mkleehammer.github.io/pyodbc/">pyodbc</a> (MIT)</li>'
'<li><a href="http://initd.org/psycopg/">psycopg2</a> (LGPL3+)</li>'
'<li><a href="https://github.com/lincolnloop/python-qrcode/">qrcode</a> (MIT)</li>'
'<li><a href="https://pillow.readthedocs.io/en/stable/index.html/">pillow</a> (HPND)</li>'
'</ul>')
final_credit = translate('OpenLP.AboutForm', '<h3>Final credit:</h3>'
'<blockquote><p>For God so loved the world that He gave His one and only Son, so that '

View File

@ -95,7 +95,6 @@ MODULES = [
'pymediainfo',
'vlc',
'qrcode',
'PIL.ImageQt'
]