nleverin
2nd August 2007, 06:30
Hi,
I am trying to implement a signal slot connection as follows:
connect (Object1, signal1, Object2, slot1);
the class the connection is being generated is a sub class of a Qt designer ui file where Object1 was actually implemented in the .ui file.
Will the subclass successfully inherit this action?
Also Object2 is not in scope of the connection function and therefore to try to give it access to the object i have used a singleton pattern and tired to get access to the option as object 2 was instantiated within the singleton object, as shown below:
connect ( ui_DesignerAction, SIGNAL(activated), Singleton::Instance()->getObject2, SLOT(obj2slot()));
im assuming from my code not working that you cannot call functions from within the string?
does anyone have a better idea of how i can implement this?
I am trying to implement a signal slot connection as follows:
connect (Object1, signal1, Object2, slot1);
the class the connection is being generated is a sub class of a Qt designer ui file where Object1 was actually implemented in the .ui file.
Will the subclass successfully inherit this action?
Also Object2 is not in scope of the connection function and therefore to try to give it access to the object i have used a singleton pattern and tired to get access to the option as object 2 was instantiated within the singleton object, as shown below:
connect ( ui_DesignerAction, SIGNAL(activated), Singleton::Instance()->getObject2, SLOT(obj2slot()));
im assuming from my code not working that you cannot call functions from within the string?
does anyone have a better idea of how i can implement this?