title: Dynamically created tabs - destroy object when tab closed
body: <p>I am dynamically creating multiple tabs, and I was wondering if when I close the tab, does it actually destroy the object?</p>
  
  <p>I have set the attribute of the dynamically created tab to QtCore.Qt.WA_DeleteOnClose</p>
  
  <p>I assume that setting the attribute doesn't do anything because the closeEvent isn't called on it.</p>
  
  <pre><code>    self.tabWidget.tabCloseRequested.connect(self.close_handler) # connect close button to slot
  
      def close_handler(self, index):
          'Remove added tab if applicable'
          try:
              #self.tabWidget.widget(index).deleteLater() #does this need to be added?
              self.tabWidget.removeTab(index)
          except:
              Data.logger.exception('Exception occured:')
  </code></pre>
  
  <p>How do I make sure that the object is being destroyed?</p>