В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
News: #UK bans all travels to #Tigray, #Amhara, and #Gambela regions, issues sweeping warnings across Ethiopia
The British government has significantly expanded its travel warnings for #Ethiopia, banning all travels to Tigray, Amhara and Gambella regions and advising against travels to several regions and large border areas owing to deteriorating security conditions.
In its latest advisory, the UK Foreign, Commonwealth & Development Office (#FCDO) stated:
UK nationals are advised against all travel to Tigray region, where recent reports show militarized tensions in various places.
UK’s travel warning also bans all travels to Amhara region, where a war between government and the Fano armed groups remained active since it first broke in 2023; and Gambela region, where renewed clashes saw scored killed and schools shuttered.
The advisory also extends to all areas within 10 kilometers of Ethiopia’s border with #Eritrea, and within 20 kilometers of the ….
Read more: https://addisstandard.com/?p=54877
News: #Australia issues ‘do not travel’ advisory for #Tigray, #Amhara, and other regions in #Ethiopia
The Australian government has issued a “do not travel” advisory for Ethiopia’s Tigray regional state, warning that the security situation could deteriorate rapidly with little or no warning, according to its latest update on the Smartraveller travel advisory platform.
In the update, Australian authorities urged their citizens currently in Tigray to leave when it is safe to do so using commercial means, noting that Australia’s ability to provide consular assistance in the region remains “extremely limited.” Travelers were also advised to follow local authorities’ instructions and to shelter indoors in the event of civil unrest or armed conflict.
Beyond Tigray, Australia continues to advise against all travel to the Amhara, #Benishangul-Gumuz, and #Gambela regional states, as well as border areas with #Eritrea, #Sudan, #South_Sudan, #Kenya, and #Somalia,....
Read more: https://addisstandard.com/?p=54924
Area Sales Manager
#ethiochicken_ethiopia
#business
#Bule | #Ambo | #Gambela | #Ginir | #Hosaena | #Yirgachefe | #Sheno
BSc Degree in Animal Science, Veterinary field of study
Duties & Responsibilities:
- Develop specific plans to ensure sales growth agent appointment in the territory
- Map how to achieve sales volume through prioritizing to make big achievement with minimum effort and shorter time
Quanitity Required: 20
Minimum Years Of Experience: #0_years
Deadline: December 16, 2023
How To Apply: Submit your applications (Cover Letter) including a detailed CV via email: [email protected]
N.B: Please title your application with the subject line: - " Area Sales Manager" and Specify the area you are applying for