sirius-fan / FastWordQuery

A fork of the FastWordQuery. Query words definitions or examples etc. from local or web dictionaries to fill into Anki cards.
GNU General Public License v3.0
74 stars 14 forks source link

anki freezes when selecting dictionaries #17

Open KonstantinDjairo opened 11 months ago

KonstantinDjairo commented 11 months ago

Env.:

Describe the bug anki freezes entirely, when i try to select the dictionary folder the log says:

Qt warning: QLayout::addChildLayout: layout QGridLayout "" already has a parent

furthermore, anki freezes even when you just click in the add-on button itself

Expected behavior it should let me select the dictionary folder without freezing

sirius-fan commented 11 months ago

After adding the dictionary, the dictionary will be indexed immediately and the db file will be generated. This process occupies the GUI thread. If the dictionary file is large, it will cause the UI to freeze.

In fact, this does not affect the final use, you can just wait or force exit.

I will try to separate the thread later, but it will not be solved quickly. I am not familiar with the code of the mdx dictionary part, and the calling method of this part of the code are also weird.

KonstantinDjairo commented 11 months ago

i see, it'd be nice to have a bar indicating the progress of the import process, or a warning telling the uset that something is being processed