Модуль 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
⚠️ We’ve been silent since September 9 on X (twitter) after our account was hacked, but we’ve just recovered it. This came as Venezuela faces new imperialist threats, while VA continues countering mainstream media lies.
👉 Stay tuned for lots of new content: x.com/venanalysis
#Venezuelanalysis
⚠️ Our X (Twitter) account @venanalysis has been hacked, just as US military threats against Venezuela intensify and mainstream media joins the chorus.
We’re working to recover it.
👉 Stay tuned here for updates.
#Venezuelanalysis
Venezuelanalysis is an independent outlet, free from corporate and political backers. Our mission to report on Venezuelan grassroots struggles is unwavering, but we need your support!
📍Make a one-time donation or subscribe to help us reach our goal here: https://venezuelanalysis.com/donate/
#Venezuelanalysis#IndependentJournalism#IndependentMedia#Fundraising
Oppose Trump’s War, Support Venezuelanalysis!
For over 20 years, we’ve stood with the Venezuelan people in their struggle for sovereignty. We’ve exposed US-backed aggression, documented grassroots resistance, and challenged dishonest media narratives.
Every contribution keeps this work alive. Click here to donate 👉https://venezuelanalysis.com/donate/
#Venezuelanalysis#Fundraising2025#IndependentMedia#Venezuela#SupportIndependentMedia
Fundraising 2025! 💪
We launch our yearly fundraising at a moment that feels more critical than ever. With Trump openly threatening to attack Venezuela and the corporate media beating the war drums, independent media must fight back.
For years, Venezuelanalysis has reported from the ground with accuracy and integrity; from documenting popular power to exposing dishonest narratives around sanctions. Today, our task is clear: counter war propaganda and defend peace and Venezuelan sovereignty.
Our work is 100% supported by readers and followers. That’s what keeps us independent. If you value this project, please consider making a donation or becoming a subscriber. Every contribution strengthens our ability to continue reporting in this historic moment.
Click here to donate 👉https://venezuelanalysis.com/donate/
#Venezuelanalysis#Fundraising2025#IndependentMedia#Venezuela#SupportIndependentMedia
🎥 VIDEO | Venezuela's Workers: Bonuses, Frozen Wages, and a Labor Law Under Threat
Venezuela’s minimum wage remains frozen while worker income is increasingly tied to discretionary bonuses. At the same time, proposed changes to the country’s landmark labor law are raising alarm among labor organizations.
Are workers’ rights being quietly dismantled?
Watch the video to learn more: https://youtu.be/rJJLUiLj2NQ
#Venezuela#WorkersRights#LaborLaw#WorkingClass#Venezuelanalysis