Qt4 & enter/exit modal functions

Mike Richardson mike at quaking.demon.co.uk
Mon May 16 14:53:17 BST 2005


On Monday 16 May 2005 13:26, Lars Knoll wrote:
> On Sunday 15 May 2005 13:52, Hamish Rodda wrote:
> > Hi,
> >
> > In the course of porting kdelibs to Qt4, we've come across the
> > no-longer-available qt_enter_modal and qt_leave_modal functions, which
> > were internal to qt and accessed via defines in the files which wanted to
> > use them.
> >
> > The functionality seems to have been moved to QApplicationPrivate
> > (enterModal and leaveModal), and the quick & dirty patch to change our
> > code to this is attached.  However, this introduces a dependancy on
> > internal headers which is no good if the internal headers ever have a BIC
> > change during KDE4.
> >
> > So, does anyone know a better way to do this?  And, is it ok to commit
> > this in the interim, because it holds back quite a bit from
> > compilation...
>
> What about using QEventLoop::processEvents(QEventLoop::ExcludeUserInput)?
> Would that be enough for you?
>
> The other possibility using public API is to show/hide a modal widget (a
> QWidget with the Qt::WA_ShowModal attribute set).

This is going to cause a problem for Rekall, where I switch a widget (the 
debugger) in and out of modal each time an exception is trapped. Is there a 
good way to handle this in Qt4?

>
> Lars

-- 
Regards
Mike

http://www.rekallrevealed.org
*THE* GPL/Open Source database front end for Linux and Windows.





More information about the kde-core-devel mailing list