Member Function Documentation
QAxWidget::QAxWidget(IUnknown *iface, parent = nullptr, f = Qt::WindowFlags())
Creates a QAxWidget that wraps the COM object referenced by iface. parent and f are propagated to the QWidget contructor.
QAxWidget::QAxWidget(const c, parent = nullptr, f = Qt::WindowFlags())
Creates an QAxWidget widget and initializes the ActiveX control c. parent and f are propagated to the QWidget contructor.
See alsosetControl().
QAxWidget::QAxWidget(parent = nullptr, f = Qt::WindowFlags())
Creates an empty QAxWidget widget and propagates parent and f to the QWidget constructor. To initialize a control, call setControl().
[override virtual]QAxWidget::~QAxWidget()
Shuts down the ActiveX control and destroys the QAxWidget widget, cleaning up all allocated resources.
See alsoclear().
[override virtual protected]void QAxWidget::changeEvent(e)
Reimplements: QWidget::changeEvent(QEvent *event).
[override virtual]void QAxWidget::clear()
Reimplements: QAxBase::clear().
Shuts down the ActiveX control.
[override virtual protected]void QAxWidget::connectNotify(const signal)
Reimplements: QObject::connectNotify(const QMetaMethod &signal).
[virtual]createAggregate()
Reimplement this function when you want to implement additional COM interfaces for the client site of the ActiveX control, or when you want to provide alternative implementations of COM interfaces. Return a new object of a QAxAggregated subclass.
The default implementation returns the null pointer.
[virtual protected]bool QAxWidget::createHostWindow(bool initialized)
Creates the client site for the ActiveX control, and returns true if the control could be embedded successfully, otherwise returns false. If initialized is true the control has already been initialized.
This function is called by initialize(). If you reimplement initialize to customize the actual control instantiation, call this function in your reimplementation to have the control embedded by the default client side. Creates the client site for the ActiveX control, and returns true if the control could be embedded successfully, otherwise returns false.
[protected]bool QAxWidget::createHostWindow(bool initialized, const data)
Creates the client site for the ActiveX control, and returns true if the control could be embedded successfully, otherwise returns false. If initialized is false the control will be initialized using the data. The control will be initialized through either IPersistStreamInit or IPersistStorage interface.
If the control needs to be initialized using custom data, call this function in your reimplementation of initialize(). This function is not called by the default implementation of initialize().
This function was introduced in Qt 4.4.
bool QAxWidget::doVerb(const verb)
Requests the ActiveX control to perform the action verb. The possible verbs are returned by verbs().
The function returns true if the object could perform the action, otherwise returns false.
This function was introduced in Qt 4.1.
[override virtual protected]bool QAxWidget::initialize(IUnknown **ptr)
Reimplements: QAxBase::initialize(IUnknown **ptr).
Calls QAxBase::initialize(ptr), and embeds the control in this widget by calling createHostWindow(false) if successful.
To initialize the control before it is activated, reimplement this function and add your initialization code before you call createHostWindow(true).
Returns true on success, false otherwise.
This function was introduced in Qt 4.2.
[override virtual]minimumSizeHint() const
Reimplements an access function for property: QWidget::minimumSizeHint.
[override virtual protected]void QAxWidget::resizeEvent(QResizeEvent *)
Reimplements: QWidget::resizeEvent(QResizeEvent *event).
[override virtual]sizeHint() const
Reimplements an access function for property: QWidget::sizeHint.
[virtual protected]bool QAxWidget::translateKeyEvent(int message, int keycode) const
Reimplement this function to pass certain key events to the ActiveX control. message is the Window message identifier specifying the message type (ie. WM_KEYDOWN), and keycode is the virtual keycode (ie. VK_TAB).
If the function returns true the key event is passed on to the ActiveX control, which then either processes the event or passes the event on to Qt.
If the function returns false the processing of the key event is ignored by ActiveQt, ie. the ActiveX control might handle it or not.
The default implementation returns true for the following cases:
WM_SYSKEYDOWNWM_SYSKEYUPWM_KEYDOWN
All keycodesVK_MENUVK_TAB, VK_DELETE and all non-arrow-keys in combination with VK_SHIFT, VK_CONTROL or VK_MENU
This table is the result of experimenting with popular ActiveX controls, ie. Internet Explorer and Microsoft Office applications, but for some controls it might require modification.