[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: QSemiModalWidget?
From: Matthias Ettrich <ettrich () troll ! no>
Date: 1999-12-01 19:38:06
[Download RAW message or body]
On Wed, 01 Dec 1999, Richard Moore wrote:
> Richard Moore wrote:
> >
> > Does anyone know if it would be possible to create a QWidget that
> > had it's own event loop (like QSemiModal) but which does not need
> > to be a top level widget? I want something like this for inplace
> > editing.
>
> I've looked into this a bit more now - the only work that is actually
> done in QSemiModal appears to be the centering of the dialog. Everything
> else (specifically the modality) is handled by using the Modal widget
> flag, however according to the docs this implies the the Dialog flag.
> Does this mean it cannot be done?
Why not use QWidget::grabMouse() and QWidget::grabKeyboard() for inline editing?
If you really want modality rather than grabbing (although I don't understand
why), install an application event filter and filter out
e->type() == QEvent::KeyPress ||
e->type() == QEvent::KeyRelease ||
e->type() == QEvent::Accel ||
e->type() == QEvent::MouseButtonPress ||
e->type() == QEvent::MouseButtonRelease ||
e->type() == QEvent::MouseButtonDblClick ||
e->type() == QEvent::FocusIn ||
e->type() == QEvent::Enter
for all widgets that are not children of your "modal" one.
Matthias
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic