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

Пребарај: #russiankremlin

当前筛选 #russiankremlin清除筛选
Russian Consulate in Cape Town

@rusconct · Post #1969 · 07.11.2024 г., 21:18

📺 Vladimir Putin addressed the plenary session of the 21st annual meeting of the Valdai International Discussion Club 🌍We are destined to live in an era of fundamental, even revolutionary changes, and not only to comprehend but also to take a direct part in the most complex processes of the first quarter of the 21st century. We are witnessing the formation of a completely new world order, nothing like we had in the past. 💪🏻New powers are rising. Nations are becoming more and more aware of their interests, their value, uniqueness and identity, and are increasingly insistent on pursuing the goals of development and justice. 📌Societies are confronted with a multitude of new challenges, from exciting technological changes to catastrophic natural disasters, from outrageous social division to massive migration waves and acute economic crises. ⚠️Experts talk about the threat of new regional conflicts, global epidemics, about complex and controversial ethical aspects of interaction between humans and artificial intelligence, about how traditions and progress reconcile with each other. ❌Western liberalism has expressed itself in extreme intolerance and aggression towards any alternative, towards any sovereign and independent thought, and today supports neo-Nazism, terrorism, racism and even mass genocide of civilians. 💣International conflicts may result in mutual destruction. Weapons capable of doing this exist and are constantly being improved as technology develops. And the number of owners of such weapons is expanding, and no one guarantees that in case of final destruction of legal and moral norms it will not be involved. ❌The West's calls to inflict a strategic defeat on Russia, the country with the largest arsenal of nuclear weapons, demonstrate the extreme adventurism of Western politicians. Such a blind belief can turn into a world tragedy. We have come to a dangerous line. 🇷🇺Unlike our opponents, Russia does not perceive Western civilization as an enemy, does not ask the question "us or them". 🙌🏻 Common efforts could be directed with much greater benefit, a return on solving truly common problems that affect everyone: from the problems of demography and social inequality to climate change, food security, medicine and new technologies. Full version: Valdai Discussion Club meeting #RussianKremlin#RussianMFA#VladimirPutin