Solved QComboBox. Editable. Select all text and put cursor at the first Char of String
-
Maybe someone can help me with this. I need that my "QComboBox editable" is full selected and the cursor is positioned on the first character when it gets the focus.
-
Combination of:
combBox->setEditable(true) combBox->lineEdit()->setCursorPosition(0);
-
Thanks michelson!!!
Just I want to add:Don't forget to add this line, otherwise lineEdit() you can not use setCursorPosition(0):
#include <QLineEdit>
......
......combBox->setEditable(true)
combBox->lineEdit()->setCursorPosition(0);