В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
A systemd fork has set out as a fu*k you to age verification.
Liberated systemd is a fork of mainline systemd started by Jeffrey Seathrún Sardina, a machine learning/AI researcher who apparently had enough of where things were heading. The project is straightforward about its purpose; strip out what it considers surveillance-enabling code, keep everything else intact, and stay in sync with upstream as it develops.
https://itsfoss.com/news/systemd-fork-strips-out-age-verification/
@itsfoss_official
#AgeVerification#SystemD
438 Experts Warn: Age Verification May Not Work | Tech, Privacy News Explained
More than 400 security and privacy experts have issued a formal warning about age verification systems.
Importantly, they are not arguing against protecting children online — but raising concerns about whether current systems actually work as intended, how they scale, and what risks they introduce.
The warning comes as governments in the UK, US, and Europe continue rolling out age verification and age assurance requirements under new regulations.
In this video, we look at:
• Who these experts are
• What they actually said
• The technical challenges behind age verification
• Why concerns about privacy, security, and effectiveness are being raised
• And why these systems are being introduced anyway
https://csa-scientist-open-letter.org/ageverif-Feb2026
#BigBrother#AgeVerification