davidhurka added a comment.
In D21755#482891 <https://phabricator.kde.org/D21755#482891>, @simgunz wrote: > I tried it by only adding the actions to it and it does not work, no menu is shown. Adding the signal connection is also not enough. After that I gave up for now (I am lazy). But I think it needs to be a little more user-friendly. I tried to reproduce that with the current revision (i. e. with QObject* as parent, but without configuration options, i. e. https://phabricator.kde.org/D21755?id=60141), but it worked. In pageview.cpp, I reduced the code to create the menu to: // Mouse-Mode action menu d->aMouseModeMenu = new ToggleActionMenu( this ); d->aMouseModeMenu->addAction( d->aMouseSelect ); d->aMouseModeMenu->addAction( d->aMouseTextSelect ); d->aMouseModeMenu->addAction( d->aMouseTableSelect ); d->aMouseModeMenu->setText( i18nc( "@action", "Selection Tools" ) ); ac->addAction( QStringLiteral( "mouse_selecttools" ), d->aMouseModeMenu ); Result: Toolbar button is boringly titled “Selection Tools”, but click-and-hold opens the menu. Actions in the menu work. Also removing the last two lines causes the ToggleActionMenu not to be pluggable in the toolbar anymore. I conclude that it //can// work. Did you test it differently? REPOSITORY R223 Okular REVISION DETAIL https://phabricator.kde.org/D21755 To: davidhurka, #okular Cc: simgunz, aacid, #vdg, okular-devel, fbampaloukas, joaonetto, tfella, ngraham, darcyshen