В фреймворке PyQt (и PySide тоже) часто встречается настройка чего-либо с помощью так называемых флагов.
widget.setWindowFlags(Qt.Window)
Взаимодействие нескольких флагов делается с помощью бинарных (или побитовых) операторов.
Несколько флагов можно указать с помощью оператора "|"
list_item.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled)
исключить флаг из уже имеющегося набора можно так
list_item.setFlags(list_item.flags() ^ Qt.ItemIsEnabled)
Добавить новый флаг к имеющимся можно так
list_item.setFlags(list_item.flags() | Qt.ItemIsEnabled)
А проверка наличия делается так
is_enabled = item.flags() & Qt.ItemIsEnabled > 0
Почему именно так? Всё дело в том как именно работают побитовые операторы. Но об этом в следующем посте.
#qt
goldendict-ng
下一代 GoldenDict。一款功能丰富的开源词典查找程序,支持多种词典格式和在线词典。
https://xiaoyifang.github.io/goldendict-ng/
https://forum.freemdict.com/
https://github.com/lrorpilla/jidoujisho
Japanese-Chinese dictionaries.
https://cloud.freemdict.com/index.php/s/pgKcDcbSDTCzXCs?path=%2FJAPANESE%2FJpn-Chi
recommend using that add-on for anki:
https://ankiweb.net/shared/info/1344485230
the complete guide of how to configure goldendict-ng for Japanese :
https://tatsumoto-ren.github.io/blog/setting-up-goldendict.html
create anki cards from anime
https://github.com/Ajatt-Tools/mpvacious
#dict
https://github.com/blissnd/easyxls
Convert any #spreadsheet into a Python internal #dict/#array data structure, for easy processing. Can also handle pivot tables.
For pivot table usage, header_row_start & header_col_start need to be set equal to the top left corner of the pivot table => header_row_start=8, header_col_start='c' in the included example.
Column IDs must always be lowercase chars in quotes, e.g. 'a'.
👑New Meme Contest
👑
💰Reward : 100 USDT For Top 10 People🤑
👑Contest Link : Meme Contest
⭐Steps to take Part
⭐ Follow @dict00
⭐ Like RT Quite this tweet+comments @ 3 friends
⭐ Add your #DICT meme to the comments below
⭐ Must join Telegram Channel
⭐ Send proof in Telegram group with retweet link
#MemeContest#100USDT#USDT#giveaway
🔔Note: Please do your own research (DYOR) before joining to any project.Don't send any fee or penny without doing own research
✈️Business:@ProjectPromoters✅
@lingvanexbot
Qué puede hacer este bot?
Este es un bot traductor de alta calidad basada en redes neuronales para más de 50 idiomas.
➕ Traducir cualquier texto o palabras
➕ Convertir texto a voz
➕ Dar definiciones para cualquier palabra
➕ Diccionario
➕ Buscar por ejemplos de traducciones
Idioma: Múltiple
(visto en @BotsGram_cu)
#linguistic, #translate, #define, #dictionary, #dict, #text2speech, #speech, #examples, #sentence, #words