This commit is contained in:
fourtf 2020-09-26 01:52:39 +02:00
parent 828fb2c3f5
commit 8123a47898
2 changed files with 14 additions and 0 deletions

View file

@ -627,6 +627,17 @@ SplitNotebook::SplitNotebook(Window *parent)
} }
} }
void SplitNotebook::showEvent(QShowEvent *)
{
if (auto page = this->getSelectedPage())
{
if (auto split = page->findChild<Split *>())
{
split->giveFocus(Qt::OtherFocusReason);
}
}
}
void SplitNotebook::addCustomButtons() void SplitNotebook::addCustomButtons()
{ {
// settings // settings

View file

@ -98,6 +98,9 @@ public:
SplitContainer *getOrAddSelectedPage(); SplitContainer *getOrAddSelectedPage();
void select(QWidget *page) override; void select(QWidget *page) override;
protected:
void showEvent(QShowEvent *event) override;
private: private:
void addCustomButtons(); void addCustomButtons();