Ещё немного про base64.
Собрал пример со встроенной в код картинкой. Это иконка для окна на PySide2. Файл кодирован в base64 и просто сохранён в переменной.
Для использования этих данных даже не пришлось сохранять их в новый файл. Иконка создаётся на лету с помощью метода QPixmap.loadFromData()
...
raw_data = base64.decodebytes(ico_encoded)
ico = QPixmap()
ico.loadFromData(raw_data, "PNG")
...
🌎 Полный пример смотрите в gists.
#libs#tricks#qt
#Ebola Virus Disease (EVD) has a high fatality rate, but early detection, supportive care, and strict adherence to preventive measures can significantly reduce risks.
⚠️ Protect yourself and others by following health advisories, practicing good hygiene, and reporting any suspected cases immediately.
#EbolaAwareness#HealthyLiving#NCDCNigeria
#Ebola is a serious infectious disease that can spread rapidly if not recognized and contained on time. The signs and symptoms usually appear 2–21 days after exposure.
⚠️ If you or someone around you notices these symptoms, do not ignore them. Seek medical attention immediately and avoid contact with others until cleared by health professionals.
🛡️ Protecting yourself also protects your family, friends, and community.
Let’s work together to stop the spread of Ebola.
#EbolaAwareness#HealthyLiving#StaySafe
#Ebola is caused by the Ebolavirus — a group of viruses with several species, including Zaire, Sudan, Bundibugyo, Taï Forest, and Reston ebolavirus (which affects animals but not humans).
Knowing the cause helps us strengthen prevention and response efforts. 💪🏾
Stay Safe, Stay Protected!
#EbolaAwareness#HealthSecurity#NCDCNigeria