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

Резултати

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

Пребарај: #speedoflight

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

@cosmomyst · Post #578 · 24.12.2025 г., 22:21

🪐 Light speed is so fundamental in the universe that even the most energetic jets from black holes, like those in the galaxy Pictor A, can only approach—but never reach—its ultimate limit of 299,792 kilometers per second. These jets stretch across hundreds of thousands of light-years, yet nothing with mass can break the cosmic speed barrier set by the laws of physics, making the speed of light the universe’s absolute fastest messenger. ✨ #speedoflight⚡#blackholes⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #497 · 14.11.2025 г., 12:21

🪐 The galaxy IC 1613, a faint dwarf galaxy in the constellation Cetus, allows astronomers to measure the speed of light by timing how long it takes for changes in certain stars' brightness (called Cepheid variables) to reach Earth. Because the distance to IC 1613 is well known—about 2.4 million light-years—these observations help scientists confirm that light travels at the same universal speed of 299,792 kilometers per second, even across vast reaches of space. ✨ #speedoflight⚡#IC1613⚡#space⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #709 · 12.03.2026 г., 22:21

🪐 Astronomers have confirmed that even the most distant light we see from galaxies like GN-z11—whose glow began its journey over 13.4 billion years ago—travels at exactly the same constant speed of 299,792 kilometers per second as light here on Earth. This unchanging speed of light lets scientists measure cosmic time and distance across the universe, meaning every photon from GN-z11 carries a record of its unimaginably long trip through space and the early history of everything we see. ✨ #speedoflight⚡#galaxies⚡#distances⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #532 · 01.12.2025 г., 22:21

🪐 In 1676, Danish astronomer Ole Rømer measured the speed of light for the first time using the moons of Jupiter, such as Io, as "cosmic clocks." By observing how Io's eclipses appeared later when Earth was farther from Jupiter, he calculated that light does not travel instantly, revealing that even across our solar system, the speed of light puts a real limit on how quickly information can move. ✨ #speedoflight⚡#history⚡#jupiter⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #692 · 22.02.2026 г., 12:21

🪐 The speed of light acts as the ultimate speed limit in our universe—no information or object can travel faster than 299,792 kilometers per second, not even the most powerful pulses from the Crab Pulsar in the heart of the Crab Nebula. This constant speed is what lets astronomers measure vast cosmic distances, and it’s the reason we see stars, galaxies, and even supernova explosions like SN 1987A as they were in the past, not as they are right now. ✨ #speedoflight⚡#spacetime⚡#distances⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #662 · 05.02.2026 г., 22:21

🪐 In the double star system Alpha Centauri, light from one star to the other takes over 20 hours to cross the distance—showing that even within a “nearby” solar system, the speed of light sets a hard limit for communication and travel. This demonstrates how vast even the smallest cosmic neighborhoods really are, as light’s top speed of 299,792 kilometers per second still can't make interstellar distances feel quick. ✨ #speedoflight⚡#alphacentauri⚡#spacedistances⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #225 · 05.09.2025 г., 03:11

🪐 In the vacuum of space, the speed of light is an incredible 299,792 kilometers per second—so fast that a beam from the Sun takes just over eight minutes to reach Earth, even though the distance is about 150 million kilometers. When astronomers observe events like a supernova in the galaxy NGC 2525, they're actually seeing what happened years, decades, or even millions of years ago, because the light takes that long to cross vast cosmic distances. ✨ #speedoflight⚡#space⚡#distances⚡#supernova⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #294 · 19.09.2025 г., 00:11

🪐 Light from the Andromeda Galaxy, our closest spiral galaxy neighbor, takes about 2.5 million years to reach Earth, traveling at the speed of light—299,792 kilometers per second. So every time we look at Andromeda in the night sky, we're seeing it as it was millions of years ago, witnessing true cosmic time travel with our own eyes. ✨ #speedoflight⚡#andromeda⚡#spacedistances⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #553 · 12.12.2025 г., 12:21

🪐 When astronomers observe a star like Betelgeuse in the constellation Orion, the light reaching Earth has traveled 642 years—limited by the constant speed of light, which is 299,792 kilometers per second. This means we never see stars as they are now, but as they were centuries or even millennia ago, so every starlit night is filled with messages from the deep past of our universe. ✨ #speedoflight⚡#betelgeuse⚡#spacedistances⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #743 · 16.04.2026 г., 22:21

🪐 Astronomers used an exploding star, supernova SN 1987A in the Large Magellanic Cloud (about 168,000 light-years away), to precisely measure the speed of light across vast space. Light and ghostly particles called neutrinos from the explosion reached Earth just hours apart, providing real proof that even over intergalactic distances, light always travels at the same constant speed—299,792 kilometers per second. ✨ #speedoflight⚡#supernova⚡#LargeMagellanicCloud⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #615 · 11.01.2026 г., 12:21

🪐 In the galaxy Messier 87, located about 55 million light-years from Earth, the speed of light helps astronomers study powerful jets that erupt from its supermassive black hole. Light from these jets takes millions of years to cross the vast gulf to Earth, allowing scientists to observe how particles accelerated close to light speed behave over incredible distances and time, giving a glimpse into the dynamics of some of the universe’s most energetic events. ✨ #speedoflight⚡#messier87⚡#blackhole⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #369 · 03.10.2025 г., 20:21

🪐 The speed of light—299,792 kilometers per second—is an unbreakable cosmic speed limit, and even within our own Milky Way Galaxy, light takes about 27,000 years to travel from the supermassive black hole Sagittarius A* at the center to reach Earth. This vast timespan means that every glimpse we catch of events near Sagittarius A* shows us history already tens of thousands of years old, making each photon a snapshot from the deep past. ✨ #speedoflight⚡#milkyway⚡#saggittariusA⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

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