Ещё немного про base64.
Собрал пример со встроенной в код картинкой. Это иконка для окна на PySide2. Файл кодирован в base64 и просто сохранён в переменной.
Для использования этих данных даже не пришлось сохранять их в новый файл. Иконка создаётся на лету с помощью метода QPixmap.loadFromData()
...
raw_data = base64.decodebytes(ico_encoded)
ico = QPixmap()
ico.loadFromData(raw_data, "PNG")
...
🌎 Полный пример смотрите в gists.
#libs#tricks#qt
Let your voice be heard and play a role in building a #NewIndia!
Join MyGov, the largest citizen engagement platform of the world and become a #MyGovSaathi
https://youtu.be/VeJ9Tt_mw98
Language isn’t just a way to communicate—it’s the soul of our civilization and culture, as PM Narendra Modi says.
On #InternationalMotherLanguageDay, we celebrate Bharat’s rich linguistic heritage and the voices that make us one vibrant community!
With 11+ languages, MyGov, your citizen engagement platform ensures your voice is heard. Quizzes, contests, pledges, and more, because India’s diversity is its true strength.
Be a part of the MyGov family—be a MyGov Saathi!
🔗 Explore more: https://linktr.ee/MyGovSocial
#CitizenEngagement
#MyGovSaathi