Модуль 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
🌎 Ancient lake beds called "playa lakes" preserve natural records of Earth's past. Layers of sediment in these basins capture pollen, plant remains, and even insect fossils, revealing climate cycles and environmental shifts over thousands of years. Some dry lakebeds in the U.S. Southwest show records going back 120,000 years. ✨
#geology⚡#paleoclimate⚡#lakes
👉subscribe Interesting Planet
👉more Channels
🌍 Canada has more lakes than any other country, and many are so large they contain whole islands with their own lakes—making some islands-in-a-lake-on-an-island truly unique on Earth. ✨
#islands⚡#archipelago⚡#lakes⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🌍 Africa’s Lake Victoria is the largest tropical lake in the world. Its outflow forms the start of the Nile River, which journeys over 6,600 kilometers north to the Mediterranean Sea. ✨
#lakes⚡#rivers⚡#Africa⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌎 The salt-loving halophiles of California’s pink Lake Hillier thrive where few others survive. These tiny microbes give the lake its vivid color by producing pigments that protect them from extreme salt and sunlight—turning the water a bubblegum pink! ✨
#microbes⚡#pigment⚡#lakes
👉subscribe Interesting Planet
🌍 Russia’s Lake Karachay is so contaminated from past nuclear waste that standing on its shore for just an hour could be fatal—one of the most polluted lakes on the planet. ✨
#rivers⚡#lakes⚡#pollution⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 Some lake water can take hundreds of years to fully circulate from the surface to the deepest layers and back again, creating slow, hidden water cycles that influence local climates and ecosystems. ✨
#hydrology⚡#lakes⚡#cycles⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 Some of the world’s oldest lakes, like Lake Ohrid in Europe, have existed for more than one million years, preserving unique species found nowhere else on Earth. ✨
#lakes⚡#biodiversity⚡#longevity⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 Siberia’s Lake Baikal freezes in winter, forming ice so clear that cracks and bubbles can be seen meters deep. In spring, melting ice creates musical sounds as it shifts and breaks apart. ✨
#lakes⚡#rivers⚡#Siberia⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 Lake Titicaca, perched almost 3,812 meters above sea level, is the world’s highest navigable lake by large boats. Its clear waters straddle the border between Peru and Bolivia in the Andes. ✨
#lakes⚡#Andes⚡#altitude⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🌍 In Africa’s Lake Natron, minerals in the water turn it bright red during the dry season. The lake’s extreme chemistry preserves animal remains, creating eerie natural “statues.” ✨
#lakes⚡#Africa⚡#chemistry⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 The world’s clearest lake is Blue Lake in New Zealand. Its pure water is so transparent that objects can be seen up to 80 meters below the surface—almost like looking through glass. ✨
#lakes⚡#water⚡#clarity⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 Finland boasts about 188,000 lakes, earning it the nickname "Land of a Thousand Lakes." Many of these lakes were formed by retreating glaciers at the end of the last Ice Age. ✨
#lakes⚡#glaciation⚡#Finland⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels