After running a program containing the Qaxwidget control for a period of time, there are records indicating that the interface becomes stuck. Monitoring the notify of QApplication, the receiver->objectName for mouse click events is empty
-
Some control contains a stdio operation will stuck in a period time , when the printf function inside the control over-fill the stdout buf. Try to read the stdout buf with tunnels such like : app > log.txt. This is only a possibility, that will mostly not work.
-
It is hard to decipher the question... What I understood is that the UI becomes unresponsive, and the mouse cursor does not change when you hover over the splitter control, right?
If so - it means that the main thread event loop has become blocked by something (in the application itself, or maybe in the ActiveX control). Next time it happens, attach a debugger to the application and force it to stop. Then look at the stack trace of the main thread (almost always the one whose stack trace begins with
WinMain
) to see what it is doing - that thing is either hanging or doing some intensive CPU work. -
Maybe you can steal back to the focus by muting the control, say by calling disableEventSink on it.
-
this is my class inherits from QAxWidget.
class MyChildQaxWidget : public QAxWidget { public: MyChildQaxWidget ( QWidget * parent = 0 ) : QAxWidget (parent) { this->setFocusPolicy(Qt::ClickFocus); this->setAttribute(Qt::WA_ShowWithoutActivating); this->disableClassInfo(); this->disableEventSink(); } MyChildQaxWidget ( const QString & c, QWidget * parent = 0 ) : QAxWidget (c,parent) {} protected: void mousePressEvent ( QMouseEvent * e ) override { setFocus(); clearFocus(); QAxWidget::mousePressEvent ( e ); } void showEvent(QShowEvent* event) override { return QAxWidget::showEvent(event); } void hideEvent(QHideEvent* event) override { this->clearFocus(); return QAxWidget::hideEvent(event); } };
-
What COM object are you hosting in your MyChildQaxWidget?
If it's something like Internet Explorer, you might be better off using Qt's WebEngine instead.