В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
UN Forms High-level Advisory Body on AI for Global Governance
Hello, everybody! The United Nations Secretary-General has launched a multi-stakeholder High-level Advisory Body on Artificial Intelligence. This groundbreaking initiative is set to tap into AI's vast potential for humanity while simultaneously addressing the associated global risks and uncertainties posed by the rapid proliferation of AI technologies.
The Advisory Body will encompass up to 38 experts spanning various disciplines, including government, the private sector, and civil society. These experts, hailing from across the globe, bring diverse viewpoints on AI governance to the table. Their aim is to foster collaboration with existing and emerging initiatives alongside international organizations, creating a balanced and comprehensive dialogue on AI governance.
The UN's initiative to convene a High-level Advisory Body on AI is a proactive step towards establishing a coherent global framework for AI governance.
#UNAIAdvisoryBody#AI#GlobalGovernance
Microsoft Advocates for Robust Global AI Governance
Microsoft's new publication, “Global Governance: Goals and Lessons for AI,” authored by Brad Smith and Natasha Crampton, explores AI governance by drawing parallels to civil aviation and nuclear power regulation.
The report outlines a multi-layered approach involving industry standards, domestic regulation, and international governance to manage AI's global risks and foster inclusive progress.
The publication highlights three key goals for international AI governance:
✅Mitigating Global Risks: International collaboration is crucial to address risks associated with AI that transcend national borders.
✅Ensuring Compatibility: Interoperable regulations across countries will be essential for fostering innovation and avoiding fragmented approaches.
✅Promoting Inclusive Growth: International governance should ensure that everyone benefits from the advancements in AI.
The publication emphasizes the necessity for robust global governance frameworks to responsibly harness AI’s potential. “Global Governance: Goals and Lessons for AI” is available in print and e-reader formats.
#AI#GlobalGovernance#Technology#Microsoft#AIGovernance
#Beijing_Review🇨🇳📕[PDF]⬇️
30 #October2025
#Weekly_Magazines
For learning, for free(dom).
@backupofmagazines
This issue honors the #UnitedNations at 80, calling it a cornerstone of global cooperation. The cover story explores China’s role as a builder of inclusive #GlobalGovernance and its blueprint for shared progress. From women’s empowerment in #Agriculture to structural resilience and economic elasticity, features reveal the new dynamics shaping the #GlobalSouth. Insights on #ChinaUSRelations, the #ChinaMexico partnership, and Hainan’s innovation wave highlight how diplomacy and commerce interconnect. The culture section revives #SilkRoad heritage and Beijing’s ancient treasures. A visionary issue linking history, equality, and collective resilience for a changing world. #Sustainability#Equality#UN80#AsiaVoice#BRInsights
#Beijing_Review🇨🇳📕[PDF]⬇️
6 #November2025
#Weekly_Magazines
For learning, for free(dom).
@backupofmagazines
Beijing Review spotlights China’s #15thFiveYearPlan and its vision for a coordinated, green, and globally inclusive future. The issue unpacks Xi–Trump #Summit diplomacy in Busan, China’s push for #GenderEquality partnerships, and #RCEP as an engine for regional #Integration. Articles explore how strategic planning drives #Sustainability and global development under the banner of #Modernization. From energy transition to cyberspace security, the issue portrays a confident China charting a course for shared growth and stability.
#China#GlobalGovernance#Sustainability#FiveYearPlan#RCEP#XiTrumpMeeting#ClimateAction#DigitalFuture#GenderEquality#AsiaPacific