mikefilonov
11th April 2008, 08:34
Hi, i have some strange problems with QObjectList in QSA scripts
I have following class that is supposed to be in script:
class Document : public QObject
{
Q_OBJECT
public:
QObjectList Pages;
Document(QString filename);
Q_PROPERTY(QObjectList Page READ GetPages);
public slots:
QObjectList GetPages(){ return Pages;}
};
When i use slot in script everything is ok and array returned without any error, but when i try to access "Page" propery it throw error: "QMetaProperty::read: Unable to handle unregistered datatype 'QObjectList' for property 'Document::Page' "
Sample of code here:
document = new Document( "file.xml );
print( document.GetPages() ); //works fine
print( document.Page ); //prints an error, and return undefined object
Any ideas what i'm doing wrong? or is it a bug of QSA?
I have following class that is supposed to be in script:
class Document : public QObject
{
Q_OBJECT
public:
QObjectList Pages;
Document(QString filename);
Q_PROPERTY(QObjectList Page READ GetPages);
public slots:
QObjectList GetPages(){ return Pages;}
};
When i use slot in script everything is ok and array returned without any error, but when i try to access "Page" propery it throw error: "QMetaProperty::read: Unable to handle unregistered datatype 'QObjectList' for property 'Document::Page' "
Sample of code here:
document = new Document( "file.xml );
print( document.GetPages() ); //works fine
print( document.Page ); //prints an error, and return undefined object
Any ideas what i'm doing wrong? or is it a bug of QSA?