Why do all KMessageBox methods call exec()?
Adriaan de Groot
groot at kde.org
Wed Oct 6 23:45:49 BST 2004
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?
--
Don't worry, 't ain't no shame to be stupid - ol' mouse.
GPG: FEA2 A3FE Adriaan de Groot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kmessagebox.diff
Type: text/x-diff
Size: 1556 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20041007/9cc72c39/attachment.diff>
More information about the kde-core-devel
mailing list