# 【历史讨论】GoldenDict-ng 基于Qt5.15.2/Qt6.X版本

**URL:** <https://forum.freemdict.com/t/topic/11495>\
**Category:** GoldenDict-ng\
**Tags:** goldendict\
**Created:** [2022 年3 月 14 日 13:17 UTC](https://forum.freemdict.com/t/topic/11495 "2022-03-14T13:17:30Z")\
**Posts on this page:** 20\
**Page:** 49

<div class="post-metadata">

作者： ![xiaoyifang](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/x/df788c/32.png) [@xiaoyifang](https://forum.freemdict.com/u/xiaoyifang)\
发布日期： [2022 年5 月 10 日 02:33 UTC](https://forum.freemdict.com/t/topic/11495/993 "2022-05-10T02:33:43Z")

</div>

> [@alexpeng](#):
>
> （还想啰嗦两句，为什么词典文件夹内的字体它不能调用呢？）

记得只有词典文件夹内的样式才会被调用。如果样式有引用到词典文件夹的字体，应该也会被调用。未测试。

---

<div class="post-metadata">

作者： ![alexpeng](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/alexpeng/32/19592_2.png) [@alexpeng](https://forum.freemdict.com/u/alexpeng)\
发布日期： [2022 年5 月 10 日 02:38 UTC](https://forum.freemdict.com/t/topic/11495/994 "2022-05-10T02:38:05Z")

</div>

好的，再次感谢！！

---

<div class="post-metadata">

作者： ![hahaya](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/h/77aa72/32.png) [@hahaya](https://forum.freemdict.com/u/hahaya)\
发布日期： [2022 年5 月 10 日 06:03 UTC](https://forum.freemdict.com/t/topic/11495/995 "2022-05-10T06:03:43Z")

</div>

反馈一下，5月8号的qt 6.3版，用大辞海修复版M大的mdx文件配合notwind大侠的css和js在GD上顶部无法显示卷名，官方版正常：  
大辞海修复版mdx文件：

> **[大辞海修复版.mdx](https://cloud.freemdict.com/index.php/s/LGGmd9ZgcDQQSMN)**
>
> FreeMdict Cloud - A FreeMdict Storage

qt 6.3版：

 ![I94S7lLuH3](https://forumcdn.freemdict.com/uploads/default/original/3X/b/9/b9c553d3b70d6b0fe98a4e266fc1dce72529fbc2.png)  
官方版:  
 ![kNEBG2tYCG](https://forumcdn.freemdict.com/uploads/default/original/3X/9/8/9809ebe096e2aeb89a660d832e697eaca59938bc.png)

---

<div class="post-metadata">

作者： ![xiaoyifang](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/x/df788c/32.png) [@xiaoyifang](https://forum.freemdict.com/u/xiaoyifang)\
发布日期： [2022 年5 月 10 日 06:36 UTC](https://forum.freemdict.com/t/topic/11495/996 "2022-05-10T06:36:04Z")

</div>

用的css传一份看看。

---

<div class="post-metadata">

作者： ![hahaya](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/h/77aa72/32.png) [@hahaya](https://forum.freemdict.com/u/hahaya)\
发布日期： [2022 年5 月 10 日 07:11 UTC](https://forum.freemdict.com/t/topic/11495/997 "2022-05-10T07:11:45Z")

</div>

不好意思忘了传了：  
[大辞海修复版\_js css\_notwind\_05.09.zip](https://forum.freemdict.com/uploads/short-url/ic9fFpoYKdxBbsHNTJLxLEcOCYV.zip) (3.8 KB)

---

<div class="post-metadata">

作者： ![xiaoyifang](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/x/df788c/32.png) [@xiaoyifang](https://forum.freemdict.com/u/xiaoyifang)\
发布日期： [2022 年5 月 10 日 08:01 UTC](https://forum.freemdict.com/t/topic/11495/998 "2022-05-10T08:01:50Z")

</div>

应该是js的问题吧？不敢确定？有前端高手吗，望指教

 ![image](https://forumcdn.freemdict.com/uploads/default/original/3X/4/3/43ef243282e8b806c357853863a7b23f6e15a7bc.png)

console.log输出的问题，估计是这个原因

> **[console.log调用的是最后一个执行状态显示对象\_IT\_Octopus的博客-CSDN博客\_console.log 里面是对象](https://blog.csdn.net/IT_Octopus/article/details/109050786)**
>
> 并没有什么规范或一组需求指定console.\* 方法族如何工作——它们并不是JavaScript 正式的一部分，而是由宿主环境（请参考本书的“类型和语法”部分）添加到JavaScript 中的。因此，不同的浏览器和JavaScript 环境可以按照自己的意愿来实现，有时候这会引起混淆。尤其要提出的是，在某些条件下，某些浏览器的console.log(..) 并不会把传入的内容立即输出。出现这种情况的主要原因是，在许多程序（不只是JavaScript）中，I/O...

补充：[1324106 - chromium - An open-source project to help move the web forward. - Monorail](https://bugs.chromium.org/p/chromium/issues/detail?id=1324106#c1)

但是innerText为空的问题，我还没弄清楚。  
不过看到一个有趣的文章 [The poor, misunderstood innerText — Perfection Kills](http://perfectionkills.com/the-poor-misunderstood-innerText/#diff-with-textContent)

获取节点文本的推荐的用法是 `e.textContent|| e.innerText`  
[dacihai.7z](https://forum.freemdict.com/uploads/short-url/xbPLr7HfHTMV021A0c7n4EjS7l4.7z) (1.7 KB)

---

<div class="post-metadata">

作者： ![ad困困](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/a/87869e/32.png) [@ad困困](https://forum.freemdict.com/u/ad%E5%9B%B0%E5%9B%B0)\
发布日期： [2022 年5 月 11 日 01:03 UTC](https://forum.freemdict.com/t/topic/11495/999 "2022-05-11T01:03:18Z")

</div>

> [@xiaoyifang](#):
>
> 印象中我成功的时候

win7没有为所有用户安装字体菜单

---

<div class="post-metadata">

作者： ![独行瞏瞏](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/%E7%8B%AC%E8%A1%8C%E7%9E%8F%E7%9E%8F/32/6802_2.png) [@独行瞏瞏](https://forum.freemdict.com/u/%E7%8B%AC%E8%A1%8C%E7%9E%8F%E7%9E%8F)\
发布日期： [2022 年5 月 11 日 01:11 UTC](https://forum.freemdict.com/t/topic/11495/1000 "2022-05-11T01:11:07Z")

</div>

Windows 7微软已经不支持了，很多最新的特性都不支持。你的问题是Windows 7Chromium的bug，无法解决。

---

<div class="post-metadata">

作者： ![xiaoyifang](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/x/df788c/32.png) [@xiaoyifang](https://forum.freemdict.com/u/xiaoyifang)\
发布日期： [2022 年5 月 11 日 04:18 UTC](https://forum.freemdict.com/t/topic/11495/1002 "2022-05-11T04:18:35Z")

</div>

感觉像是词典本身的功能。

---

<div class="post-metadata">

作者： ![hahaya](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/h/77aa72/32.png) [@hahaya](https://forum.freemdict.com/u/hahaya)\
发布日期： [2022 年5 月 11 日 07:18 UTC](https://forum.freemdict.com/t/topic/11495/1003 "2022-05-11T07:18:08Z")

</div>

你用的是xiaoyifang大侠最新哪个版本，我用的最新qt 6.3还是不行，图片词典链接点击没反应。

---

<div class="post-metadata">

作者： ![hahaya](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/h/77aa72/32.png) [@hahaya](https://forum.freemdict.com/u/hahaya)\
发布日期： [2022 年5 月 11 日 08:02 UTC](https://forum.freemdict.com/t/topic/11495/1005 "2022-05-11T08:02:11Z")

</div>

这个图标是极简风，也好看 只是好像跟顶部现有的其他UI图标不是很搭配。

---

<div class="post-metadata">

作者： ![xiaoyifang](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/x/df788c/32.png) [@xiaoyifang](https://forum.freemdict.com/u/xiaoyifang)\
发布日期： [2022 年5 月 11 日 09:38 UTC](https://forum.freemdict.com/t/topic/11495/1007 "2022-05-11T09:38:18Z")

</div>

以后有更好的，再换。

---

<div class="post-metadata">

作者： ![hahaya](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/h/77aa72/32.png) [@hahaya](https://forum.freemdict.com/u/hahaya)\
发布日期： [2022 年5 月 11 日 09:46 UTC](https://forum.freemdict.com/t/topic/11495/1008 "2022-05-11T09:46:16Z")

</div>

qt 6 webengine 运行更流畅，也有增加特性，不想再用回 qt 5的版本了

---

<div class="post-metadata">

作者： ![Dorado-Dict](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/d/a6a055/32.png) [@Dorado-Dict](https://forum.freemdict.com/u/Dorado-Dict)\
发布日期： [2022 年5 月 12 日 07:25 UTC](https://forum.freemdict.com/t/topic/11495/1009 "2022-05-12T07:25:42Z")

</div>

支持一下~感谢发布~

---

<div class="post-metadata">

作者： ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
发布日期： [2022 年5 月 12 日 15:34 UTC](https://forum.freemdict.com/t/topic/11495/1010 "2022-05-12T15:34:45Z")

</div>

> [@xiaoyifang](#):
>
> 但是innerText为空的问题，我还没弄清楚。  
> 获取节点文本的推荐的用法是 `e.textContent|| e.innerText`

textContent和innerText获取到的结果有可能是不一样的。innerText会受到标签样式的影响，如果标签设置了不可见的话，比如display:none，读取到的就是空文本。如果标签是块级元素的是话还会读取到换行符，而textContent就不需要读取标签样式，性能也相对更好。

---

<div class="post-metadata">

作者： ![hahaya](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/h/77aa72/32.png) [@hahaya](https://forum.freemdict.com/u/hahaya)\
发布日期： [2022 年5 月 12 日 15:59 UTC](https://forum.freemdict.com/t/topic/11495/1012 "2022-05-12T15:59:53Z")

</div>

> [@xiaoyifang](#):
>
> dacihai.7z

刚看到大侠修改的文件，完美解决！！太感谢了！

 ![image](https://forumcdn.freemdict.com/uploads/default/original/3X/4/b/4bba39591336b7423dc8cac96b3fb70c1fcba203.png)

---

<div class="post-metadata">

作者： ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
发布日期： [2022 年5 月 12 日 17:11 UTC](https://forum.freemdict.com/t/topic/11495/1013 "2022-05-12T17:11:55Z")

</div>

可能和版本有关，看了下大辞海的javascript脚本，原版写得有点复杂，问题也有可能出在使用innerHTML替换body的时候，innerHTML的替换并不是立即执行的，而innerText是读取的已渲染的文本，在body重新渲染的间隙，此时不止是label标签，任意标签的innerText读取到的字符串有可能都是空白。

测试了下，给proc(''label.juan\_drop", …) 加上setTimeout延时运行，innerText可以读取到字符串。版本是QtWebEngine/6.3.0 Chrome/94.0.4606.126 Safari/537.36 GoldenDict/webengine。

```auto
setTimeout(function () {
    proc(
        'label.juan_drop',
        function (e) {
            e.innerHTML = '<span>' + e.innerText + '</span>';
        }
    );
}, 0);

```

PS 这种对body，label的嵌套替换，表现很奇怪，测试了83版本，又没有这个问题。版本是QtWebEngine/5.15.2 Chrome/83.0.4103.122 Safari/537.36 GoldenDict/webengine。

---

<div class="post-metadata">

作者： ![xiaoyifang](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/x/df788c/32.png) [@xiaoyifang](https://forum.freemdict.com/u/xiaoyifang)\
发布日期： [2022 年5 月 12 日 23:03 UTC](https://forum.freemdict.com/t/topic/11495/1015 "2022-05-12T23:03:33Z")

</div>

> [@last\_idol](#):
>
> 问题也有可能出在使用innerHTML替换body的时候，innerHTML的替换并不是立即执行的，而innerText是读取的已渲染的文本，在body重新渲染的间隙，此时不止是label标签，任意标签的innerText读取到的字符串有可能都是空白。

应该是这个原因

---

<div class="post-metadata">

作者： ![yukiheroree](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/y/f6c823/32.png) [@yukiheroree](https://forum.freemdict.com/u/yukiheroree)\
发布日期： [2022 年5 月 15 日 15:16 UTC](https://forum.freemdict.com/t/topic/11495/1016 "2022-05-15T15:16:43Z")

</div>

大辞海，修改后的css，是#998楼的吗？

---

<div class="post-metadata">

作者： ![xiaoyifang](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/x/df788c/32.png) [@xiaoyifang](https://forum.freemdict.com/u/xiaoyifang)\
发布日期： [2022 年5 月 15 日 15:43 UTC](https://forum.freemdict.com/t/topic/11495/1017 "2022-05-15T15:43:44Z")

</div>

> [@hahaya](#):
>
> lexico：[https://www.lexico.com/definition/%GDWORD%](https://www.lexico.com/definition/%25GDWORD%25)  
> oxford leaner’s: [%GDWORD% - Did you spell it correctly? Alternative spellings from Oxford Advanced Learner’s Dictionary at OxfordLearnersDictionaries.com](https://www.oxfordlearnersdictionaries.com/search/english/?q=%25GDWORD%25)  
> macmillan: [%GDWORD% definition from Macmillan Dictionary: Free British English English Dictionary Online with Thesaurus](https://www.macmillandictionary.com/dictionary/british/%25GDWORD%25)  
> longman: [Suggestions for %GDWORD% | Longman Dictionary of Contemporary English](https://www.ldoceonline.com/dictionary/%25GDWORD%25)  
> collins: [https://www.collinsdictionary.com/dictionary/english/%GDWORD%](https://www.collinsdictionary.com/dictionary/english/%25GDWORD%25)  
> oed: [Home : Oxford English Dictionary](https://www.oed.com/LIBRARY?dest=https%3A%2F%2Fwww.oed.com%2Fsearch%3FsearchType%3Ddictionary%26q%3D%25GDWORD%25%26_searchBtn%3DSearch&acc_id=65585&library_card=12363257)

除 最后一个，其他的基本可以显示了。

[上一页](https://forum.freemdict.com/t/topic/11495.md?page=48)

[下一页](https://forum.freemdict.com/t/topic/11495.md?page=50)
