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

Резултати

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

Пребарај: #ants

当前筛选 #ants清除筛选
Interesting Planet 🌍

@interesting_planet_facts · Post #754 · 15.09.2025 г., 13:22

🌎 Leafcutter ants and certain fungi share a remarkable partnership. Ants bring leaves underground—not to eat, but to feed a specific fungus they cultivate as food. This mutualism has existed for over 50 million years, making it one of the oldest known examples of symbiosis in the animal world. ✨ #symbiosis⚡#ants⚡#evolution 👉subscribe Interesting Planet ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1386 · 27.04.2026 г., 12:11

🌎 Leafcutter ants farm fungus by cutting leaves and bringing them to underground nests. The ants feed the fungus, then eat the fungus as their main food source. Over 47 species of leafcutter ants are found in Central and South America. ✨ #symbiosis⚡#ants⚡#nature 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1242 · 21.01.2026 г., 12:11

🌎 Army ants in Central and South America show remarkable cooperation by forming living bridges with their bodies. These bridges help the colony cross gaps during raids. Colonies can contain over 200,000 worker ants acting as a single super-organism. ✨ #ants⚡#cooperation⚡#symbiosis 👉subscribe Interesting Planet 👉more Channels ​

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40309 · 12.12.2025 г., 23:01

Ants don't have lungs. They breathe through tiny holes along the sides of their bodies called spiracles. These connect to a network of tubes (tracheae) that deliver oxygen directly to their tissues. [Read more] @googlefactss #Ants#Biology#Entomology#ScienceFacts

Interesting Planet 🌍

@interesting_planet_facts · Post #476 · 31.07.2025 г., 20:22

🌎 The leafcutter ant creates underground gardens by carrying fresh leaves to feed a special fungus, which is their true food. This farming partnership has evolved over millions of years, making these ants nature’s original farmers long before humans. ✨ #ants⚡#fungus⚡#agriculture 👉subscribe Interesting Planet