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 слични објави

Пребарај: #talesfromafar

当前筛选 #talesfromafar清除筛选

Let’s celebrate the beauty and richness of global cultures — together! 📖“Dikorosy” (Wild Harvest) Fairy Tale Festival ✨ Special program: Tales from Afar 🗓 Saturday, May 24 🕔 5:00 PM – 6:00 PM 📍 Mayakovsky Park, Yekaterinburg 🔸 Story lineup: 1. The Guinea Fowl and the Caiman — Gabon 2. The Lonely Heart — Angola 3. The Magic Orange Tree — Haiti 4. The Boy and the Lion — Guinea 5. A Story About Mom — Côte d’Ivoire 6. The Cave Paintings — Algeria 7. The Mango and the Orange Tree — Benin 8. The Wisdom of Young Kofi — Mali 9. The Secret of the Golden Nile — Sudan 10. Ayo’s Dreams — Benin 📌 Organized with support from the Honorary Consulate of South Africa in Yekaterinburg 🌍 In celebration of Africa Day 💚 Come listen, wonder, and discover something new! 🌐 Official website: https://dikorosyfest.ru/ #Dikorosy#TalesFromAfar#AfricaDay#CulturalDiversity#Yekaterinburg#AfricanStories#StorytellingFestival#MayakovskyPark#DiscoverUrals

🎉May 21 — World Day for Cultural Diversity for Dialogue and Development Let’s celebrate the beauty and richness of global cultures — together! 📖“Dikorosy” (Wild Harvest) Fairy Tale Festival ✨ Special program: Tales from Afar 🗓 Saturday, May 24 🕔 5:00 PM – 6:00 PM 📍 Mayakovsky Park, Yekaterinburg 🌍Hear magical stories from Africa and the Caribbean, told in Russian by international students living in Yekaterinburg — a rare and inspiring experience for all ages. 🔸 Story lineup: 1. The Guinea Fowl and the Caiman — Gabon 2. The Lonely Heart — Angola 3. The Magic Orange Tree — Haiti 4. The Boy and the Lion — Guinea 5. A Story About Mom — Côte d’Ivoire 6. The Cave Paintings — Algeria 7. The Mango and the Orange Tree — Benin 8. The Wisdom of Young Kofi — Mali 9. The Secret of the Golden Nile — Sudan 10. Ayo’s Dreams — Benin 📌 Organized with support from the Honorary Consulate of South Africa in Yekaterinburg 🌍 In celebration of Africa Day 💚 Come listen, wonder, and discover something new! 🌐 Official website: https://dikorosyfest.ru/ #Dikorosy#TalesFromAfar#AfricaDay#CulturalDiversity#Yekaterinburg#AfricanStories#StorytellingFestival#MayakovskyPark#DiscoverUrals