QMenu* m = new QMenu(this); m->addAction("act1", this, SLOT(sl1())); m->addAction("act2", this, SLOT(sl2())); m->addAction("act3", this, SLOT(sl3())); m->setDefaultAction(m->actions().last()); m->setGeometry(ui->btnTestMenu->x(), ui->btnTestMenu->y(), m->width(), m->height()); m->exec();