Ещё немного про base64.
Собрал пример со встроенной в код картинкой. Это иконка для окна на PySide2. Файл кодирован в base64 и просто сохранён в переменной.
Для использования этих данных даже не пришлось сохранять их в новый файл. Иконка создаётся на лету с помощью метода QPixmap.loadFromData()
...
raw_data = base64.decodebytes(ico_encoded)
ico = QPixmap()
ico.loadFromData(raw_data, "PNG")
...
🌎 Полный пример смотрите в gists.
#libs#tricks#qt
Caramelized Shallots Pumpkin Pasta 🎃🍝
Recipe for 2 servings
Ingredients:
- 1/2 Hokkaido pumpkin 🎃
- 250 g pasta 🍝
- 250 g shallots 🧅
- Vegan butter for frying 🧈
- 25 ml maple syrup 🍁
- 100 g vegan cream cheese 🌱
- 300 ml vegetable stock 🥕🍲
- Pinch of salt and pepper 🧂
Toppings
- Parsley, chopped 🌿
Preparation:
1. Dice the pumpkin and blanch for 10 minutes 🍲
2. Cook the pasta 🍝
3. Fry the shallots in butter, add maple syrup for a caramelized touch 🍁🧅
4. Deglaze with vegetable stock, add the pumpkin, stir, and simmer briefly 🎃🍲
5. Stir in the cream cheese, then mix in the pasta 🌱🍝
6. Top with fresh parsley and enjoy! 🌿✨
#VeganPasta#PumpkinSeason#CaramelizedShallots#ComfortFood#FallRecipes#PlantBased#EasyMeals#Yummy#PastaNight
@dishes