Translations:Development/Tutorials/First program/KF5/18/en

Jump to: navigation, search

Now we have our item, we can create our popup. We call the KMessageBox::questionYesNo() function which, by default, creates a message box with a "Yes" and a "No" button. The second argument is the text that will appear in the message box above the buttons. The third is the caption the window will have and finally we set the KGuiItem for (what would normally be) the "Yes" button to the KGuiItem yesButton we created.

This page was last modified on 11 March 2016, at 10:30. Content is available under Creative Commons License SA 4.0 unless otherwise noted.