Why do all KMessageBox methods call exec()?

Waldo Bastian bastian at kde.org
Wed Oct 6 23:59:13 BST 2004


On Thursday 07 October 2004 00:45, Adriaan de Groot wrote:
> I need a KMessageBox with a timeout -- that is, I want to be able to do
> something like this:
>
> QTimer *timeout = new QTimer(this);
> KMessageBox *box = KMessageBox::questionYesNoCancel(...);
> connect(timeout,SIGNAL(timeout()),box,SLOT(cancel()));
> timeout->start(20000,true);
> box->exec();
>
> OK, I can understand that the question* and similar static methods call
> exec(), but what about createKMessageBox()? I would expect that it creates
> the message box -- no more than that
>
> The attached patch adds a NoExec option to the message box, so that you can
> get createKMessageBox() to behave like I would expect it to - creates a
> message box and does nothing else. Seem reasonable?

Fine for me.

Cheers,
Waldo
-- 
bastian at kde.org  |  Wanted: Talented KDE developer  |  bastian at suse.com
  http://www.suse.de/de/company/suse/jobs/suse_pbu/developer_kde.html
-------------- 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/20041007/e910e472/attachment.sig>


More information about the kde-core-devel mailing list