python
文章平均质量分 71
xiyangxiaoguo
这个作者很懒,什么都没留下…
展开
-
QGuiApplication::font(): no QGuiApplication instance and no application font set.
这个问题的出现是因为在使用matplotlib时,需要一个GUI环境,而在没有调用QGuiApplication之前调用了matplotlib,导致抛出该异常。即Class B 的 def __init__(self,fig=A()) -> None: 中的 fig=A() 对象产生于 import b 的时候。python 函数默认值如果是可变类型,那么其实例将只有一个,即无论 B()调用几次,其fig的默认值都是同一个 A()。在使用matplotlib之前,将下面的语句插入到程序中,并先执行该语句。原创 2023-03-24 14:34:32 · 592 阅读 · 0 评论 -
python 操作word库docx 增强接口
python docx操作word 复制段落,插入带格式的段落,插入题注,交叉引用题注,在指定文字后面插入内容原创 2023-03-04 21:56:45 · 1132 阅读 · 1 评论