TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #175 · 30 окт.

В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль QtCompat (compatibility). Там не так много функций но они довольно полезны. Этот модуль содержит унификаци модуля shiboken2, функций loadUi, translate и несколько переименованных функций классов или изменённую сигнатуру аргументов и возвращаемых значений. Это единственное исключение из правила когда вам потребуется где-то изменить свой код кроме импортов и этот код не похож на обычный код PySide2. Например, в PyQt4 и PySide есть метод QHeaderView.setResizeMode Для PyQt5 и PySide2 они были благополучно переименованы в QHeaderView.setSectionResizeMode Чтобы применить этот метод следует использовать такой код from Qt import QtCompath header = self.horizontalHeader() QtCompat.QHeaderView.setSectionResizeMode(header, QtWidgets.QHeaderView.Fixed) Унификация загрузки UI файлов: # PySide2 from PySide2.QtUiTools import QUiLoader loader = QUiLoader() widget = loader.load(ui_file) # PyQt5 from PyQt5 import uic widget = uic.loadUi(ui_file) # Qt.py from Qt import QtCompat widget = QtCompat.loadUi(ui_file) Хорошо что таких моментов не много и их легко запомнить. Полный список можно посмотреть в таблице. #qt#tricks

Hashtags

Резултати

Пронајдени 2 слични објави

Пребарај: #vegetablepatties

当前筛选 #vegetablepatties清除筛选
Dishes.Cooking.Food

@cookingdish · Post #787 · 28.03.2025 г., 14:04

High Protein Vegetable Patties 🥕 Ingredients: - 1 small carrot 🥕 - 1 medium potato 🥔 - 1/2 bell pepper 🌶 - 1 onion 🧅 - 50 g soy granules 🌱 - 50 g corn 🌽 - 50 ml water 💧 - 100 g flour 🌾 - 1 tbsp starch ✨ - Oil for frying 🍳 Preparation: 1️⃣ Grate the carrot & potato, dice the pepper & onion, and place in a bowl 🥣 2️⃣ Soak the soybean granules in water, then add to the bowl along with the remaining ingredients and mix well 👩‍🍳 3️⃣ Shape the dough into patties and sauté in a pan with a little oil until golden brown 🥘 Enjoy! 😋 #HighProtein#VegetablePatties#VeganRecipe#HealthyEating#PlantBased @dishes

Dishes.Cooking.Food

@cookingdish · Post #583 · 17.11.2024 г., 15:23

High Protein Vegetable Patties 🥕 Ingredients: - 1 small carrot 🥕 - 1 medium potato 🥔 - 1/2 bell pepper 🌶️ - 1 onion 🧅 - 50 g soy granules 🌱 - 50 g corn 🌽 - 50 ml water 💧 - 100 g flour 🌾 - 1 tbsp starch ✨ - Oil for frying 🍳 Preparation: 1️⃣ Grate the carrot & potato, dice the pepper & onion, and place in a bowl 🥣 2️⃣ Soak the soybean granules in water, then add to the bowl along with the remaining ingredients and mix well 👩‍🍳 3️⃣ Shape the dough into patties and sauté in a pan with a little oil until golden brown 🥘 Enjoy! 😋 #HighProtein#VegetablePatties#VeganRecipe#HealthyEating#PlantBased @dishes