В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
Emisora Provincial CMKS
La Emisora Provincial CMKS oferta dos plazas en el Departamento de Informática, para profesionales con experiencia en temas vinculados al funcionamiento de redes, programación y diseño web, así como seguridad.
Si usted es técnico, licenciado o ingeniero informático, usted puede ser parte de esta gran familia radial. Aproveche la oportunidad.
El pago mensual supera los 4500 CUP y según los resultados el trabajador puede ser estimulado salarialmente.
Puede llamar a los teléfonos:
-- 21324040.
-- 21323101.
Los que gusten serán atendidos en la Casa Radial sito en Calle Donato Mármol # 409 entre Martí y Pedro Agustín Pérez, Ciudad de Guantánamo.
[email protected] - 21324040, 21323101
#guantanamo
The Trump administration continues to ramp up its migration crackdown with reports that over 100 Venezuelans have been transferred to the infamous naval base in Guantánamo Bay, Cuba.
Read the story: https://venezuelanalysis.com/news/us-sends-dozens-of-venezuelan-migrants-to-guantanamo-as-relatives-plead-innocence/
#Migration#HumanRights#Guantanamo#Trump
‼️PAUKENSCHLAG – Freigegebene Gerichtsakten in Guantanamo deuten darauf hin, dass einige der 9/11-Terroristen CIA-Agenten waren‼️
Eine explosive Gerichtsakte der Militärkommission von Guantanamo – einem Gericht, das die Fälle von Angeklagten behandelt, die beschuldigt werden, die Terroranschläge vom 11. September auf New York ausgeführt zu haben – hat anscheinend das Undenkbare bestätigt.
https://legitim.ch/paukenschlag-freigegebene-gerichtsakten-in-guantanamo-deuten-darauf-hin-dass-einige-der-9-11-terroristen-cia-agenten-waren/
Willst du mehr davon? Dann abonniere unseren Kanal!
👉@LegitimNews
#CIA#FBI#InsideJob#Guantanamo
For over 20 years, the US has detained 39 Muslim men at Guantánamo Bay, with 27 never charged. The CIA operated secret "black sites" where at least 119 Muslim men were held and at least 39 tortured, without accountability. This system of unlawful detention, rendition, and abuse has cost billions, fueled propaganda by armed groups, and undermined global human rights.
[Read more]
@googlefactss#HumanRights#Guantanamo#Torture#Accountability#usa#liberty#LandOfTheFree
Buenas tardes estimados subscriptores
A partir de ahora para diferencias las ofertas laborales y para una mayor organización. Le daremos uso a los # por lo que cada oferta tendrá un # en referencia a la provincia , subiremos las de mayor votación en las encuestas.
#lahabana#guantanamo#isladelajuventud#santiagodecuba#holguin#granma#artemisa#pinardelrio#cienfuegos#villaclara#ciegodeavila