I'm trying to create a contextMenu for a rightClick action. The Menu has two SubMenus, "print in ..." and other subMenu. When I hoverover "print in..." it display the submenu, but to create this submenu it has to consult how many printers are availables in that moment. I can create the complete subMenu listing all the printers using the "MENU.addItem()" but I can't set the "onTriggered" handler to add an action to these Items. How can I fix it
as @BaCaRoZzo commented the connect and the approach in this answer works very well for this case