Модуль 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
Scientists found a new drug, SW033291, that protects the brain’s blood barrier by blocking an enzyme called 15-PGDH. This stops brain damage and memory loss in mice with Alzheimer’s and brain injuries. Unlike other drugs, it does not remove amyloid protein but still keeps the brain safe and working well. The drug worked even when given a day after injury.🧠💊
[Source]
@googlefactss
#Alzheimers#BrainHealth#Memory#Science
lethonomia (n)
pronunciation: leh – tho – NO – mee – uh
language: English
definition: the inability to recall someone’s name
sentence: It’s very embarrassing to be stricken with acute lethonomia when I have to make introductions at a party. 🧠🗣️
[Source]
@googlefactss#Lethonomia#Memory#LanguageDisorders#BrainHealth#CommunicationChallenges
Learning another language may slow brain aging, according to a huge new study. Multilingual people show less cognitive decline compared to those who speak only one language. The study suggests that speaking multiple languages helps keep brain networks active, especially those responsible for memory and attention, protecting the brain from aging effects.
🧠🌍💬
[Read more]
@googlefactss
#BrainHealth#Multilingual#CognitiveScience#Learning#HealthyAging
Some studies found that watching a lot of (internet)pornography can change the brain. Brain scans showed stronger links in areas that control emotions and decisions. People who watch often feel more pleasure but have less self-control. After watching, their thinking and attention get worse. Their facial expressions also show less emotion, like surprise or disgust, even if they say they enjoyed it. These changes are similar to drug addiction. Repeating this behavior can make emotional responses dull and reduce mental sharpness.
More research is needed, but finding people who never watched porn for studies is very difficult to impossible..
🧠📉
[Read more1]
[Read more2]
[Read more3]
[How to stop watching]
@googlefactss
#BrainHealth#Addiction#Pornography#porn#MentalHealth#Neuroscience
👮♂🚫Warning: Even though this post and the following poll are sexual in nature. Rules still apply. Be respectful or face the consequences..