How to create a non-modal KMessageBox?
Olivier Goffart
ogoffart at kde.org
Tue Aug 26 17:47:52 BST 2008
Le mardi 26 août 2008, Lubos Lunak a écrit :
> Hello,
>
> %subj%? I.e. without the function re-entering the event loop? Since I need
> a dialog in a kded module and as such it's a pretty bad idea to do that.
>
> I can see there is KMessagetBox::NoExec, but I have absolutely no idea how
> to use it, since if I pass it to e.g. KMessageBox::questionYesNo(), I won't
> get anything useful. There is KMessageBox::queuedMessageBox(), but again, I
> don't get anything useful out of that. And finally, I see
> KMessageBox::createKMessageBox(), which however after looking at the
> sources should be rather named
> createKMessageBoxButDoOnlyHalfOfTheNeededStuff().
>
> I am missing something about the usage? Otherwise for the usual sorry(),
> questionYesNo() etc. statics I will add createXYZ() methods that do the
> functionality and make the statics just use that and execute the dialog.
Hi,
While porting to Qt4, I wanted to refactor completly KMessageBox to be
something like QMessageBox
(KMessageBox would inherit KDialog and would have either convinient static
function, or use it as a dialog and connect to the signals)
But finally I didn't do it.
So no there is no way to do that.
(The easier way would be to create a KDialog with a label, but we miss the
icon and the notification)
I still think that a QMessageBox-like API mixed with a KDialog API would be
the best.
--
Olivier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080826/9d815798/attachment.sig>
More information about the kde-core-devel
mailing list