Qt 4.5 is not an IDE, it's an application programming framework.

Reimplement contextMenuEvent() for your view.