PDA

View Full Version : QComboBox



bismitapadhy
14th July 2009, 12:02
How can i select the currentText of a QComboBox?

spirit
14th July 2009, 12:07
do you mean in a lineEdit of QComboBox?

bismitapadhy
14th July 2009, 12:19
do you mean in a lineEdit of QComboBox?
Yes line edit of QCombobox.

spirit
14th July 2009, 12:20
QLineEdit::selectAll

bismitapadhy
14th July 2009, 12:24
QLineEdit::selectAllYes When we open a dialog having a Qcombobox the current text of the combobox show selected. So that user can edit easily.
How is it possible using QLineEdit::selectAll.its should be function of QComboBox.

spirit
14th July 2009, 12:27
QComboBox has the following method QComboBox::lineEdit, but the comboBox must be editable. so, if it is, then only what you need it is to call QLineEdit::selectAll.

bismitapadhy
15th July 2009, 05:44
QComboBox has the following method QComboBox::lineEdit, but the comboBox must be editable. so, if it is, then only what you need it is to call QLineEdit::selectAll.This is not helping to select the content. To explain my Question i attached 2 picture. picture 1- is the picture what i have. \
picture 2- With selection content in the find what combobox.
So my Question is how can i select the find what content through program not manually.

nish
15th July 2009, 06:01
did you even taken a look at the docs? The last post has the answer..


combo->lineEdit()->selectAll()

that is it