void myWidget::check(CLASSID)
{
bool b;
setControl( CLASSID );
}
void myWidget::readit()
{
QMetaObject::invokeMethod(m_pAxWidget,
"getName", Qt
::DirectConnection,
qDebug()<<ret; // prints an empty ""
ret = (m_pAxWidget->dynamicCall("getName")).toString();
qDebug()<<ret; // prints an empty ""
}
void myWidget::check(CLASSID)
{
m_pAxWidget = new QAxWidget();
bool b;
b = connect(m_pAxWidget, SIGNAL(exception(int,QString,QString,QString)), this,
SLOT(exception(int,QString,QString,QString)));
setControl( CLASSID );
}
void myWidget::readit()
{
QString ret;
QMetaObject::invokeMethod(m_pAxWidget, "getName", Qt::DirectConnection,
Q_RETURN_ARG(QString, ret));
qDebug()<<ret; // prints an empty ""
ret = (m_pAxWidget->dynamicCall("getName")).toString();
qDebug()<<ret; // prints an empty ""
}
To copy to clipboard, switch view to plain text mode
Bookmarks