Results 1 to 3 of 3

Thread: QSA: unregistered datatype 'QObjectList' for property

  1. #1
    Join Date
    Apr 2008
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QSA: unregistered datatype 'QObjectList' for property

    Hi, i have some strange problems with QObjectList in QSA scripts

    I have following class that is supposed to be in script:
    Qt Code:
    1. class Document : public QObject
    2. {
    3. Q_OBJECT
    4.  
    5. public:
    6. QObjectList Pages;
    7. Document(QString filename);
    8. Q_PROPERTY(QObjectList Page READ GetPages);
    9.  
    10. public slots:
    11. QObjectList GetPages(){ return Pages;}
    12. };
    To copy to clipboard, switch view to plain text mode 

    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:
    Qt Code:
    1. document = new Document( "file.xml );
    2. print( document.GetPages() ); //works fine
    3. print( document.Page ); //prints an error, and return undefined object
    To copy to clipboard, switch view to plain text mode 


    Any ideas what i'm doing wrong? or is it a bug of QSA?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSA: unregistered datatype 'QObjectList' for property

    Have you tried registering QObjectList with qRegisterMetaType?

  3. #3
    Join Date
    Jul 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QSA: unregistered datatype 'QObjectList' for property

    I know this thread is really old, but did you ever figure out what was wrong? I'm getting the same error message.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.