[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Qt4 & enter/exit modal functions
From:       Reinhold Kainhofer <reinhold () kainhofer ! com>
Date:       2005-05-23 12:52:35
Message-ID: 200505231452.36721.reinhold () kainhofer ! com
[Download RAW message or body]


Matthias Ettrich wrote:
> Hamish, if you drop the idea of faking a modal widget and simply do
> 
>     QEventLoop eventLoop;
>     connect(this, SIGNAL(leaveModality()), &eventLoop, SLOT(quit()));
>     eventLoop.exec(QEventLoop::ExcludeUserInputEvents);
> 
> you should get exactly want you want. Emit the leaveModality() signal when
> you are done, and the temporary event loop will terminate.

I presume this doesn't work in Qt 3.x, does it? 
We have this nasty hidden-widget hack also in kdepim/kresources (copied from 
kdelibs/kio/kio/netaccess.cpp, where it is commented with "// If a troll sees 
this, he kills me" ;-) ), and of course I'd like to get rid of it.

Cheers,
Reinhold

-- 
------------------------------------------------------------------
Reinhold Kainhofer, Vienna University of Technology, Austria
email: reinhold@kainhofer.com, http://reinhold.kainhofer.com/
 * Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/
 * K Desktop Environment, http://www.kde.org, KOrganizer / KPilot maintainer

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic