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

Резултати

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

Пребарај: #reparations

当前筛选 #reparations清除筛选
Venezuelanalysis

@venanalysis · Post #1957 · 07.05.2025 г., 20:52

📰 NEWS | US Court Rejects DHS Parole Cancellation, Upholds Migrants Legal Status A US federal court has rejected the Trump administration's effort to cancel humanitarian parole for thousands of Latin American migrants, ruling that such decisions must be case-specific. Separately, a declassified April 2025 intelligence memo concluded there is no credible evidence that Venezuela’s government is tied to the Tren de Aragua gang, contradicting public claims made by Trump officials. 🗞 Read the full report here: https://shorturl.at/7iqcw #DonaldTrump#Migration#Reparations

Venezuelanalysis

@venanalysis · Post #2019 · 02.07.2025 г., 21:56

📰 NEWS | Maduro Gov’t Calls for the Return of 18 Venezuelan Children ‘Abducted’ in the US Caracas has demanded the immediate return of 18 Venezuelan children held in US foster care after their parents were detained and deported. The Maduro gov’t condemned the family separations and pledged diplomatic efforts to secure their repatriation. The National Assembly also declared UN rights chief Volker Türk 'persona non grata', accusing him of bias and failing to address migrant abuses. The decision follows a contested UN report that accused the Venezuelan state of rights violations. 🔗 Read the full report here: https://shorturl.at/LsJEd #Migration#Reparations#UnitedStates#Venezuelanmigrants