Looks like this needs qDeleteAll() before clear().