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

Резултати

Пронајдени 10 слични објави

Пребарај: #distance

当前筛选 #distance清除筛选
Amazing Geography 🌍

@amazingeo · Post #42 · 13.08.2025 г., 16:12

🌍 The world's longest straight-line journey between two points using only latitude and longitude runs over 13,589 km from Liberia on Africa’s coast to eastern China, crossing no ocean. ✨ #coordinates⚡#distance⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍

Universe Mysteries 🪐

@cosmomyst · Post #510 · 20.11.2025 г., 22:21

🪐 The galaxy JADES-GS-z14-0, discovered in 2023 with the James Webb Space Telescope, is one of the farthest objects ever seen—its light has traveled for about 13.5 billion years to reach Earth. Observing JADES-GS-z14-0 lets astronomers look back to when the universe was less than 300 million years old, offering a rare glimpse into the early stages of galaxy formation just after the Big Bang. ✨ #galaxies⚡#distance⚡#universe⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #474 · 02.11.2025 г., 22:21

🪐 The James Webb Space Telescope has spotted galaxy JD1 (also known as MACS0647-JD1), whose light began its journey over 13.3 billion years ago—when the universe was only about 4% of its current age. Observing JD1 allows scientists to study what galaxies looked like close to the cosmic dawn, revealing the structure of the universe in its earliest moments. ✨ #galaxies⚡#distance⚡#universe⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #446 · 19.10.2025 г., 12:21

🪐 The galaxy CEERS-93316, discovered by the James Webb Space Telescope, is one of the most distant galaxies ever observed—its light began traveling toward us more than 13.4 billion years ago. Seeing CEERS-93316 means we are looking back in time to when the universe was less than 300 million years old, just a tiny fraction of its current age, revealing the earliest stages of galaxy formation after the Big Bang. ✨ #galaxies⚡#distance⚡#universe⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #409 · 11.10.2025 г., 20:21

🪐 The galaxy named Earendel’s host, WHL0137-LS, contains the most distant single star ever detected—a star nicknamed Earendel whose light has taken about 12.9 billion years to reach Earth. Thanks to a powerful gravitational lens (a natural "magnifying glass" formed by another galaxy cluster), the Hubble Space Telescope was able to spot Earendel, offering a rare view of a lone star shining when the universe was less than a billion years old. ✨ #universe⚡#distance⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #378 · 05.10.2025 г., 18:21

🪐 The galaxy ZF-COSMOS-20115, located more than 12 billion light-years from Earth, surprised astronomers by being "dead"—no longer forming new stars—when the universe was just 1.7 billion years old. Studying such distant, quenched galaxies helps scientists understand how some of the earliest cosmic structures formed and evolved in the young universe, illuminating the extreme environments at the farthest reaches of space and time. ✨ #galaxies⚡#distance⚡#universe⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #278 · 16.09.2025 г., 00:11

🪐 The galaxy Maisie’s Galaxy (CEERS-93316), discovered by the James Webb Space Telescope, is one of the most distant objects ever observed, with its light traveling for about 13.4 billion years to reach Earth. We're seeing Maisie’s Galaxy as it existed just a few hundred million years after the Big Bang, providing a rare glimpse into the universe's earliest moments when the first galaxies were assembling and stars began to shine. ✨ #universe⚡#distance⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Amazing Geography 🌍

@amazingeo · Post #408 · 23.10.2025 г., 18:31

🌍 The world’s longest scheduled nonstop passenger flight connects New York and Singapore, covering about 15,300 kilometers in nearly 19 hours—highlighting advances in global air transport geography. ✨ #aviation⚡#distance⚡#networks⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #230 · 06.09.2025 г., 03:11

🪐 The galaxy HD1, discovered in 2022, may be the most distant known object in the universe—its light has traveled more than 13.5 billion years to reach us. Observing HD1 gives astronomers a rare window into the universe just 300 million years after the Big Bang, offering clues to how the earliest galaxies and stars began to form in the cosmic dawn. ✨ #galaxies⚡#distance⚡#earlyuniverse⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #560 · 15.12.2025 г., 22:21

🪐 The James Webb Space Telescope has observed the galaxy JADES-GS-z7-01-QU, one of the most distant “quiescent” galaxies ever found, meaning it has stopped making new stars even though its light began traveling to us over 13 billion years ago. Seeing JADES-GS-z7-01-QU lets scientists study how some galaxies aged and shut down astonishingly early, offering a rare glimpse into the universe’s remote past when cosmic structures were just beginning to take shape. ✨ #galaxies⚡#distance⚡#telescopes⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​