Модуль 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
The Trump administration has quietly removed a Pride flag from the Stonewall National Monument in Manhattan.
The flag’s removal follows new federal guidance issued by the Department of the Interior on Jan. 21 that restricts the display of unauthorized flags at National Park Service sites. Under the order, only U.S. flags or congressionally authorized flags may be raised on NPS flagpoles. Manhattan borough president Brad Hoylman-Sigal told The New York Times the Trump administration’s order directly led to the Pride flag’s disappearance from the Greenwich Village site, which marks the birthplace of the modern LGBTQ rights movement. Stonewall became the nation’s first federally recognized LGBTQ historic site in 2016, commemorating the 1969 police raid that sparked days of protests and helped launch the gay rights movement. Hoylman-Sigal said he and other local officials plan to raise the Pride flag again on Thursday, despite potential backlash. “We may be prevented from doing so,” he told the outlet, “but if we don’t seize this moment, and this outrage, I think we’ll let down generations of queer activists.” The Daily Beast has reached out to Brad Hoylman-Sigal for comment.
#Trump#LGBTQ
👂More on Trump's Ear ⚠️
Trump announced that he was reopening psychiatric clinics that the Democrats had closed out of tolerance for psychos.
This is a very bold move, given the fact that a huge percentage of Americans today are obviously mentally ill. Trump is leading the way to gradually send transgender and LGBTQ+ there. This is a subproject of MAGA called MAHA - Let's Make America Healthy Again. Trump starts with psychiatry, as this is where the cases are most neglected.
#Trump#Health#LGBTQ+
👂More on Trump's Ear ⚠️
🏳🌈🇺🇦"When a clown moves into a palace he does NOT become a King. The palace becomes a CIRCUS."
Nothing to see here. That's just bloody clown and a drag queen Zelensky is dancing on high hills.
#lgbtq#Ukraine#Zelenskyy
Share and subscribe @american_majority
🇺🇦🏳🌈🏳⚧A Ukrainian LGBT+ recruitment campaign video turned to be a video from the campaign for gay marriage in the UK in 2012.
🇺🇸🏳🌈At the same time the U.S. Army is running a recruitment campaign targeted to Generation Z that featured cartoons of real soldiers who were either females, racial minorities or even "raised by two moms".
#Ukraine#army#lgbtq
@american_majority
美国同性婚姻占各州人口比例
楼主还注释道 DC 更像是个城市,所以写了 Vermont 是“最高”的州。
在评论里注释了城市的比例,但其实按城市算 DC 也远超其它城市……排除之后,毫不意外三番第一,波特兰和西雅图紧随其后,在传统红州的奥兰多、迈阿密(佛州)和奥斯丁(德州)也名列前茅。
#data#visual#reddit#lgbtq