Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, March 2002
destroy a dialog in init()?


Message 1 in thread

I've got a dialog which needs to make a check
to make sure a certain file exists before showing
the dialog. I do this check inside init(). How
can I prevent the dialog from being shown from within
init() if my check fails? I've tried close(), which
doesn't work, and I've tried destroy(), which gives
numerious X errors.

Thanks in advance,
-- 
 [ signature omitted ] 

Message 2 in thread

John F. Dumas wrote:
> On Mon, 4 Mar 2002, Jeff Shipman wrote:
> 
>    It may be "too late" to do it in init().  I'd be tempted to override
> show() [for a modeless dialog] or exec() [for a modal one] and do it
> that way as in ...
> 

That worked great! Thanks for your
advice.
-- 
 [ signature omitted ]