[Qt-interest] QLineEdit loosing its selection

Oliver Demetz forenbeitraege at oliverdemetz.de
Tue Aug 4 09:06:29 CEST 2009


PROBLEM SOLVED !!!

I found that the origin of the described behaviour is the loosing of the 
focus of my lineedit. So what iI did for testing purposes was to 
override the VirtualKeyboardLineEdit::focusOutEvent() and I 
(accidentally) forgot to call QLineEdit::focusOutEvent() there.

But this just realised what I wanted!

Now the text cursor keeps blinking when the Virtual Keyboard is open and 
the selection is not removed.

Thanks to you all,
best regards,
Oliver


Oliver Demetz schrieb:
> Hi all!
> 
> If I enter text in my QLineEdit, and make a selection in this text, and 
> if I then click somewhere else in my app, the selection is removed 
> automatically.
> 
> This is the usual and standard behaviour.
> 
> Ok.
> 
> BUT:
> 
> As a child of my QLineEdit, I am opening a widget (window flag 
> Qt::Popup) that has virtual keyboard functionality.
> If I click a button inside this child widget, I would like circumvent 
> that the selection is removed before this.
> 
> Actually, another thing I dont like is that the text cursur disappears 
> as soon as the virtual keyboard pops up.
> 
> Any idea how I can change this QLineEdit's standard bahviour?
> 
> See attachment for the classes.
> 
> Thanks a lot in advance,
> Best regards,
> Oliver




More information about the Qt-interest-old mailing list