for simple cases you might just add the actions to the widget and set QWidget::setContextMenuPolicy() to Qt::ActionsContextMenu