QT 菜单中添加Qcheckbox复选框
// 回放 auto widget = new QWidget; { auto checkbox = new QCheckBox("回放"); auto layout = new QHBoxLayout; layout->addWidget(checkbox); layout->setContentsMargins(5,1,5,1); widget->setLayout(layout); auto action = new QWidgetAction(playback); action->setDefaultWidget(widget); playback->addAction(action); // playback 菜单 }