This is a purely theoretical question, no actual code to display (well, one line). If I create a class that inherits from QWidget, does .setAttribute() still work for it? Most importantly, does it work with WA_DeleteOnClose?

Qt Code:
  1. //...
  2. (myWidget) potato;
  3. potato.setAttribute(Qt::WA_DeleteOnClose);
  4. //....
To copy to clipboard, switch view to plain text mode 

Will WA_DeleteOnClose summon the class' destructor or only QWidget's?