[Qt-interest] Problem with focusNextChild andQPlainTextEdit (solved)
Ian Thomson
Ian.Thomson at iongeo.com
Fri Mar 27 15:12:31 CET 2009
Hi,
That's great. If you are wondering why, here is some clarification.
-focusNextChild is just a wrapper that calls focusNextPrevChild(true).
-QPlainTextEdit overrides focusNextPrevChild with custom behaviour.
-If you call focusNextChild or even QWidget::focusNextChild it will call
QPlainTextEdit::focusNextPrevChild due to inheritance.
That's why the only way to get QWidget-like focus behaviour is to
specifically call QWidget::focusNextPrevChild as you have found.
Cheers,
Ian.
Stefano Rosellini wrote:
> I found a solution.
>
> If I call
> QWidget::focusNextPrevChild(true);
> instead of
> focusNextChild();
> it works well!
>
>
> Stefano Rosellini
> Informatica Valdinievole
>
More information about the Qt-interest-old
mailing list