i want to init QStringList through a function,
my code:

Qt Code:
  1. initqstringlist(&qs);
  2.  
  3. the func is:
  4. int void initqstringlist(QStringList *qs)
  5. {
  6. qs->append("1"); //Segmentation fault
  7. qs->append("2");
  8. }
To copy to clipboard, switch view to plain text mode 
why it report "Segmentation fault"? do i misunderstand the class?