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

Пребарај: #thisiswhatarealmuseumlookslike

当前筛选 #thisiswhatarealmuseumlookslike清除筛选
Beyond Moscow

@beyondmoscow · Post #360 · 20.07.2025 г., 11:27

This is the rib of a bowhead whale. The skull of a polar bear. A narwhal’s tusk. A nest of an eider duck — complete with an egg from which a chick once hatched. All of them real. All of them 2,000 to 5,000 years old. All of them from the Arctic islands of Franz Josef Land. And just imagine — they sit millimeters from your eyes. Where else can you examine whale baleen or every tiny crack in the fearsome tusks of a walrus? Not even in the wild is that possible. That’s why I made my way to 📌the Arctic Embassy in #Arkhangelsk — which normally doesn’t open on weekends, but thanks to the wonderful staffer Elena, it opened just for me. This is the main visitor center of the “Russian Arctic” National Park — the northernmost specially protected nature reserve in Russia. It includes the archipelagos of Novaya Zemlya and Franz Josef Land, and the Embassy houses remarkable finds from both. It’s a genuinely one-of-a-kind #thisiswhatarealmuseumlookslike — focused entirely on one region. Here, you can see corals and volcanic rocks aged 200 to 500 million years, collected from islands in the Arctic Ocean, and trace the gripping history of their exploration. Chills run down your spine when you see fragments of a 16th-century Barents expedition boat, old chess pieces, coffee beans, skis, crates of canned food, and handwritten journals from explorers and scientists from the USSR, Norway, Scotland, and the U.S. And just like them, you feel an unstoppable urge to see the Russian Arctic with your own eyes — no matter how high the price. 🏙️Beyond Moscow🏔️