Qt-interest Archive, January 2007
ComboBox and editText Changed
Message 1 in thread
Hi,
(qt4.1.2)
How can I avoid editable QComboBox populating the line-edit with its
first item.
Details:
I have a combobox which shows a default text all the time : "Enter Name"
When user clicks on it, the default text is removed and user can type
search string and a TreeWidget is updated to show search results.
I have connected editTextChanged signal with slot searchStringChanged
(this slot populates tree).
Also, previous searches are added to combobox.
Now the problem is when user clicks on ComboBox, two edittextchanged
signals are fired:
1). First when "Enter Name" is removed.
2). Second with the item in combobox.
So if I type "Jaya" in combo-box and its added to combobox, Next
time whenever I click on Combobox -
Two signals are fired,
First with "" (Enter Name is removed)
Second with "Jaya" - and the TreeWidget is populated with search
result even though user has not typed anything.
How can I avoid editable QComboBox populating the line-edit with its
first item.
Thanks.
--
[ signature omitted ]