[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libqtlua-list] Accessing QObject inside a property in Lua
From: |
Gustavo de Sá Carvalho Honorato |
Subject: |
Re: [Libqtlua-list] Accessing QObject inside a property in Lua |
Date: |
Mon, 17 Jan 2011 20:41:39 -0200 |
2011/1/17 Alexandre Becoulet <address@hidden>:
> On Monday, January 17, 2011 07:39:37 pm you wrote:
>
> Hi,
>
>> >> > I guessed that. The problem is once registered as a Qt meta type,
>> >> > MainWindow* and QObject* are just different meta types. Qt meta types
>> >> > system does not enable QtLua to guess at runtime that MainWindow* can
>> >> > be interpreted as a QObject*, due to C++ inheritance rules.
>
> I found no way to even detect if the type is a pointer to a QObject or if its
> an array of floats or anything else from the registered meta type id.
> QMetaType is not designed to return a pointer to the QMetaObject when
> relevant. Any idea?
Ok, I think I misunderstood the problem. The problem is to retrieve
the QMetaObject from an metatype id. I'll try to think in something.
>
>> > It should not take too long for me to implement, it's just a matter of
>> > accessing a QMap in the 'default:' section of a switch statement to
>> > handle dynamically registered types cases. I have precise idea of how
>> > user callbacks should be implemented and will update the manual with
>> > examples.
>
>> Very good! Thanks! I'm looking forward to this feature. You can count
>> on me if you need any help.
>
> Commited in subversion. Have a look to:
> http://www.nongnu.org/libqtlua/manual/MetaType_class_reference.html
Great! You are very efficient. One suggestion: the page
http://www.nongnu.org/libqtlua/manual/node5.html could have a
reference to this new way of type conversion. What you think?
>
> --
> Alexandre
>
>
- [Libqtlua-list] Accessing QObject inside a property in Lua, Gustavo de Sá Carvalho Honorato, 2011/01/11
- Re: [Libqtlua-list] Accessing QObject inside a property in Lua, Alexandre Becoulet, 2011/01/11
- Re: [Libqtlua-list] Accessing QObject inside a property in Lua, Gustavo de Sá Carvalho Honorato, 2011/01/11
- Re: [Libqtlua-list] Accessing QObject inside a property in Lua, Alexandre Becoulet, 2011/01/12
- Re: [Libqtlua-list] Accessing QObject inside a property in Lua, Gustavo de Sá Carvalho Honorato, 2011/01/14
- Re: [Libqtlua-list] Accessing QObject inside a property in Lua, Alexandre Becoulet, 2011/01/16
- Re: [Libqtlua-list] Accessing QObject inside a property in Lua, Gustavo de Sá Carvalho Honorato, 2011/01/17
- Re: [Libqtlua-list] Accessing QObject inside a property in Lua, Alexandre Becoulet, 2011/01/17
- Re: [Libqtlua-list] Accessing QObject inside a property in Lua,
Gustavo de Sá Carvalho Honorato <=
- Re: [Libqtlua-list] Accessing QObject inside a property in Lua, Gustavo de Sá Carvalho Honorato, 2011/01/18
- Re: [Libqtlua-list] Accessing QObject inside a property in Lua, Alexandre Becoulet, 2011/01/21
- Re: [Libqtlua-list] Accessing QObject inside a property in Lua, Gustavo de Sá Carvalho Honorato, 2011/01/24
- Re: [Libqtlua-list] Accessing QObject inside a property in Lua, Gustavo de Sá Carvalho Honorato, 2011/01/24