mirror of
https://gitlab.com/Syping/luaengineapp.git
synced 2024-12-22 03:45:32 +01:00
support getObjectText for LEListWidgetItem
This commit is contained in:
parent
fcabd1685d
commit
7449286a20
1 changed files with 5 additions and 1 deletions
|
@ -1513,7 +1513,11 @@ int LuaEngineGui::getObjectText(lua_State *L_p)
|
|||
if (getArgumentCount(L_p) >= 1) {
|
||||
void *pointer = getPointer(L_p, 1);
|
||||
if (pointer != NULL) {
|
||||
if (((QObject*)pointer)->inherits("QAction")) {
|
||||
if (((QObject*)pointer)->inherits("LEListWidgetItem")) {
|
||||
pushVariant(L_p, ((LEListWidgetItem*)pointer)->item()->text());
|
||||
return 1;
|
||||
}
|
||||
else if (((QObject*)pointer)->inherits("QAction")) {
|
||||
pushVariant(L_p, ((QAction*)pointer)->text());
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue