From 9de2db2fb8ddac82d4f339b5689417c93f0daa5c Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Tue, 16 Jan 2018 22:50:47 +0200 Subject: Automatically focus on input when opening a dialog --- src/dialogs/CreateRoom.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/dialogs/CreateRoom.cc') diff --git a/src/dialogs/CreateRoom.cc b/src/dialogs/CreateRoom.cc index 2b2fd7f2..0bda0d00 100644 --- a/src/dialogs/CreateRoom.cc +++ b/src/dialogs/CreateRoom.cc @@ -152,3 +152,11 @@ CreateRoom::paintEvent(QPaintEvent *) QPainter p(this); style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); } + +void +CreateRoom::showEvent(QShowEvent *event) +{ + nameInput_->setFocus(); + + QFrame::showEvent(event); +} -- cgit 1.5.1