QSA-interest Archive, November 2005
Re: slot returning a list of QObjects
Message 1 in thread
Hi Jens!
Did you find a way how to return a list of QObjects? Does it work with QObjectList?
I need to do the same and tried it with QObjectList as return type, but it isn't working.
Bye
Marcus
____________
Virus checked: AVK 16.1489 from 08.11.2005
Message 2 in thread
Using QObjectList (not QList<QObject*>) works fine...
I read your mail just after turning of my laptop with the source to go to bed.
I do not have the program on the internet-computer. Write again if you cannot
get it to work and I will have a look in my source to give you an example
tomorrow.
Greetings
Jens
Am Dienstag, 8. November 2005 17:14 schrieb Marcus Sindermann:
> Hi Jens!
>
> Did you find a way how to return a list of QObjects? Does it work with
> QObjectList? I need to do the same and tried it with QObjectList as return
> type, but it isn't working.
>
> Bye
> Marcus
>
> ____________
> Virus checked: AVK 16.1489 from 08.11.2005
>
>
> To unsubscribe - send "unsubscribe" in the subject to
> qsa-interest-request@xxxxxxxxxxxxx
Message 3 in thread
Hi Marcus
I had a look in my source and it seems to be straight forward:
QObjectList getRegisteredObjectArray( const char* type)
{
QObjectList objList;
foreach(QVSObject* obj, *m_RootObj->getRegObjList())
if(obj->object()->inherits(type)
objList.append(obj->object());
return objList;
}
In the script the user can use this function to get a list of all object of a
particular type which got registered in other scripts called before.
Works without problems for us.
Have fun ;)
Jens
Am Dienstag, 8. November 2005 17:14 schrieb Marcus Sindermann:
> Hi Jens!
>
> Did you find a way how to return a list of QObjects? Does it work with
> QObjectList? I need to do the same and tried it with QObjectList as return
> type, but it isn't working.
>
> Bye
> Marcus
>
> ____________
> Virus checked: AVK 16.1489 from 08.11.2005
>
>
> To unsubscribe - send "unsubscribe" in the subject to
> qsa-interest-request@xxxxxxxxxxxxx