ae.kivy_qr_displayer

qr code displayer widget

the popup widget QrDisplayerPopup provided by this ae namespace portion is displaying QR codes.

the QrDisplayerPopup is inherited from ae.kivy_app.FlowPopup and is embedding the Kivy Garden kivy_garden.qrcode module.

qr displayer popup usage

to display a QR code instantiate QrDisplayerPopup specifying in the title property of the popup the string to encode to a QR image and in the qr_content property a short string describing the content of the string to encode. after that call the open method:

qr_displayer = QrDisplayerPopup(title="string to encode", qr_content="what to encode")
qr_displayer.open()

alternatively you can simply change the application flow to id_of_flow(‘open’, ‘qr_displayer’) (see also application flow):

main_app.change_flow(id_of_flow('open', 'qr_displayer'),
                     popup_kwargs=dict(title="string to encode",
                                       qr_content="what to encode"))

the label texts used by this popup widget are automatically translated into the german and spanish language via the translation texts provided in the resources of this ae namespace portion.

Note

if your app is providing i18n translations then the qr_content string has to be translated (e.g. by using get_txt() or get_text()) before it gets passed to the popup kwargs.

to support additional languages simply add the translations texts to your app’s translation texts resources or submit a PR to add them to this ae namespace portion. alternatively you could put different wording by specifying also the english translation text.

Hint

apart from root.qr_content you can also use root.title in the translation texts to repeat/mention the string to encode in the text content.

Classes

QrDisplayerPopup(**kwargs)

qr code displayer.

class QrDisplayerPopup(**kwargs)[source]

Bases: ae.kivy_app.FlowPopup

qr code displayer.

qr_content

string to name the content that get displayed as QR code

_container: Widget