How to add a custom minimize button in PyQt5 as i am getting a TypeError?

Printable View