Ещё немного про base64.
Собрал пример со встроенной в код картинкой. Это иконка для окна на PySide2. Файл кодирован в base64 и просто сохранён в переменной.
Для использования этих данных даже не пришлось сохранять их в новый файл. Иконка создаётся на лету с помощью метода QPixmap.loadFromData()
...
raw_data = base64.decodebytes(ico_encoded)
ico = QPixmap()
ico.loadFromData(raw_data, "PNG")
...
🌎 Полный пример смотрите в gists.
#libs#tricks#qt
🇺🇸🇮🇱⚔🇮🇷🛩️The Watchful Eye Over the Gulf
✍🏽By Red Nile Media | Geopolitical Analysis
A U.S. Navy MQ-4C Triton spy drone has been conducting high-altitude surveillance over the Persian Gulf and Strait of Hormuz, flying out of the UAE—a subtle but powerful signal amid rising U.S.–Iran tensions. Far from routine, this deployment follows a familiar escalation playbook: persistent intelligence gathering, psychological pressure, and strategic positioning that often precede larger moves.
🔹 Why the shift from Qatar to the UAE? What message is being sent to Tehran? And how does this fit into past confrontation patterns in the region?
🔗Read the full analysis:
📡@rednile12
Geopolitics | Multipolarity | Sovereignty | Strategic Reality
#Iran#USA#UAE#Qatar#PersianGulf#Geopolitics#MilitaryIntelligence#MiddleEast#RedSea#ISR#MQ4C#RedNileMedia
🇺🇸🇮🇱⚔🇮🇷🛩️The Watchful Eye Over the Gulf
✍🏽By Red Nile Media | Geopolitical Analysis
A U.S. Navy MQ-4C Triton spy drone has been conducting high-altitude surveillance over the Persian Gulf and Strait of Hormuz, flying out of the UAE—a subtle but powerful signal amid rising U.S.–Iran tensions. Far from routine, this deployment follows a familiar escalation playbook: persistent intelligence gathering, psychological pressure, and strategic positioning that often precede larger moves.
🔹 Why the shift from Qatar to the UAE? What message is being sent to Tehran? And how does this fit into past confrontation patterns in the region?
🔗Read the full analysis:
📡@rednile12
Geopolitics | Multipolarity | Sovereignty | Strategic Reality
#Iran#USA#UAE#Qatar#PersianGulf#Geopolitics#MilitaryIntelligence#MiddleEast#RedSea#ISR#MQ4C#RedNileMedia