В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
🌎 The lost Etruscan language remains one of history’s great mysteries. Despite thousands of inscriptions, only parts have been decoded, as Etruscan is unrelated to Latin or Greek. Most surviving texts are funerary or religious, and the longest Etruscan text is on a linen mummy wrapping called the Liber Linteus. ✨
#history⚡#linguistics⚡#etruscan
👉subscribe Interesting Planet
🧩Which of these languages is agglutinative, meaning it builds words by adding simple parts that each express a meaning, rather than using separate words for each meaning?
Options:
Turkish
French
Chinese
English
Take the quiz below to find out
@languagetrivia#theory#linguistics#guess_the_languge
Құрметті Аударгазм клубының мүшелері!
Кейбір пікірлерге байланысты, "орысқұл, арабқұл, қытайқұл" деген ұлт пен болмысты балағайттайтын сөздерді, арна редакторы ретінде жақтырмайтымды ескертіп қоюдың орайы кеп тұр.
Мұнда тілдерді "ғылыми пән" (мүмкінінше) тұрғысында зерделеуге ұмтыламыз.
Тілі бөтен, түрі бөтенді бөлектеп, сабайтын құрал ретінде емес. Ұлтшыл патриот болсаңыз еш қарсылығымыз жоқ, бірақ арна бағыты бөлек, әрі ондай риториканы қолдамайтынымды ескеріп, арна мақсаты мен бағытына аздаған ізет танытуыңызды сұраймын.
Өз басым қазақ тілі ана тілім әрі басым тілім болған соң ғана мазмұн мен мәтінді көбіне қазақша жазамын.
Бұнымды әлдебір тілге қасақана басымдық беру емес, тарихи һәм кәсіби сәйкестік қана деп тапсаңыз игі еді.
Арнада үш тілдің кез келгеніне қатысты мәселені үш тілдің кез келгенінде тіл білімі тұрғысында бейтарап салыстырып, талқылауға болады.
Жаңа қосылған оқырманым, қош келдің, тұрақты оқырманым төзіміңе рақмет.
#тіл_білімі#языкознание#linguistics
Sindhu, Hindu, Indos, India — the modern name “India” ultimately traces back to the Sanskrit Sindhu, the great river named in the Rig‑Veda. As the name moved between languages it shifted: Iranian and some Indic neighbors changed initial s‑ to h‑ (Sindhu → Hindu), Arab and Persian speakers used related forms, and Greek writers rendered the people and land as Indos/India. Medieval European forms (Inde/Indie) circulated in manuscripts and maps, and by the 17th century the modern English name India returned via Latin, Spanish or Portuguese influence.
🌊📜🗺️
[Learn more]
@googlefactss
#etymology#history#linguistics#India#wordorigin
🎓 At the invitation of the Chair of Linguistics and Professional Communication in Foreign Languages at Ural Federal University (URFU), the Office of the Honorary Consul of South Africa in Yekaterinburg joined the graduation ceremony for this year’s linguists, translators, and language educators.
📚 As a token of appreciation, we presented the Chair with Jim Is Tired of Jo'burg by Mzuvukile Maqetuka, published last year by the URFU Publishing House and translated into Russian by Dr. Dmitry Pobedash, a faculty member of the Chair.
🤝 Also, we explored possible areas of cooperation for the upcoming academic year together with Dr. Maria Ilyushkina, Head of the Chair.
#URFU#Education#SouthAfrica#Translation#Linguistics#CulturalDialogue
The staff of the Honorary Consul's office gave a presentation on the Republic of South Africa and the role of Honorary Consul Sergey Mazurkevich to students in the Fundamental and Applied Linguistics and Roman-and-German Philology programs at the Department of Philology at Ural Federal University (URFU).
During the meeting, students had the opportunity to ask questions. After the presentation, we discussed potential avenues for further collaboration with Dr. Anna Plotnikova, Head of the Department.
#education#Yekaterinburg#URFU#Linguistics#Philology#SouthAfrica#HonoraryConsul#Mazurkevich
Snowclones are versatile phrase templates where key words can be swapped to create new, humorous meanings—like linguistic Mad Libs. Coined by linguists Geoffrey K. Pullum and Glen Whitman in 2004, they capture overused, customizable clichés popular in media and memes. Examples include “X is the new Y” or “I, for one, welcome our new X overlords.” They’re a fun way to remix language and culture. 🗣️🎭
Here’s a fresh snowclone to try out:
“X: Because sometimes, Y just isn’t enough.”
Examples:
- “Coffee: Because sometimes, sleep just isn’t enough.” ☕😴
- “Books: Because sometimes, reality just isn’t enough.” 📚✨
@googlefactss
#Snowclone#InternetCulture#Linguistics#Memes#LanguageFun