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

Резултати

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

Пребарај: #responsibleconsumption

当前筛选 #responsibleconsumption清除筛选
EKOLOG.UZ| ENG

@ekologuzenglish · Post #11617 · 16.02.2026 г., 00:59

💄 Beauty or suffering? Do you know the hidden truth behind the cosmetics you use? The mascara, lipstick, pencils, and eyeliner we use every day may be linked to the suffering of thousands of animals. How? Many major cosmetic companies test their products on defenseless animals before releasing them to the market. For years, innocent rabbits, mice, and other animals have been subjected to painful experiments for cosmetic products that are not essential for life. ❗️ No living being should suffer simply to sell makeup. 🌍 A historic step was taken by California, which became the first U.S. state to ban the sale of cosmetics tested on animals. The law was signed in 2018 by Governor Jerry Brown and officially came into force in January 2020. This decision sent a powerful signal to the world and accelerated the global shift toward cruelty-free beauty. ✨ California showed that progress does not have to come at the cost of animal suffering. ✨ Compassion must always come before profit. ✨ Beauty should never be built on pain. Because true beauty is responsibility. #crueltyfree#environment#animalprotection#responsibleconsumption ☘️ Read the latest environmental news on @ekologuz. Follow us and send your suggestions and feedback via @eklguz_bot