From c4b730b0023f872423592a4acb17739a2c1670fb Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Fri, 26 Mar 2021 11:03:18 +0900 Subject: [PATCH] ResourceEditor: Set focus to the prefix line edit after creating new one "Add Prefix" adds prefix /new/prefix%1 which should be updated by user most likely. Change-Id: I0978574b38eb74b39c1cc8377ef1ab9008a4d88e Reviewed-by: hjk --- src/plugins/resourceeditor/qrceditor/qrceditor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/resourceeditor/qrceditor/qrceditor.cpp b/src/plugins/resourceeditor/qrceditor/qrceditor.cpp index 8384ab0a34c..e17de86b44c 100644 --- a/src/plugins/resourceeditor/qrceditor/qrceditor.cpp +++ b/src/plugins/resourceeditor/qrceditor/qrceditor.cpp @@ -391,6 +391,8 @@ void QrcEditor::onAddPrefix() QUndoCommand * const addEmptyPrefixCommand = new AddEmptyPrefixCommand(m_treeview); m_history.push(addEmptyPrefixCommand); updateHistoryControls(); + m_ui.prefixText->selectAll(); + m_ui.prefixText->setFocus(); } // Slot for 'Undo' button