So I finally found the way to do this and in retrospect I can't see why I didn't see this before. But what I did is in the QWidget that I add to the workspace I overwrote the closeEvent and then sent out a signal saying that I was closing. Then I connected that with my mainwindow to get the event. It wasn't the ideal solution but it will work.
Bookmarks