PDA

View Full Version : QSA: unregistered datatype 'QObjectList' for property



mikefilonov
11th April 2008, 09: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?

jacek
15th April 2008, 00:12
Have you tried registering QObjectList with qRegisterMetaType?

bradleesand
9th July 2012, 09:33
I know this thread is really old, but did you ever figure out what was wrong? I'm getting the same error message.