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

Пребарај: #internationaltranslationday

当前筛选 #internationaltranslationday清除筛选

🌍📚 On International Translation Day (September 30), the Office of the Honorary Consul of South Africa in Yekaterinburg made a presentation for 9th–11th grade students of School No. 212. 📖 Together, we explored the translation of Jim is Tired of Jo’burg by Mzuvukile Maqetuka — writer and former South African Ambassador to Russia. We also reflected on the history of translation and discussed the opportunities and challenges shaping the profession’s future. ✨ Translation is more than words — it’s a bridge connecting cultures and people! #InternationalTranslationDay#SouthAfrica#Yekaterinburg#Translation#Education#School#Books#Culture🌐

🌍📚 The office of the Honorary Consul of South Africa in Yekaterinburg hosted a workshop on consecutive interpretation for 11th-grade students of School No. 212. 🇿🇦 During the session, we explored the culture and history of South Africa, while also delving into the professional life of interpreters. 🗣 The workshop was conducted in both Russian and English: students took turns stepping into the shoes of an interpreter, followed by a group analysis of their performance. ✨ The students got a firsthand experience of what it’s like to work as an interpreter, gaining valuable insight into this dynamic profession! #SouthAfrica#Yekaterinburg#Translation#Education#School#Culture#Languages#InternationalTranslationDay