I need to split a QStringList but ignore anything inside quotes ("")

Here is my code:
Qt Code:
  1. str = cmd.split(QRegExp(" ")); // TODO: Ignore spaces (" ") inside quotes ("")
To copy to clipboard, switch view to plain text mode 

Thanks for any help