Let's remake it in an answer (so you can accept it, hehe. j/k, to long for a comment):
First. As i said in comment:
You are inheriting without specifying access. So it defaults to private. That's why
ui_manag->session_ui->minimizeButton
wont allow you to access the button.
Second. parent is a method, so It's: this->parent()->parent() or just parent()->parent() ;) Again, it probably needs to inherit public. Not sure, tho. That should work then.