Initial Qt5 support.
Use QWindow::windowHandle()->winId() to replace QWidget::winId() due to a bug of Qt5.
Trim input text. Fixes lxde/lxde-qt#139
Add Ctrl-p and Ctrl-n movement shortcuts.

Ctrl-p moves the focus one item up and Ctrl-n moves the focus one item
down.