Not directly with the previous code, I think:
class ActionEditorCreator{
QWidget * createEditor
( ObjectAction
* action
){ switch(action->type()){
case ObjectAction::Example :
return new StringEditor(action);
case ObjectAction::Other :
return new HashEditor(action);
}
}
};
class ActionEditorCreator{
QWidget * createEditor( ObjectAction * action ){
switch(action->type()){
case ObjectAction::Example :
return new StringEditor(action);
case ObjectAction::Other :
return new HashEditor(action);
}
}
};
To copy to clipboard, switch view to plain text mode
Anyway, don't worry. It's not that hard to solve.
Thank you very much!
Bookmarks