- QAction *split = actionCollection()->addAction(QStringLiteral("split_view"));
- split->setWhatsThis(xi18nc("@info:whatsthis find",
- "<para>This splits "
- "the folder view below into two autonomous views.</para><para>This "
- "way you can see two locations at once and move items between them "
- "quickly.</para>Click this again afterwards to recombine the views."));
- actionCollection()->setDefaultShortcut(split, Qt::Key_F3);
- connect(split, &QAction::triggered, this, &DolphinMainWindow::toggleSplitView);
+ m_splitViewAction = actionCollection()->add<KActionMenu>(QStringLiteral("split_view"));
+ m_splitViewAction->setWhatsThis(xi18nc("@info:whatsthis find",
+ "<para>This splits "
+ "the folder view below into two autonomous views.</para><para>This "
+ "way you can see two locations at once and move items between them "
+ "quickly.</para>Click this again afterwards to recombine the views."));
+ m_splitViewAction->setPopupMode(QToolButton::MenuButtonPopup);
+ actionCollection()->setDefaultShortcut(m_splitViewAction, Qt::Key_F3);
+ connect(m_splitViewAction, &QAction::triggered, this, &DolphinMainWindow::toggleSplitView);