В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
Harbor
Decentralized p2p identity verification system.
Identity management application written, targeting iOS, and Android, built on Polycentric. Create pseudonymous identities, make claims, link identities across applications.
Checkout harbor.social, or docs.polycentric.io for more information
What is Harbor and How it Works:
https://peertube.futo.org/w/939a212d-920f-4411-b9b6-d60aa4ef4db7
https://gitlab.futo.org/polycentric/harbor/
#p2p#id#verification#futo
https://x.com/HappyShaunVT/status/2026711290039906367
HappyShaun : Face verification is getting interesting. I THINK I CAN TRUST IT.
#happyshaun#vrchat#verification#meme#trust#lime
#Systemd Adds #Age#Verification & #Reddit#Linux Censors Age Verification Posts
Plus: Which Open Source Operating Systems plan to include Age Verification? The Lunduke Journal compiles a list.
Does It Age Verify?:
https://github.com/BryanLunduke/DoesItAgeVerify
https://lunduke.com
https://www.youtube.com/watch?v=M3erhbwqIAM
Lennart Poettering
#microsoft#stalking#surveillance#backdoor#trojan
Fight Disinformation with AI
INAR .IA Labs & Technologies has raised $1.21M for its innovative SaaS platform aimed at automating the detection and verification of disinformation across online content. Scheduled to launch on December 18, 2024, this multimodal and multilingual tool is set to enhance online security and information integrity. More details can be found at TrueFlag.
#Funding#Technology#AI#SaaS#Disinformation#Verification#OnlineSafety#Security#Innovation#Automation#Multimodal#Multilingual#Integrity#Content#Platform#Launch #2024 #INAR#TrueFlag#Labs