选择后如何禁用菜单操作项?我希望用户只能选择一次操作。
Menu=MainMenu->addMenu("menu");
sub1 =Menu->addAction("sub 1");
sub2 =Menu->addAction("sub 2");
connect(sub1, &QAction::triggered, [item, this](){
setBlock1();
});
connect(sub2, &QAction::triggered, [item, this](){
setBlock2();
});