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 слични објави

Пребарај: #globaltensions

当前筛选 #globaltensions清除筛选
Crypto M - Crypto News

@CryptoM · Post #64725 · 09.04.2026 г., 16:12

🚀 Mortgage Rates Decline Amid Global Tensions Mortgage rates have decreased for the first time since the onset of the conflict in Iran. Bloomberg posted on X, highlighting the impact of geopolitical tensions on financial markets. The decline in rates comes as investors seek safer assets amid uncertainty. This shift in mortgage rates could influence housing market dynamics, offering potential relief to prospective homebuyers. Analysts suggest that continued geopolitical instability may further affect economic conditions globally. #MortgageRates#GlobalTensions#Geopolitics#FinancialMarkets#HousingMarket#EconomicImpact#Investors#Homebuyers#MarketUncertainty

Crypto M - Crypto News

@CryptoM · Post #64506 · 09.04.2026 г., 04:16

🚀 U.S. Vice President Advocates Peaceful Nationalism in Hungary Amid Global Tensions U.S. Vice President Donald Trump has expressed support for Hungarian Prime Minister Viktor Orban by promoting a vision of peaceful nationalism during his visit to Hungary. Bloomberg posted on X, highlighting the vice president's message, which contrasts sharply with the ongoing conflict in Iran. The advocacy for nationalism comes at a time when global tensions are heightened, raising questions about the feasibility of such an approach in the current geopolitical climate. Critics argue that the situation in Iran undermines the viability of peaceful nationalism, as international conflicts continue to pose significant challenges. The vice president's remarks aim to strengthen diplomatic ties with Hungary, emphasizing shared values and mutual interests. However, the backdrop of the Iran war presents a complex scenario for implementing nationalist policies focused on peace. #US#Hungary#Nationalism#PeacefulNationalism#ViktorOrban#DonaldTrump#Geopolitics#IranConflict#Diplomacy#GlobalTensions