Модуль 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
Stract is an open source search engine where the user has the ability to see exactly what is going on and customize almost everything about their search results. It's a search engine made for hackers and tinkerers just like ourselves. No more searches where some of the terms in the query arent used, and the engine tries to guess what you really meant. You get what you search for.
https://stract.com
https://github.com/StractOrg/stract
#Web#Search#SearchEngine
#FLOSS
SimpleX Chat: private and secure cross platform messenger without any user IDs (not even random)
:~ E2E-encrypted messages with markdown and editing
:~ E2E-encrypted images and files
:~ Decentralized secret groups — only users know they exist
:~ E2E-encrypted voice messages
:~ Disappearing messages
:~ E2E-encrypted audio and video calls
:~ Portable encrypted database — move your profile to another device
:~Incognito mode —
unique to SimpleX Chat
Website : https://simplex.chat/
SimpleX Chat (SimpleX Chat - e2e encrypted messenger without any user IDs - private by design!)
https://f-droid.org/packages/chat.simplex.app/
Quick start – https://simplex.chat/docs/guide/readme.html
#SimpleXchat#security#privacy#encryption#E2EE
#FLOSS
NAPS2 - Scan #documents to PDF and more – https://www.naps2.com/
NAPS2 is free and open source scanning software for Windows, Mac and Linux.
Easily scan with devices from Canon, Brother, HP, Epson, Fujitsu, and more. Then save to #PDF, #TIFF, #JPEG, or #PNG with a single click.
#Scan#Floss
#cplusplus#apple_silicon#bsd#c_plus_plus#cmake#floss#game#gplv2#json#linux#lua#macos_app#python#strategy#windows
Widelands is a free, open-source real-time strategy game like Settlers II, where you lead a small clan to build roads, gather resources like wood and gold, manage four unique tribes, trade, or fight in single-player campaigns and multiplayer. Download it easily for Windows, Mac, or Linux, or compile from source with simple scripts and tools like CMake on various systems. This lets you enjoy deep, replayable empire-building fun at no cost, anytime with friends or AI.
https://github.com/widelands/widelands