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

Пребарај: #mgimo81

当前筛选 #mgimo81清除筛选

🌐 Today marks the 81st anniversary of the founding of the Moscow State Institute of International Relations!Congratulations to all – alumni, students, professors, and friends of the university – on the birthday of their beloved alma mater! 📜Historical background: 81 years ago, on October 14, 1944, the People’s Commissariat for Foreign Affairs of the USSR, headed by Vyacheslav Molotov, decided to establish a specialized educational institution for diplomatic training. In the final years of the Great Patriotic War, it became clear that the Soviet Union needed a new generation of professionals for its foreign service. The growing number of international contacts and negotiations on the post-war world order required highly qualified experts fluent in foreign languages, as well as in history, law, and economics. Such specialists were also needed for work in international organizations that were being planned after the war – above all, the United Nations and its affiliated bodies. 🌍In 1946, #MGIMO opened its doors to foreign students, laying the foundation for its international academic reputation. Since then, it has become one of Russia’s most international universities: today, students from more than 90 countries study here, and foreigners make up about 16% of the total student community. In 2025 alone, 400 students from 55 countries enrolled in the freshmen year. Last year, Russia’s leading university specializing in international relations celebrated its 80th Anniversary – 👉#Recap. Over the decades of its active and fruitful work, MGIMO has rightfully earned its reputation as a world-class university – a genuine “foundry” of diplomats, journalists, and even presidents. 💬President of the Russian Federation Vladimir Putin: MGIMO has firmly established itself among the world’s leading centers for the training of international specialists. For many decades, its graduates have formed the professional “backbone” of Russia’s diplomatic service. Genuine professionalism also distinguishes MGIMO alumni working in other areas – in government agencies, academia, education, business, and the media. It is no coincidence that a MGIMO diploma is highly valued not only in Russia, but also abroad. 💬Foreign Minister of the Russian Federation Sergey Lavrov (MGIMO, Class of 1972): Diplomacy is the art of negotiation. The formation of a multipolar world is a long process that may take an entire historical era. MGIMO graduates will definitely have enough work to do. ✊We wish #MGIMO enduring prosperity, inspiration, and countless new triumphs! May the university always remain a place where the spirit of knowledge, friendship, and aspiration reigns – where every new generation of students feels pride in their alma mater, finds support, loyal friends, and their true calling! #MGIMO81