I'm newbie in qt programming and i am confused right now. I want to disable maximize and close buttons of a sub-window. I tried setWindowFlags() but it seems this method only applies on top-level window. so, no luck.

Any help will be appreciated.