projects
/
mverbiste
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c5a79dc
)
Auto focus to word input.
author
Nguyễn Hồng Quân
<ng.hong.quan@gmail.com>
Sat, 27 Oct 2012 02:30:31 +0000
(09:30 +0700)
committer
Nguyễn Hồng Quân
<ng.hong.quan@gmail.com>
Sat, 27 Oct 2012 02:30:31 +0000
(09:30 +0700)
mainwindow.cpp
patch
|
blob
|
history
diff --git
a/mainwindow.cpp
b/mainwindow.cpp
index
c88c514
..
35db3e5
100644
(file)
--- 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()));
// 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()));
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
#else
show();
#endif
+ wordinput->setFocus();
}
void MainWindow::startLookup()
}
void MainWindow::startLookup()