Qt4 & enter/exit modal functions
Reinhold Kainhofer
reinhold at kainhofer.com
Mon May 23 13:52:35 BST 2005
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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050523/cc85f176/attachment.sig>
More information about the kde-core-devel
mailing list