В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
@RusEmbMalta Press release
On the anniversary of the Declaration of Ukraine’s independence
🔷 On August 24, 2024, Kiev celebrated a state holiday – the #Independence Day of Ukraine.
The Kiev regime keeps trying to boast about its supposed “victories”, successful banderization and forced ukrainianization. It is the geopolitical and mercantile interests of the West that in fact stand behind its “support”
of Ukraine, while this country is assigned the role of a “puppet” and “cannon fodder”.
🔷 The representatives of Zelensky's junta hardly dare to publicly discuss the violation of the provisions adopted in July 1990.
🔷 The heirs of Goebbels do not mention the real losses of the country and the missed opportunities during 33 years of “independence”, total depopulation and loss of whole industries. Kiev got into complete dependence on financial and material submits of the West, for which future generations of Ukrainians will have to pay.
Read in full here
Since 1380, Iceland was ruled by Denmark. On December 1, 1918, Iceland became its own country with the same king as Denmark. In 1940, Iceland started making its own big decisions. On June 17, 1944, Iceland became a republic and stopped having a king.
👑🇮🇸
[Source]
@googlefactss#Iceland#History#Independence#FunFacts
🌍 Qadrli yurtdoshlar!
🇺🇿 O‘zbekiston Respublikasi Vazirlar Mahkamasi huzuridagi Biznes va tadbirkorlik oliy maktabi jamoasi barchangizni 18-noyabr – “O‘zbekiston Respublikasining Davlat bayrog‘i qabul qilingan kun” bilan muborakbod etadi!
🇺🇿 Mustaqilligimiz hamda tinchligimiz ramzi bayrog‘imiz, g‘urur va faxrimiz timsoli yuksaklarda abadiy hilpirab tursin!
#GraduateSchool#Uzbekistan#Flag#Independence
🔝Web-site |🔝Facebook | 🔝Instagram | 🔝Youtube
🇺🇿Biznes va tadbirkorlik oliy maktabi barcha yurtdoshlarimizni mustaqilligimizning 34 yilligi bilan muborakbod etadi.
🇺🇿Mustaqillik - yurtni, millatni birlashtiradigan yagona kuch, ko‘p millatli halqimizning irodasi, uning hurriyat haqidagi azaliy orzularidir.
🦅 Vatanimiz osmoni musaffo, sarhadlari daxlsiz, chegaralarimiz mustahkam, hayotimiz yana-da farovon, mustaqilligimiz va ravnaqimiz abadiy bo‘lsin!
#GraduateSchool#Independence#34years#Development
🔝Web-site |🔝Facebook |🔝Instagram | 🔝Youtube
🇺🇿Biznes va tadbirkorlik oliy maktabi barcha yurtdoshlarimizni mustaqilligimizning 33 yilligi bilan muborakbod etadi.
🇺🇿Mustaqillik - yurtni, millatni birlashtiradigan yagona kuch, ko‘p millatli halqimizning irodasi, uning hurriyat haqidagi azaliy orzularidir.
🇺🇿 Vatanimiz osmoni musaffo, sarhadlari daxlsiz, chegaralarimiz mustahkam, hayotimiz yana-da farovon, mustaqilligimiz va ravnaqimiz abadiy bo‘lsin!
🦅Barchamizga yana bir bor O‘zbekistonimiz Mustaqilligining 33 yilligi muborak bo‘lsin!
#GraduateSchool#Independence#33years#Development
🔝Web-site |🔝Facebook |🔝Instagram | 🔝Youtube
🇰🇪 Jamhuri Day (Swahili: “Republic Day”) — is Kenya’s national day, celebrated on December 12. It marks independence from Britain (12 Dec 1963) and becoming a republic (12 Dec 1964). Common observances: flag‑raising, presidential speeches, parades, cultural performances, and civic ceremonies. If you’re Kenyan or were there during the festivities, share your photos. @googlefactss#JamhuriDay#Kenya#Independence
Siku njema ya Jamhuri kwa Wakenya wote.
8 сентябр Президенти Ҷумҳурии Тоҷикистон, Пешвои миллат муҳтарам Эмомалӣ Раҳмон дар паёми шодбошии худ ба муносибати 33-солагии истиқлоли давлатии Тоҷикистон тамоми мардуми сарбаланди кишвар ва ҳамватанони бурунмарзиамонро самимона табрик гуфта, ба ҳамаи онҳо хонаи обод, саодати рӯзгор, сулҳу оромӣ, ки асоси хушбахтии халқамон ва ободиву сарсабзии Ватани маҳбубамон мебошад, инчунин, комёбиву барори кор орзу намуданд.
8 сентября Президент Республики Таджикистан, Лидер нации уважаемый Эмомали Рахмона в своем поздравительном послании по случаю 33-й годовщины независимости, поздравив народ Таджикистана и зарубежных соотечественников, пожелал всем им семейного благополучия, счастливой жизни, мира и спокойствия, которые являются основой благоустройства нашей любимой Родины, безмятежной жизни народа, а также новых достижений и успехов.
#ЭмомалиРахмон#EmomaliRahmon#Tajikistan#Президент#Таджики#Tajiks#Тоҷикон#Независимость#Independence
President.tj | Facebook | Instagram | Telegram | X | Youtube
Congratulations on the 34th anniversary of independence: Putin tops the list, but Mirziyoyev stresses multi-vector policy. Different priorities for domestic and foreign audiences: Central Asia in the president’s speech and Russia–China in the official greetings.
https://yep.uz/en/2025/09/uzbekistan-34th-independence-day-congratulations/
#uzbekistan#mirziyoyev#independence#putin#xijinping#trump#centralasia#politics#multivector
VCs Retreat from Crypto Market
In 2023, analysts noted a significant decline in venture capital investments in cryptocurrency projects, returning to levels reminiscent of 2017. However, some initiatives are aiming to revive the industry’s original spirit of independence from VC influence, at least in principle. Insights provided by Oleg CasCoin for ForkLog. Read more
#VC#Crypto#Investment#Market#Decline #2017 #ForkLog#OlegCasCoin#Independence#Initiatives#Analysis#Freedom#Trends#Industry#Finance#Blockchain#News#Updates#Economy#Future
🚀 AI TRENDS | OpenAI's Sam Altman Addresses AI Development Concerns and Recent Incident
OpenAI founder Sam Altman has expressed understanding of societal fears regarding the rapid development of artificial intelligence. According to Odaily, Altman acknowledged that the current period is marked by significant technological change, with associated risks escalating to systemic challenges at the societal level. He emphasized that AI power should not be concentrated in a few institutions and advocated for broader distribution through technological democratization and institutional constraints.
Addressing a recent incident where his residence was targeted with a Molotov cocktail, Altman admitted to underestimating the impact of public narratives and emotions amid AI-related anxieties. He also acknowledged mistakes in company governance and conflict management, offering apologies for past actions. Furthermore, Altman reiterated his decision to reject Elon Musk's attempts to control OpenAI, ensuring the company's independent development.
Previously, it was reported that the OpenAI founder's residence was attacked with a Molotov cocktail.
#AI#OpenAI#SamAltman#AIdevelopment#technologicalchange#AIsociety#democratization#institutionalconstraints#Molotovcocktail#publicnarratives#conflictmanagement#ElonMusk#companygovernance#independence