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

Пребарај: #vandalism

当前筛选 #vandalism清除筛选

🎙 Briefing by Russia's Foreign Ministry Spokeswoman Maria Zakharova (Moscow, November 7, 2025) 🔹Outcomes of Russia’s UNSC Presidency 🔹Kiev regime crimes 🔹Ukraine crisis 🔹Estonia’s introduction of a “fee for energy independence from Russia” 🔹Third advisory opinion of the UN International Court of Justice regarding Palestine 🔹Election of the new UNESCO Director-General during the 43rd session of the UNESCO General Conference 🔹The signing of a peace declaration by Cambodia and Thailand 🔹 2025 BRICS+ Counter-Terrorism Conference 📰Read 📺Watch #UN#UNGA On October 31, the Russian Federation completed its Presidency of the UN Security Council. During this period, the Council held a total of 22 meetings and 11 consultations. A broad range of conflict situations across nearly all regions of the world, as well as other pressing challenges to international peace and security, were considered. Russia’s Presidency reaffirmed our country’s strong authority as a founding member of the UN and a permanent member of its Security Council. The Russian Side made every effort to ensure the Council’s effective and result-oriented work. We will continue to work to ensure that the Council remains an effective tool for coordinating efforts to find collective responses to threats to international peace and security. #KievRegimeCrimes The Kiev neo-Nazi regime continues to attack civilian targets, terrorising the civilians in Russia. Over the past week, more than 70 Russian citizens suffered in artillery and drone strikes — 8 were killed and 63 injured, including 4 children. The brutal practice of deliberately targeting civilians by the Ukrainian neo-Nazis has been reported in all populated areas along the front line. #Estonia#Baltic#Vandalism Moscow is outraged by reports of yet another act of state vandalism in Estonia, this time against the memory of Soviet soldiers buried in the town of Loksa. In a profoundly disrespectful act, the remains of sailors from the destroyer Karl Marx and other Soviet soldiers who died fighting the Nazis between 1941 and 1945 have been exhumed using an excavator. Russia strongly condemns the immoral and criminal campaign being waged in Estonia to desecrate the remains of fallen anti-Nazi fighters. We reiterate that the destruction, damage, or desecration of war graves, even beyond Russia’s borders, is a criminal offence under the Criminal Code of the Russian Federation. #UNESCO On November 6 this year, the UNESCO General Conference, currently being held in Samarkand, elected the Organisation’s new Director-General – the renowned scholar and Egyptologist, former Egyptian Minister of Tourism and Antiquities, Khaled Ahmed El-Enany – for the term from 2025 to 2029. We welcome this decision. We are encouraged by the new Director-General’s pragmatic and constructive approach. #Cambodia#Thailand#ASEAN We welcome the signing of a joint declaration to settle the border conflict by Cambodia and Thailand at the ASEAN Summit in Kuala Lumpur on October 26. We remain confident that the arrangements arrived at with the assistance of Malaysia’s ASEAN Chairship will help overcome existing differences peacefully, establish a close bilateral dialogue, and ensure that the normalised situation will last long and remain durable. We believe many territorial disputes around the world are a legacy of Western colonial policy. Considering the worsening situation in the Asia-Pacific region, it is important to act in the spirit of unity and solidarity which is a hallmark of ASEAN.