20 ui.treeWidget->expandAll();
21 auto model = ui.treeWidget->model();
22 ui.treeWidget->setCurrentIndex(model->index(0, 0, model->index(0, 0)));
23 auto toolButtonMenu =
new QMenu(ui.menuToolButton);
24 toolButtonMenu->addAction(tr(
"Option 1"));
25 toolButtonMenu->addSeparator();
26 auto checkable = toolButtonMenu->addAction(tr(
"Checkable"));
27 checkable->setCheckable(
true);
28 ui.menuToolButton->setMenu(toolButtonMenu);
29 ui.menuToolButton->setPopupMode(QToolButton::InstantPopup);