解决Class RunLoopModeTracker is implemented in both xxx and yyy 提示有两个Qt二进制文件的集合

报错如下:

objc[32802]: Class RunLoopModeTracker is implemented in both xxx and yyy. One of the two will be used. Which one is undefined.
QObject::moveToThread: Current thread (0x7fefa3512020) is not the object's thread (0x7fffb38b9380).
Cannot move to target thread (0x7fefa3512020)

You might be loading two sets of Qt binaries into the same process. Check that all plugins are compiled against the right Qt binaries. Export DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being loaded.
This application failed to start because it could not find or load the Qt platform plugin "cocoa"
in "".

Available platform plugins are: cocoa, minimal, offscreen.

Reinstalling the application may fix this problem.






原因是,在Mac系统中,使用brew安装一遍Qt,又使用conda安装一遍Qt,两个包重叠使用,卸载一个即可,优先卸载conda安装的Qt,执行以下操作:
在这里插入图片描述

如果这个问题解决了,但是接下来遇到了" qt.qpa.plugin: Could not find the Qt platform plugin “cocoa” in “” "
请移步解决方案戳这里

发布了14 篇原创文章 · 获赞 1 · 访问量 590

猜你喜欢

转载自blog.csdn.net/Serendi_patty/article/details/105194193
yyy