Results 1 to 4 of 4

Thread: QSA and QValueLists

  1. #1
    Join Date
    Jun 2006
    Posts
    2
    Qt products
    Qt3

    Default QSA and QValueLists

    For the project im working on at the moment in Qt3 and QSA 1.1.4 i have created a slot that returns all QObjects the user can modify
    In c++
    QValueList<myOwnQObjextClass> getAll();

    in the qs file
    var all = theClass.getAll();

    i can use this method in the script but how can i use the result returned by the method?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QSA and QValueLists

    What do you mean? Use it just like any other QValueList...

  3. #3
    Join Date
    Jun 2006
    Posts
    2
    Qt products
    Qt3

    Default Re: QSA and QValueLists

    you cant do that in a qs scriptfile if you say
    var all = theClass.getAll();
    var count = all.count();

    the interperter gives the error
    Error: 3_1_7 : 25
    TypeError. 'count' undefined or not a function
    Callstack:
    userFunction(3_1_7:25) 3_1_7 [QObject]

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QSA and QValueLists

    Maybe getAll() doesn't return a QValueList?

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.