How can I invoke functions on QObjects from another thread?
来源:互联网 发布:moto2008概预算软件 编辑:程序博客网 时间:2024/04/28 11:55
How to call a function from one thread on a QObject in another thread.
- The most basic operation is to post an event to the object in the other thread. The event loop in the target objects thread will then deliver the event to the target object. See the documentation [doc.qt.nokia.com].
- The second approach is to make use of Qt’s queued connections. This is also implemented in terms of the first method, and works for any target object that has an event loop running in the thread that owns it. One can either specify a queued connection by passing the parameter Qt::QueuedConnection [doc.qt.nokia.com]to the connect statement or use Qt::AutoConnection, the default, which decides at runtime how the slot should be called. See the documentation [doc.qt.nokia.com]
- Another way is using QMetaObject::invokeMethod()
- How can I invoke functions on QObjects from another thread?
- How to invoke a function from another .cpp source file
- How can I run an EXE from within my application?
- How can I create ePub files from my books?
- Android - How can I call Java methods from C++
- How can I read single characters from the terminal?
- How can I use Server.MapPath() from global.asax?
- How can I use Server.MapPath() from global.asax?
- How can I exclude directories from grep -R?
- How can I fix a locale warning from perl?
- How can I extract the SIGHASH flags from the signature?
- How can I install Log::Log4perl on Microsoft Windows?
- How can I uninstall altiris agent on workstation?
- How can I access my files via FTP on Ubuntu?
- How can i use iptables on centos 7
- How Can One Transfer Xcode 4 Code Snippets from One Machine to Another
- How can I check if one string contains another substring in JavaScript?
- How Can I Stop
- Chapter 4 Trees and Graphs - 4.2
- Effective C++ 类与函数的设计和申明
- C#文件操作
- Chapter 4 Trees and Graphs - 4.3
- windows下android 环境搭建的软件版本
- How can I invoke functions on QObjects from another thread?
- 情感化设计
- SAP PI BIT400培训笔记
- 北京暴雨
- Chapter 4 Trees and Graphs - 4.4
- js+xml 省市级联以及修改默认选中
- cocos2d-x总结-win32环境下响应键盘消息
- Chapter 4 Trees and Graphs - 4.5
- Linux下配置FTP服务