btn->setContextMenuPolicy(Qt::CustomContextMenu);
connect(btn, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(showMenu(const QPoint&)));

void BookmarkLabel::showMenu(const QPoint& point)
{
  QPoint globalPos = this->mapToGlobal(point);
  m_pMenu->exec(QPoint(globalPos.x(), globalPos.y());
}