Not directly with the previous code, I think:

Qt Code:
  1. class ActionEditorCreator{
  2. QWidget * createEditor( ObjectAction * action ){
  3. switch(action->type()){
  4. case ObjectAction::Example :
  5. return new StringEditor(action);
  6. case ObjectAction::Other :
  7. return new HashEditor(action);
  8. }
  9. }
  10. };
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!