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:
parent
3d21a6acf5
commit
b0bf26e530
@ -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):
|
||||
"""
|
||||
|
@ -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 '
|
||||
|
@ -95,7 +95,6 @@ MODULES = [
|
||||
'pymediainfo',
|
||||
'vlc',
|
||||
'qrcode',
|
||||
'PIL.ImageQt'
|
||||
]
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user