From: Nguyễn Hồng Quân Date: Sat, 27 Oct 2012 02:30:31 +0000 (+0700) Subject: Auto focus to word input. X-Git-Url: http://git.maemo.org/git/?p=mverbiste;a=commitdiff_plain;h=075c0d8be4a72e813c4c81e147af317aad129119;hp=c5a79dc4b67e59dcbd51047d045b17ffe268a6f0 Auto focus to word input. --- diff --git a/mainwindow.cpp b/mainwindow.cpp index c88c514..35db3e5 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -45,6 +45,7 @@ void MainWindow::setupcodedUI() // Clear the word input when Clear button is tapped QObject::connect(btnClear, SIGNAL(clicked()), wordinput, SLOT(clear())); QObject::connect(btnClear, SIGNAL(clicked()), labVerb, SLOT(clear())); + QObject::connect(btnClear, SIGNAL(clicked()), wordinput, SLOT(setFocus())); QObject::connect(wordinput, SIGNAL(returnPressed()), this, SLOT(startLookup())); QObject::connect(btnLookup, SIGNAL(clicked()), this, SLOT(startLookup())); @@ -107,6 +108,7 @@ void MainWindow::showExpanded() #else show(); #endif + wordinput->setFocus(); } void MainWindow::startLookup()