[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libqtlua-list] Calling method from UserData in Lua
From: |
Alexandre Becoulet |
Subject: |
Re: [Libqtlua-list] Calling method from UserData in Lua |
Date: |
Sun, 30 Jan 2011 22:10:30 +0100 |
User-agent: |
KMail/1.13.5 (Linux/2.6.36-ARCH; KDE/4.5.5; x86_64; ; ) |
On Monday, January 24, 2011 08:09:20 pm Gustavo de Sá Carvalho Honorato wrote:
Hi,
> I would like to call in Lua code a C++ method of a class which not
> inherits from QObject. I know that UserData is designed to do that,
> but I could not figure out how to do this using UserData.
You first need to reimplement UserData functions to allow table access and
enumeration, so that your class methods can be listed and accessed from lua.
Then you need to return some kind of lua callable objects. This is already
implemented in UserObject and Function classes.
--
Alexandre