qaxobject

QThread doesn't start

梦想与她 提交于 2020-01-05 10:33:13
问题 Sorry for the length of this post. But I am stuck for two days now.... I am working on a Qt 4.6 Windows application that communicates with a hardware device through ActiveX. When I send a command, the device does some stuff and when it's done (can take up to one minute) it emits a signal. I need to wait this signal to know if everything went okay (or not) and do some actions in consequence. A command is sent to the device when a user clicks a button. And obviously, I don't want the HMI to

QThread doesn't start

那年仲夏 提交于 2020-01-05 10:33:05
问题 Sorry for the length of this post. But I am stuck for two days now.... I am working on a Qt 4.6 Windows application that communicates with a hardware device through ActiveX. When I send a command, the device does some stuff and when it's done (can take up to one minute) it emits a signal. I need to wait this signal to know if everything went okay (or not) and do some actions in consequence. A command is sent to the device when a user clicks a button. And obviously, I don't want the HMI to

Share QAxObject between two threads?

旧巷老猫 提交于 2019-12-08 12:58:07
问题 Let's say an object A running in a thread. It has a pointer to a QAxObject instance and to an object B. The object B has the pointer to the QAxObject. Object A creates a thread and moves the object B in it. #ifndef OBJECTA_H #define OBJECTA_H #include <QtCore/QObject> #include <QtCore/QThread> #include <QAxObject> #include "ObjectB.h" class ObjectA : public QObject { Q_OBJECT public: ObjectA(QObject *parent = 0) : QObject(parent) { thread = new QThread(); activeX = new QAxObject(); objectB =