PDA

View Full Version : QSA and QValueLists



ivotentye
1st June 2006, 09:52
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?

wysota
1st June 2006, 16:53
What do you mean? Use it just like any other QValueList...

ivotentye
6th June 2006, 08:39
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]

wysota
6th June 2006, 09:09
Maybe getAll() doesn't return a QValueList?