В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
Hong Kong’s Universities Under Tight Control
The CCP has long turned mainland universities into tools of ideological control—and now it’s doing the same in Hong Kong. Under a new accountability agreement, eight public universities must align with Xi Jinping’s remarks and national goals.
Critical thinking? That’s the last thing the CCP wants. Education is becoming indoctrination.
香港大學教育正被政治操控
中共早已將中國高校變成洗腦機器,現在同樣的模式正在香港上演。根據新問責協議,八所公立大學必須與習近平講話及國家目標保持一致。
批判性思維?這正是中共最不希望人民擁有的能力。教育正在淪為思想灌輸。
https://hongkongfp.com/2025/07/30/hong-kong-public-universities-sign-new-accountability-agreement-requiring-alignment-with-xis-remarks
#academicfreedom#CCP#FreeHK
🔤 EN
At the first appeal hearing on September 25, Igbal requested a translator for the Talysh language, and at the hearing on October 2, his request was fulfilled. This fact has been interpreted in different ways. In this regard, we are publishing Igbal’s letter in four languages.
⸻
🔤RUS
На первом апелляционном заседании 25 сентября Игбал потребовал переводчика талышского языка и на заседании 2 октября его требование было выполнено. Данный факт был по-разному интерпретирован. В связи с этим публикуем письмо Игбала на 4 языках.
#FreeIgbal
#AcademicFreedom
#FreeIgbalAbilov#ScienceIsNotACrime
#Coming_UP: The Standard Signal | Ep. 10: PM Abiy Ahmed, Ethiopian Intellectuals, and Power
Prime Minister Abiy Ahmed’s January lecture at Addis Abeba University framed itself as a reflection on intellectuals, leadership, and national prosperity, defining who counts as an intellectual and assessing the role of ideas and academic institutions in Ethiopia’s history.
But who defines intellectuals? Why does it matter?
In this episode of The Standard Signal, Tsedale Lemma speaks with historian and public intellectual Ezekiel Gebissa to critically examine the lecture, probing what happens when power speaks in the language of ideas, and how this shapes intellectual autonomy and epistemic freedom.
Premiers at: 7:30 PM tonight.
Subscribe to watch: https://www.youtube.com/@AddisStandard
#Ethiopia#EthiopianIntellectuals#PowerAndIdeas#AcademicFreedom#AAU75#PublicIntellectuals#PoliticsAndKnowledge#TheStandardSignal
香港民意研究所的創辦人鍾庭耀因協助一名「已在海外潛逃的通緝犯」而遭警方調查。警方聲稱這與鍾的民調結果無關,但這清楚顯示出他們正試圖干預調查結果,對學術自由和言論自由造成嚴重損害。
這一行為進一步削弱了香港的國際地位,令人擔憂未來的民主和自由。自2020年國安法實施以來,香港的社會運動和言論自由受到嚴峻挑戰。我們必須警惕這一趨勢,並捍衛我們的權利!
#國安法#香港#鍾庭耀#言論自由#學術自由
Chung Ting-yao, founder of the Hong Kong Public Opinion Research Institute, is under investigation for assisting a “wanted person who has absconded overseas.” While the police claim this is not about Chung’s poll results, it clearly indicates an attempt to interfere with the outcomes, severely undermining academic freedom and freedom of speech.
This action further damages Hong Kong’s international standing and raises concerns about the future of democracy and freedom in the city. Since the implementation of the National Security Law in 2020, social movements and freedom of expression have faced intense challenges. We must remain vigilant against this trend and defend our rights!
#NSL#HongKong#ChungTingYao#FreedomOfSpeech#AcademicFreedom