PDA

View Full Version : QDialog and Qtextedit



qtuser20
19th February 2010, 03:05
Hi I am using a QTextedit for a an autocompleter .i display the search results in a QDialog with window flag QT::popup .
However after i type the first character the focus shifts to popup , the textedit cursor disappears.

This is not the case when i the window flag QT::Tooltip or framelesswindowhint.
In QDialog i set the focuspolicy to no focus.

How can i get the focus/cursor back to textedit ?

Thankyou

high_flyer
19th February 2010, 08:23
i display the search results in a QDialog
I guess that the results are in a QListWidget or similar in your popup dialog.
If this is the case, you have to set the no focus policy on that widget, not the dialog.

qtuser20
19th February 2010, 13:47
Thanks, i tried but it does not make a difference while using the window hint QT::popup. Any more ideas?