| Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |
The QAxBindable class provides an interface between the QWidget and the ActiveX client. More...
This class is part of the Qt ActiveQt Extension.
#include <qaxbindable.h>
This class is defined in the Qt ActiveQt Extension, which can be found in the qt/extensions directory. It is not included in the main Qt API.
The QAxBindable class provides an interface between the QWidget and the ActiveX client.
The functions provided by this class allow the ActiveX control to communicate property changes to the client application. Inherit your control class from both QWidget (directly or indirectly) and this class to get access to this class's functions. The meta object compiler requires you to inherit from QWidget first.
class MyActiveX : public QWidget, public QAxBindable
{
Q_OBJECT
Q_PROPERTY( int value READ value WRITE setValue )
public:
MyActiveX( QWidget *parent = 0, const char *name = 0 );
...
int value() const;
void setValue( int );
};
When implementing the property write function, use requestPropertyChange() to get permission from the ActiveX client application to change this property. When the property changes, call propertyChanged() to notify the ActiveX client application about the change.
Use the interface returned by clientSite() to call the ActiveX client. To implement additional COM interfaces in your ActiveX control, reimplement createAggregate() to return a new object of a QAxAggregated subclass.
Call QueryInterface on the returned interface to get the interface you want to call.
The default implementation returns the null pointer.
This function is usually called at the end of the property's write function.
See also requestPropertyChange().
This function is usually called first in the write function for property, and writing is abandoned if the function returns FALSE.
void MyActiveQt::setText( const QString &text )
{
if ( !requestPropertyChange( "text" ) )
return;
// update property
propertyChanged( "text" );
}
See also propertyChanged().
This file is part of the Qt toolkit. Copyright © 1995-2003 Trolltech. All Rights Reserved.
| Copyright © 2003 Trolltech | Trademarks | Qt version 3.1.2
|