if(event->key() == Qt::Key_Up) {
if(idx > 0) { idx--; setText(history[idx]); }
event->accept();
} else if(event->key() == Qt::Key_Down) {
if(idx < history.count()) idx++;
if(idx < history.count()) setText(history[idx]);
if(event->key() == Qt::Key_Up) {
if(idx > 0) { idx--; setText(history[idx]); }
event->accept();
} else if(event->key() == Qt::Key_Down) {
if(idx < history.count()) idx++;
if(idx < history.count()) setText(history[idx]);