Not entirely sure how to delete the showRecord object.
If you guarantee that the showRecord instance will not be referenced after it emits the finished() signal, then you should be able to call deleteLater() immediately after you emit the signal, wherever that is. The instance will be deleted next time the event loop runs.
Alternatively, you can add another connect() to the finished() signal when you create the thread.
connect(record, SIGNAL(finished()), record, SLOT(deleteLater()));
connect(record, SIGNAL(finished()), record, SLOT(deleteLater()));
To copy to clipboard, switch view to plain text mode
Bookmarks