mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-22 03:26:05 -04:00
Connect closeTabAction.
This commit is contained in:
parent
0806faeb99
commit
52f6b03da2
@ -126,7 +126,6 @@ void KiwixApp::createAction()
|
||||
|
||||
CREATE_ACTION(CloseTabAction, "Close tab");
|
||||
SET_SHORTCUT(CloseTabAction, QKeySequence::Close);
|
||||
DISABLE_ACTION(CloseTabAction);
|
||||
|
||||
CREATE_ACTION(ReopenClosedTabAction, "Reopen closed tab");
|
||||
SET_SHORTCUT(ReopenClosedTabAction, QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_T));
|
||||
|
@ -23,6 +23,8 @@ TabWidget::TabWidget(QWidget *parent) :
|
||||
auto widget = this->createNewTab(true);
|
||||
widget->setUrl(url);
|
||||
});
|
||||
connect(app->getAction(KiwixApp::CloseTabAction), &QAction::triggered,
|
||||
this, &TabWidget::closeTab);
|
||||
}
|
||||
|
||||
WebView* TabWidget::createNewTab(bool setCurrent)
|
||||
|
Loading…
x
Reference in New Issue
Block a user