qt-interest@trolltech.com
[Top] [All Lists]

Re: Event when dialog is shown?

Subject: Re: Event when dialog is shown?
From: Martin Gebert
Date: Thu, 19 Oct 2006 13:21:20 +0200
Martin schrieb:
I have a dialog containing a button for showing a standard Open File
dialog. When my dialog is shown, I'd like to have the Open File dialog
appear automatically. How can I do that? Is there some signal/event I
can use to do something immediately AFTER my dialog is displayed? I
tried to override #showEvent, but I only managed to get the Open File
dialog appear BEFORE the main dialog was visible.

Reimplement QDialog::exec():

int YourDialog::exec()
{
        show();
        showOpenFileDialog();
        return QDialog::exec();
}


HTH

Martin
--
To mail me, please remove the -NOSPAM- part from the adress above.

Ultimate Truths in software development # 1:
KISS

--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>