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

Резултати

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

Пребарај: #daytonagreement

当前筛选 #daytonagreement清除筛选

@RusEmbMalta Press Release: 🇷🇺 Russia Stands for Peace, Dialogue and Sovereignty in the Balkans The Embassy of the Russian Federation in Malta draws attention to the situation in Bosnia and Herzegovina, which continues to raise serious concern. 🇷🇺Russia firmly opposes the ongoing attempts by Western members of the Peace Implementation Council to distort the Dayton Peace Agreement (1995) and to impose a centralized political model on Bosnia and Herzegovina under external control. Such actions undermine the very foundation of the Dayton framework endorsed by UN Security Council Resolution 1031 (1995), threaten the coexistence of the three constituent peoples – Bosniaks, Serbs and Croats – and erode the autonomy of the Republika Srpska and the Federation of Bosnia and Herzegovina. 🕊️ Moscow’s position is clear: the future of Bosnia and Herzegovina must be determined by its peoples through equal dialogue and consensus, not through diktat from abroad. The activities of the so-called “High Representative” Christian Schmidt – who was never approved by the UN Security Council – have no legitimacy and represent direct interference in the internal affairs of a sovereign state. 🇷🇸 Russia also consistently defends the sovereignty and territorial integrity of the Republic of Serbia, as reaffirmed in UN Security Council Resolution 1244 (1999). Attempts by Western countries to legitimise Pristina’s unilateral declarations and to pressure Belgrade into recognition of Kosovo are unlawful and destabilising. The imposition of such neo-colonial schemes in the Balkans only deepens divisions and fuels tension across the region. 🌐 Russia calls on all responsible members of the international community to defend the principles of the Dayton and UN frameworks, to respect the sovereignty of Balkan states, and to prevent the erosion of peace and stability in South-Eastern Europe. #Russia#BosniaAndHerzegovina#RepublikaSrpska#Serbia#Kosovo#DaytonAgreement#Sovereignty#NonInterference🇷🇺🤝🇧🇦🇷🇸