Python Qt:未注册的qRegisterMetaType()

Python Qt:未注册的qRegisterMetaType(),python,multithreading,qt,ipc,Python,Multithreading,Qt,Ipc,我是Qt中的新手,我正在尝试在python子进程中执行一个程序: class MiThread(threading.Thread): def __init__(self): threading.Thread.__init__(self) def run(self): try: from Queue import Queue, Empty except ImportError:

我是Qt中的新手,我正在尝试在python子进程中执行一个程序:

class MiThread(threading.Thread):  
      def __init__(self):  
          threading.Thread.__init__(self)   

      def run(self):
        try:
            from Queue import Queue, Empty
        except ImportError:
    #from queue import Queue, Empty  # python 3.x
            print "error"
        ON_POSIX = 'posix' in sys.builtin_module_names

        def enqueue_output(out, queue):
            for line in iter(out.readline, b''):
                queue.put(line)
            out.close()
        p= Popen(["java -Xmx256m -jar bin/HelloWorld.jar"],cwd=r'/home/karen/sphinx4-1.0beta5-src/sphinx4-1.0beta5/',stdout=PIPE, shell=True, bufsize= 4024)
        q = Queue()
        t = Thread(target=enqueue_output, args=(p.stdout, q))
        print "estoy en el hilo"
        t.daemon = True # thread dies with the program
        t.start()
但当我执行时,它失败了,出现以下错误:

QObject::connect: Cannot queue arguments of type 'QTextCursor'
(Make sure 'QTextCursor' is registered using qRegisterMetaType().)

我怎样才能修好它 qReistPyTyType(“MyType”)。我不知道如何在python中实现这一点,但您可能应该使用
QTextCursor
添加类似的调用。您能显示实际导致错误的代码吗?您添加的代码与Qt没有任何关系。