bookmarkNameLineEditPointer->setText(bookmarkName);
bookmarkUrlLineEditPointer->setText(bookmarkUrl);
- // Scroll to the beginning of the line edits.
- bookmarkNameLineEditPointer->setCursorPosition(0);
+ // Scroll to the beginning of the bookmark URL line edit.
bookmarkUrlLineEditPointer->setCursorPosition(0);
+ // Focus the bookmark name line edit.
+ bookmarkNameLineEditPointer->setFocus();
+
// Add buttons to the dialog button box.
addButtonPointer = dialogButtonBoxPointer->addButton(i18nc("The add bookmark button", "Add"), QDialogButtonBox::AcceptRole);