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

Пребарај: #eassom

当前筛选 #eassom清除筛选
Russian Mission to ASEAN

@aseanrussia · Post #309 · 09.03.2023 г., 04:01

🗓 On March 8, on the sidelines of the EAS SOM Meeting in Jakarta H.E. Mr. Andrey Rudenko, Deputy Minister of Foreign Affairs of the Russian Federation 🇷🇺, held a meeting with H.E. Mr. Kung Phoak, Secretary of State of the Ministry of Foreign Affairs and International Cooperation of the Kingdom of Cambodia 🇰🇭. Russian delegation discussed with the Cambodian Side, which is a country-coordinator of the ASEAN-Russia Dialogue Partnership, the whole range of issues of cooperation within the ASEAN-Russia Strategic Partnership, taking into account its 5th Anniversary this year. 🤝 Parties outlined further steps to intensify sectoral interaction putting special emphasis on such areas of common interest as science and technology, energy, digital transformation, ICTs, fight against terrorism and transnational crime. #RussiaASEAN#ASEANRussia#EAS#EASSOM

Russian Mission to ASEAN

@aseanrussia · Post #310 · 09.03.2023 г., 05:10

🗓On March 8, on the sidelines of the #EAS SOM Meeting in Jakarta, Deputy Minister of Foreign Affairs of the Russian Federation H.E. Mr. Andrey Rudenko🇷🇺 held a meeting with the Director General for ASEAN Cooperation of the Ministry of Foreign Affairs of the Republic of Indonesia H.E. Mr. Sidharto R. Suryodipuro🇮🇩. 🤝The diplomats reaffirmed their intention to consolidate efforts in order to strengthen the ASEAN-led security architecture and increase the efficiency of its mechanisms by building up inclusive practical cooperation. They touched upon key matters of ASEAN-Russia Strategic Partnership agenda, further strengthening of cooperation within the framework of ASEAN-led fora such as the #EAS, #ARF and #ADMM-Plus, as well as discussed topical issues and regional developments in the Asia-Pacific. #RussiaASEAN#ASEANRussia#EAS#EASSOM