TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #175 · 30 окт.

В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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

Hashtags

Резултати

Пронајдени 2 слични објави

Пребарај: #eff

当前筛选 #eff清除筛选
403 Forbidden

@forbid_403 · Post #283 · 14.03.2024 г., 06:31

EFF:呼吁议会停止对 Tik Tok 的封禁。 EFF 称议会不应根据社交媒体平台的运营者所属国家对其进行封禁;无论谁在收集数据,个人隐私都应受到保护。 https://act.eff.org/action/tell-congress-stop-the-tiktok-ban #EFF#TikTok#US

Addis Standard

@addisstandardeng · Post #21262 · 31.01.2026 г., 10:43

News: #Ethiopia submits 2028 AFCON bid, seeking fourth hosting after 50-year gap Ethiopia has formally submitted a bid to host the 2028 Africa Cup of Nations (#AFCON), seeking to stage the continental tournament for a fourth time and for the first time in more than five decades, according to a report by state-owned media citing the Ethiopian Football Federation (#EFF). The report said the bid was officially lodged with the Confederation of African Football (#CAF), marking Ethiopia’s return to contention for hosting the tournament it last staged in 1976. Ethiopia previously hosted AFCON in 1962, 1968, and 1976, and won the title on home soil in 1962. If awarded hosting rights, Ethiopia would become the joint second country to stage the Africa Cup of Nations the most times, behind only Egypt (5). Bahiru Tilahun, Secretary General of the Ethiopian Football Federation, was quoted in... https://www.facebook.com/AddisstandardEng/posts/pfbid02RBrfdanpeSSvrR4tcTWEyWrsRV4djoQDikrUvipckET9MttjzYM8t98rmQ3EG2o3l