记录opencv的 QObject::moveToThread: Current thread(...) is not the object`s thread 错误

这篇具有很好参考价值的文章主要介绍了记录opencv的 QObject::moveToThread: Current thread(...) is not the object`s thread 错误。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

这个错误主要是在qt库的加载上,在安装的opencv-python工具包下有个qt文件夹,这个文件夹里面的文件估计是要来加载qt的,要是这个里面的qt库的版本和pip install pyqt5所使用的qt库的版本一样估计是没什么问题,要是不一样。就会出现核心转移的错误。(这里为什么这么说,是因为我将pyqt5中的库拷贝到cv2文件夹下发现说版本不一致,要是一致估计就可以运行了,但是这样没有解决掉问题。)

我的最终解决的方法是把安装的cv2文件夹下的qt文件夹换个名字。让opencv去找另一个版本的库文件来使用。毕竟一般都可以向下兼容的。

 :movetothread: current thread (0x1a0cc70) is not the object's thread (0x20b1,opencv,python,qt

 文章来源地址https://www.toymoban.com/news/detail-532009.html

到了这里,关于记录opencv的 QObject::moveToThread: Current thread(...) is not the object`s thread 错误的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 【避坑】paddlepaddle-gpu安装报错:The GPU architecture in your current machine is Pascal, which is not

    完整的系统、显卡等环境如下: 系统:win10 显卡:GeForce GTX 1060 6GB python 3.7.16 cuda:cuda 11.2.0 cudnn:cudnn 8.2.1 paddlepaddle:pip安装 版本:gpu==2.5.1.post112 安装指令为: 安装成功后,测试结果如下: 注意这个警告信息: The GPU architecture in your current machine is Pascal, which is not compatible

    2024年02月08日
    浏览(19)
  • 微信小程序出现routeDone with a webviewld 42 that is not the current page这个bug解决

    微信开发者工具基础库版本过高,可能会出现如下官方Bug routeDone with a webviewld 42 that is not the current page是因为微信开发者工具基础库版本用了最新的2.30.3但官方一直未解决这个问题,只有使用2.25.4的基础库才能使用。 为便于开发者解决低版本基础库无法兼容小程序的新功能的

    2024年02月11日
    浏览(37)
  • 【一步搞定】uniapp运行微信小程序时报错routeDone with a webviewId ** that is not the current page

    每次刷新还不同webviewId!! 每次刷新还不同webviewId!! 已试过其他帖子,设置pages.json的配置仍旧无效的,可以继续往下。 小程序基础库支持的问题。 基础库版本 版本 实测效果 3.0 无效 2.33.0 无效 2.32.3 无效 2.32.1 无效 2.30.4 无效 2.29.2 无效 2.28.1 无效 2.27.3 无效 2.26.2 有效 点

    2024年04月09日
    浏览(76)
  • QObject: Cannot create children for a parent that is in a different thread

    在Qt的官方文档,大家知道有两种方式使用 QThread。 You can use worker objects by moving them to the thread using QObject::moveToThread(). Another way to make code run in a separate thread, is to subclass QThread and reimplement run(). 在使用MoveToThread这种方式时,经常会遇到下面类似的问题: QObject: Cannot create child

    2024年02月06日
    浏览(29)
  • uni-app运行微信小程序时报错routeDone with a webviewId 2 that is not the current page

     在开发微信小程序时使用HBuilderX uni-app开发运行项目的时候新手可能会出现 routeDone with a webviewId 1 that is not the current page 这个报错,有时是因为调试基础库处于灰度中所以会出现这个报错信息,想解决这个报错我们可以尝试降一下微信开发者工具的调试基础库,总共分为三步

    2024年02月11日
    浏览(23)
  • 【Qt】多线程QThread::run()与QObject::moveToThread()

    官方链接QThread Class | Qt Core 5.15.14 使用 QThread::run() 简单来说就是继承QThread类,并重写run()函数,这样run()函数中的代码就会运行在子线程中。 QThread对象管理着一个线程,并通过start函数启动这个线程,线程要执行的代码都在run()里面,run()函数的进入和返回,就相当于子线程的

    2024年02月08日
    浏览(15)
  • 解决问题 Could not obtain transaction-synchronized Session for current thread

    一、问题现象 在使用Hibernate的项目中,在一个定时任务中,执行某段代码,满足条件后,更新表数据。 程序在执行到更新表数据的时候,报错如下: 二、解决方案 在 spring-config.xml 配置事务 切入点 和 切入方法 [说明] 1、tx:method name=“dispose*” propagation=“REQUIRED” / 表示对

    2024年02月08日
    浏览(25)
  • python的opencv错误The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon

    1、出现问题: cv2.error: OpenCV(4.5.4-dev) D:aopencv-pythonopencv-pythonopencvmoduleshighguisrcwindow.cpp:1274: error: (-2:Unspecified e rror) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script i

    2024年03月11日
    浏览(22)
  • cv2.error: OpenCV(4.8.1) D:xxxerror: (-2:Unspecified error) The function is not implemented.报错

    在用harries角点检测算法的过程中,遇到了这个报错:   然后先问了一下gpt,gpt说 :    我估计可能是版本问题,最后找到了这个链接  : Link 那么要怎么解决呢? 执行下面命令即可 :  This solution seems to work for a majority of users, but not all. If you are in this case, see the proposed answer by Sachin

    2024年02月03日
    浏览(20)
  • conda下安装好opencv相关库后运行却报错The function is not implemented. Rebuild the library with Windows, GTK+ 2.x

    先上本人解决方法: 在对应的conda环境下: 前因后果: 在新配置了一个环境后,为了图方便就在Anaconda Navigator里把opencv相关的勾选后安装了。其实也没什么问题,毕竟查询版本啥的都对。我们conda list后也可以找到相关的库。但是在运行一些基本的opencv函数就会报错,比如

    2024年02月04日
    浏览(25)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包