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

Резултати

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

Пребарај: #spacedistances

当前筛选 #spacedistances清除筛选
Universe Mysteries 🪐

@cosmomyst · Post #646 · 28.01.2026 г., 22:21

🪐 The galaxy IC 1101 is one of the largest known galaxies in the universe, stretching about 6 million light-years across—nearly 60 times the diameter of the Milky Way. If you tried to cross IC 1101 at the speed of light, it would still take 6 million years, highlighting just how colossal the distances between and within galaxies can be in the cosmos. ✨ #spacedistances⚡#galaxies⚡#universe⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #630 · 21.01.2026 г., 12:21

🪐 The Sombrero Galaxy (Messier 104), located about 31 million light-years away in the constellation Virgo, stretches 50,000 light-years across—nearly half the diameter of our Milky Way. Even the fastest spacecraft ever built would need millions of years to traverse a single galaxy like Sombrero, showing how cosmic distances turn entire galaxies into vast, seemingly unreachable islands amid the universe’s dark ocean. ✨ #spacedistances⚡#galaxies⚡#universe⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #333 · 26.09.2025 г., 18:21

🪐 The James Webb Space Telescope has identified a galaxy named JADES-GS-z13-0, whose light began its journey over 13.4 billion years ago—only about 320 million years after the Big Bang. Observing JADES-GS-z13-0 helps astronomers peer back to the universe’s infancy, revealing what the very first galaxies were like just after cosmic dawn. ✨ #spacedistances⚡#galaxies⚡#universe⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #594 · 01.01.2026 г., 12:21

🪐 The radial size of our Milky Way Galaxy is about 52,850 light-years from its center to edge, but the spiral arms themselves can be thousands of light-years wide—wider than the distance between our Sun and the Andromeda Galaxy. To cross this enormous span at the speed of the fastest human-made object, Voyager 1, would take over a billion years, demonstrating just how mind-bogglingly vast even our own galaxy truly is. ✨ #spacedistances⚡#milkyway⚡#galaxy⚡#nasa⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #301 · 20.09.2025 г., 12:21

🪐 The Milky Way galaxy itself is so vast that it spans about 100,000 light-years from edge to edge—a light-year is the distance light travels in a year, roughly 9.46 trillion kilometers. If you could shrink our solar system down to the size of a coin, the Milky Way would be as wide as North America, revealing just how immense the distances are even within a single galaxy. ✨ #spacedistances⚡#milkyway⚡#astronomy⚡#nasa⚡#galaxy⚡#stars⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #206 · 01.09.2025 г., 16:11

🪐 The distance from Earth to Proxima Centauri, the closest known star beyond our Sun, is about 4.24 light-years—a distance so vast that if you traveled as fast as New Horizons (the fastest spacecraft launched from Earth), it would take over 78,000 years to get there. Even within our own solar system, Neptune is so far from the Sun—about 4.5 billion kilometers—that sunlight takes over four hours to reach it, showing how truly immense the spaces between cosmic objects really are. ✨ #spacedistances⚡#stars⚡#solarystem⚡#nasa⚡#galaxy⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #473 · 02.11.2025 г., 12:21

🪐 The distance from Earth to the Sun, known as an astronomical unit (AU), is about 149.6 million kilometers—and it serves as a standard ruler for measuring space distances within our solar system. For example, Jupiter is about 5.2 AU from the Sun, which means it orbits nearly 780 million kilometers away, showing how even our neighboring planets are separated by unimaginable expanses. ✨ #spacedistances⚡#solarorbit⚡#astronomy⚡#nasa⚡#galaxy⚡#stars⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #348 · 29.09.2025 г., 18:21

🪐 The nearest bright star in our night sky, Sirius, is about 8.6 light-years from Earth—meaning the light you see from it tonight actually left the star nearly a decade ago. Even within our own galaxy, these incredible distances show that starlight is a message from the past, traveling billions of kilometers before reaching our eyes. ✨ #spacedistances⚡#sirius⚡#astronomy⚡#nasa⚡#galaxy⚡#stars⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #702 · 05.03.2026 г., 22:21

🪐 Light from the galaxy NGC 4992, located nearly 150 million light-years away in Leo, takes so long to reach us that we observe it as it was when dinosaurs still roamed Earth. Even within our own Milky Way, stars like V404 Cygni are thousands of light-years away, meaning every twinkle in the night sky is a peek deep into the past—a testament to the truly immense distances that fill the universe. ✨ #spacedistances⚡#lightyears⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #368 · 03.10.2025 г., 18:21

🪐 The distance from Earth to the Virgo Cluster, a giant grouping of galaxies, is about 55 million light-years—meaning the light we see from its member galaxies, like Messier 87, began its journey long before the first dinosaurs appeared on our planet. Even within the Virgo Cluster, galaxies can be separated by hundreds of thousands of light-years, showing that cosmic neighborhoods are staggeringly vast compared to our entire solar system. ✨ #spacedistances⚡#galaxies⚡#virgo⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #315 · 22.09.2025 г., 22:21

🪐 The nearest galaxy to our Milky Way, the Large Magellanic Cloud, is about 163,000 light-years away—which means its light takes 163,000 years to reach us. Even though this galaxy sits relatively close on a cosmic scale, traveling that distance with today’s fastest spacecraft would still take millions of years, revealing just how vast even our local corner of the universe truly is. ✨ #spacedistances⚡#galaxies⚡#lightyears⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #400 · 09.10.2025 г., 22:21

🪐 The distance between Earth and the edge of the observable universe is about 46.5 billion light-years—meaning the furthest galaxies seen by the Hubble Space Telescope, like GN-z11, are so distant that their light has taken over 13 billion years to reach us, yet the universe has expanded even farther in that time. This immense scale exists because space itself stretches as light travels, making cosmic distances far greater than the simple time since the Big Bang would suggest. ✨ #spacedistances⚡#cosmology⚡#hubble⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

ПретходнаСтраница 1 од 3Следна