Accessing not Non-QObject-based objects from Qt Script
Posted
by uni
on Stack Overflow
See other posts from Stack Overflow
or by uni
Published on 2010-03-17T10:34:40Z
Indexed on
2010/04/01
5:23 UTC
Read the original article
Hit count: 495
Is there any nice and simple way to access non QObject-based classes, such as QXmlQuery, QDateTime etc. from Qt Script?
The only way I see is to wrap QXmlQuery in another class that inherits QObject and declare as slot every function which I need to access from Qt Script:
void MyXmlQuery::setQuery ( const QString & sourceCode, const QUrl & documentURI )
{
realxmlquery_.setQuery(sourceCode, documentURI);
}
© Stack Overflow or respective owner