Ещё немного про base64.
Собрал пример со встроенной в код картинкой. Это иконка для окна на PySide2. Файл кодирован в base64 и просто сохранён в переменной.
Для использования этих данных даже не пришлось сохранять их в новый файл. Иконка создаётся на лету с помощью метода QPixmap.loadFromData()
...
raw_data = base64.decodebytes(ico_encoded)
ico = QPixmap()
ico.loadFromData(raw_data, "PNG")
...
🌎 Полный пример смотрите в gists.
#libs#tricks#qt
Matter exists in different states:
● Solid – fixed shape and volume, particles tightly packed.
● Liquid – fixed volume, no fixed shape, particles slide past each other.
● Gas – no fixed shape or volume, particles far apart.
● Plasma – like gas but particles are charged.
● Glass – between solid and liquid, amorphous.
● Superfluid – liquid with no resistance near absolute zero.
● Bose-Einstein Condensate – particles act as one quantum entity.
● Fermionic Condensate – similar to Bose-Einstein but formed by fermions.
● Dropleton – quantum liquid of electrons and holes.
● Degenerate Matter – exists under extreme pressure inside stars or planets.
Matter changes state when energy is added or removed.
[Source]
https://t.me/googlefactss
@googlefactss🔬🌡️#Science#Matter#Physics#Education