Модуль 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
I sprayed her butt just a little with hand sanitizer because she keeps on biting wires on the desk.. I swear just a little 🥺 & she slowly sit there, lying down, with her eyes looking at me for a while until slowly falls asleep 🥺 she stopped biting the wires but I feel bad 🥺 Is she sad? or just tired? 🥺
#random#Henoa
@quietworld🍃
Today, a thought strucked me;
I love looking at cats especially high breed cat but I never wanted to buy and take care of high breed cat because I'm scared that I'm not able to take good care of it since high breed requires high maintenance.. So, I only wanted to take care of village cat, but then, I treat the village cat like high breed cat 😂
So.. why was I scared to adopt/buy high breed cat, right? I treat my village cat like royal anyway 😂
* currently waiting for my kitten to come back from home-based grooming service (waiting anxiously) *
I hope she comes back here safe 🥺😢
#thoughts#cat#Henoa
@quietworld🍃
Yeyy she's finally back from grooming 😍 Her nails clipped, ears cleaned and she smells good ☺❤ I'll get no more scars because her habit of climbing me 🤣 for now.. until her nails grow long and sharp again 🤣
Worth the wait..
from 12:30PM until 03:40PM🥰
#cat#Henoa#chupdate
@quietworld🍃
Shopping for Henoa le Kitten again! 😍
Unplanned but I found item that I didn't know exist before that I think Henoa & I needs and I read lots of reviews saying that this shop sells a lot cheaper than other stores so why not? 😂
Will be making a video of unboxing these + review once they arrived and tested 🥰💞
Stay tuned for this video upload in my channel 🥰
#marcegetaway#youtube#kitten#Henoa
@quietworld🍃
New video uploaded! 😍
p/s: not the video I mentioned in my sneak peek post recently, that is still in the making😉
#adoptingastraykittenjourney#adoptdontshop#Henoa#kitten#youtube#chupdate
@quietworld🌻
New video uploaded! 😍
p/s: not the video I mentioned in my sneak peek post recently, that is still in the making😉
#shopee#haul#Henoa#kitten#youtube#chupdate
@quietworld🌻