[Qt-interest] Display QWidget in foreground without taking focus and events
Zeljko
zeljko at holobit.net
Wed Apr 20 16:16:29 CEST 2011
Bertrand ROOS wrote:
> Thanks Zeljko for your answer.
> Now the QTextBrowser takes focus (eg i see a blinking cursor when a click on
> it), but i cannot move the cursor by clicking or select text.
So you've setted up focusPolicy of that widget to Qt::NoFocus ?
Maybe you should set it on the viewport too.
>
> Nevertheless all events (including mouse events) should be stopped by writing
> following code, but it doesn't work:
>
> void Picture::event(QEvent * e)
> {
> if(e->type() == QEvent::Paint)
> {
> return true;
> }
> else
> {
> return false;
> }
> }
Afaics, such code would stop ONLY QEvent::Paint and others are free to do
whatever.
zeljko
More information about the Qt-interest-old
mailing list