just curious: what is a right click list?
just curious: what is a right click list?
I suppose "right click list" means QWidget::contextMenuEvent() + QMenu.![]()
J-P Nurmi
So if your "right click list" is a context menu (also known as "popup menu") you can do something like this:
Where SomeWidget is a widget where you want your context menu to appear in. In this example you will have 3 element menu (list).Qt Code:
{ m->addAction(tr("parabola")); m->addAction(tr("karoseria")); m->addAction(tr("kulomiot")); m->move(mapToGlobal(e->pos())); m->show(); }To copy to clipboard, switch view to plain text mode
for simple cases you might just add the actions to the widget and set QWidget::setContextMenuPolicy() to Qt::ActionsContextMenu
Bookmarks