Модуль Qt․py это не просто текстовый модуль, его компоненты генерируются на лету в зависимости от ситуации.
Поэтому ваша любимая IDE не сможет качественно сообразить автокомплиты под этот модуль.
Решение здесь более чем очевидно, надо сделать stubs-файлы. Это файлы с расширением .pyi, описывающие содержимое модуля но не имеющие рабочего кода.
Ну что, готовы потратить пару месяцев своей жизни чтобы описать все классы Qt и их методы? 😭
Расслабьтесь, за вас это уже сделали добрые люди.
Спасибо Fredrik Averpil !
Качаем здесь ⬇️
https://github.com/fredrikaverpil/Qt.py/tree/stubs/stubs/Qt
Не думаю что стоит устанавливать Qt․py из этого репозитория. Он там не обновляется. Так что забираем только файлы .pyi.
За актуальность этих файлов тоже не ручаюсь, но большинство методов там имеются.
Установка:
🔸 Вариант 1:
- находим куда установлен сам модуль Qt․py, это будет одинокий файл который так и называется Qt․py
- кидаем директорию рядом с ним (если есть доступ на запись). Должно получиться так:
📁 site-packages\
📄 Qt.py
📁 Qt\
...
🔸 Вариант 2
- копируем директорию Qt куда угодно
- пробиваем путь к ней в настройках энвайронмента в переменную PATH так, чтобы путь был ДО директории Qt.
Закинуть можно и в свою домашнюю директорию. Если скопируете сюда:
~/stubs/Qt
То переменную пишем так
export PATH=~/stubs:${PATH}
После этого IDE должна распарсить stubs-файлы и автокомплиты появятся 😎
#qt#libs#tricks
🌎 In ancient Chavín culture of Peru, intricate stone “pututu” conch trumpets echoed across ceremonial plazas. These natural shell horns carried sound up to a kilometer, uniting crowds during old rituals and feasts with their deep, haunting music. ✨
#history⚡#sound⚡#archaeology
👉subscribe Interesting Planet
🌎 The "Bloop" is one of the loudest underwater sounds ever recorded. Detected by NOAA hydrophones in 1997, this low-frequency noise was picked up over 5,000 kilometers apart. Scientists later identified melting icebergs as the likely source, not a sea creature or submarine volcano. ✨
#ocean⚡#sound⚡#mysteries
👉subscribe Interesting Planet
👉more Channels
🌎 Mysterious low-frequency sounds known as "The Upsweep" have been picked up by underwater microphones in the Pacific Ocean since 1991. This persistent sound rises and falls in pitch, lasts several seconds, and is strongest in spring and autumn. Its source remains unidentified, but some researchers suggest volcanic activity near the origin point may be involved. ✨
#ocean⚡#mysteries⚡#sound
👉subscribe Interesting Planet
👉more Channels
#sound
#неКуКураж_круче
#КультМедиа
Профессиональная команда дикторов возьмётся за озвучку любого ролика.
Каз/Рус/Муж/Жен.
От литературных текстов до делового стиля, портфолио предоставим.
Опыт озвучки: аудиокниги, анонсы телеканалов, имиджевые ролики крупных компаний и городов и проч.
wa/tg: +7 777 240 22 42
t.me/cult_media
🌎 The “singing” sands of select deserts produce eerie musical tones when walked on or disturbed. This haunting sound comes from millions of perfectly sized sand grains rubbing together and vibrating in harmony—nature’s own desert orchestra! ✨
#geology⚡#sound⚡#phenomenon
👉subscribe Interesting Planet
🌎 Strange cosmic "whistlers" recorded by satellites are caused by lightning on Earth. These radio signals travel along Earth's magnetic field, bounce off space, and return as high-pitched, descending tones—lasting less than a second. Some whistlers have been traced over thousands of kilometers from their original lightning strike. ✨
#space⚡#sound⚡#lightning
👉subscribe Interesting Planet
👉more Channels
🌎 Earth’s Schumann resonances are a set of naturally occurring, low-frequency electromagnetic waves circling the globe between the ground and the ionosphere. These “global hums” are mainly generated by lightning and pulse mostly at 7.83 Hz, serving as a natural radio background measured by scientists worldwide. ✨
#space⚡#sound⚡#atmosphere
👉subscribe Interesting Planet
👉more Channels
🌎 Some of the loudest natural sounds ever recorded in the ocean come from snapping shrimp, which use their oversized claw to shoot a high-speed bubble. When the bubble collapses, it creates a sound reaching 210 decibels—louder than a gunshot—and can stun small prey nearby. ✨
#ocean⚡#animal⚡#sound
👉subscribe Interesting Planet
👉more Channels
🌎 Jupiter’s magnetosphere produces “chorus” radio waves—sounds like twinkling or whistling—detected by NASA spacecraft. These signals are created by energetic electrons moving along the planet’s powerful magnetic field. The Juno probe recorded these plasma waves in 2016. ✨
#Jupiter⚡#space⚡#sound
👉subscribe Interesting Planet
👉more Channels
🌎 The Voyager 1 spacecraft captured “plasma wave” sounds as it entered interstellar space in 2012. These sounds are actually electromagnetic vibrations in space, converted into audio by NASA scientists. The pitch and intensity help scientists measure the density of charged particles beyond our Solar System. ✨
#Voyager⚡#space⚡#sound
👉subscribe Interesting Planet
👉more Channels