there are lots of oss available in the links section, or the Qt Software section. go through those.
It's just a basic question of accessing a member variable's methods
What will you do in this situation
// Represents whatever widget
class ClassIAmInterestedIn {
public:
void tryToAccessMe();
}
// Represents Container Holding the widget ( Maybe a Dialog )
class IhaveObjectYouAreInterestedIn{
private:
ClassIAmInterestedIn objectOfThatClass;
};
// You are working in this class
class IAmHere {
public:
void someMethod(){
IhaveObjectYouAreInterestedIn obj;
obj.doSomeThingInteresting();
// Now there is achange in IhaveObjectYouAreInterestedIn::objectOfThatClass;
// and U will have to access objectOfThatClass::tryToAccessMe()
// Fig out how to access that
}
};
// Represents whatever widget
class ClassIAmInterestedIn {
public:
void tryToAccessMe();
}
// Represents Container Holding the widget ( Maybe a Dialog )
class IhaveObjectYouAreInterestedIn{
private:
ClassIAmInterestedIn objectOfThatClass;
};
// You are working in this class
class IAmHere {
public:
void someMethod(){
IhaveObjectYouAreInterestedIn obj;
obj.doSomeThingInteresting();
// Now there is achange in IhaveObjectYouAreInterestedIn::objectOfThatClass;
// and U will have to access objectOfThatClass::tryToAccessMe()
// Fig out how to access that
}
};
To copy to clipboard, switch view to plain text mode
Bookmarks