Модуль 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
Time to yourself🧘♀️
Indulge in a 45-minute grounding meditation, harmonising your being and cultivating a deep sense of peace and renewal within.
🗓️ Tomorrow, May 14
🕖 7 am - 7.50am
📍Seminyak, at Sunset Park Pool Bar, Level 4, Potato Head Studios
Bookings via the link.
@BaliNews
#wheretogo#Seminyak
🤠Annual Cinco De Mayo party at Motel Mexicola
🪩 Today from 6pm till the late night you can try to win IDR 10 million in Reggaeton Dancing Competition.
🍸 DJs, dancers and good vibes are expected in Seminyak tonight.
@BaliNews
#Seminyak#wheretogo
🤕Two foreigners beat up the Pechalangs at a villa in Seminyak
Kuta police have detained two US citizens, 26-year-old Aabed Attia and his older brother 30-year-old Zeyad Ahmed Attia. According to law enforcers, the Americans beat up two pechalangs (local vigilantes) at a rented villa in Seminyak after being reprimanded over loud music. The foreigners are now in a detention center, awaiting trial.
@BaliNews
#accidents#Kuta#Seminyak
😱 А very impressive python crawled onto Seminyak beach for a rest yesterday
🐍 It was not allowed to rest, though – despite its status as a public beach, the snake was politely but firmly asked to leave.
@BaliNews
#places#incidents#Seminyak
🏚Fire destroys 19 villas in Seminyak
📰 Detikbali reports the the blaze broke out overnight on Kayu Aya Street in the Amasya villa complex. The fight against the fire continued into the morning. The flames were so big that they were seen even from airplanes arriving in Bali.
🎍 Apparently, the reason is that the complex is mostly built in eco-style, a lot of materials such as bamboo and straw were used in the decoration and construction, and they are known to burn well.
💸 Damage from the fire is estimated at 12 billion rupees.
👮♂️ Ketut Sukadi, a spokesman for Denpasar police's public relations department, said:
“The fire first appeared on the second floor of villa 9 of The Amasya Villas complex, then spread to villa 12. A total of 19 villas out of 20 were burned in the fire, only villa 5 was not burned.”
There are no official reports on the cause of the fire or other details yet, authorities are still investigating the incident.
@BaliNews
#accidents#Seminyak#Denpasar