set focus to text edit and pre-select the text on edit

This commit is contained in:
Peinthor Rene
2012-01-30 17:09:21 +01:00
parent 22460201e4
commit d5307f4c91
+3
View File
@@ -50,6 +50,7 @@ void editForm::init()
curRow = -1;
curCol = -1;
textEditor->setPlainText("");
textEditor->setFocus();
setDataType(kSQLiteMediaType_Void, 0);
}
@@ -121,6 +122,8 @@ void editForm::closeEvent( QCloseEvent * )
void editForm::loadText(QString text, int row, int col)
{
textEditor->setPlainText(text);
textEditor->setFocus();
textEditor->selectAll();
curRow = row;
curCol = col;
if (textEditor->toPlainText().length() > 0)