Ещё немного про base64.
Собрал пример со встроенной в код картинкой. Это иконка для окна на PySide2. Файл кодирован в base64 и просто сохранён в переменной.
Для использования этих данных даже не пришлось сохранять их в новый файл. Иконка создаётся на лету с помощью метода QPixmap.loadFromData()
...
raw_data = base64.decodebytes(ico_encoded)
ico = QPixmap()
ico.loadFromData(raw_data, "PNG")
...
🌎 Полный пример смотрите в gists.
#libs#tricks#qt
#Mpox mainly spreads through contact with the
➡️blood or body fluids of infected animals, mostly via bites, scratches, handling, or eating inadequately cooked meats.
➡️virus from an infected person or contaminated materials
Visit a healthcare centre close to you if you notice symptoms associated with #mpox.
#PreventMpox
Getting infected while providing care can be prevented.
#Healthcare workers are urged to always practice standard #infectionpreventionandcontrol measures when handling suspected or confirmed cases of #Mpox.
#PreventMpox
#HealthTipMonday: Protect Yourself While Caring for Mpox Patients! 🏥🦠
Healthcare workers, your safety matters! Prevent Mpox infection by following standard Infection Prevention and Control (IPC) measures when handling suspected or confirmed cases.
Your safety is just as important as your patients.
Protect yourself while protecting others! Stay safe, stay informed.
#HealthTipMonday#PreventMpox#InfectionControl#HealthcareSafety#NCDCUpdates