QObject::connect: Cannot queue arguments of type 'QTextCursor'

前端 未结 1 1386
无人共我
无人共我 2021-01-06 10:43

Im trying to send a signal from a non-main thread in PyQt but i dont know what am doing wrong! And when i execute the program it fails with this error:

QObj         


        
相关标签:
1条回答
  • 2021-01-06 11:18

    Make sure 'QTextCursor' is registered using qRegisterMetaType().

    Did you try to use qRegisterMetaType function?

    The official manual says:

    The class is used as a helper to marshall types in QVariant and in queued signals and slots connections. It associates a type name to a type so that it can be created and destructed dynamically at run-time. Declare new types with Q_DECLARE_METATYPE() to make them available to QVariant and other template-based functions. Call qRegisterMetaType() to make type available to non-template based functions, such as the queued signal and slot connections.

    0 讨论(0)
提交回复
热议问题