QObject or QAction?
Unsolved
C++ Gurus
-
I am making progress and have run into few gotcha.
I have managed to "find" "grand" QObject by name.
Now I have
QObject *pItemObject;when I look into debug messages it shows "Type "
QActionMy next task is to actually execute pItemObject method , which is QAction.
I am not sure about the correct syntax to write something like this , in pseudocode:
pItemObject -> execcute "on_action...."
I like to receive / need answers :
- why my QObject *pItemObject is seen as type QAction ?
- assuming it makes no difference anyway , how do I physically , actual code please, code
pItemObject -> execute "on_action...." ?
Thanks very much and I do appreciate all the help I have received from forum members so far.
-
QAction *action = qobject_cast<QAction *>(pItemObject);
Has been explained to you before.
-
C Christian Ehrlicher referenced this topic on
-
C Christian Ehrlicher referenced this topic on