Important: Please read the Qt Code of Conduct -

MessageDialog with configurable buttons / customized button text?

  • Hi all,
    is it possible to change the Text of the standard buttons in a MessageDialog or to create custom button text like "erase all", "leave in pool" or "remove only"?

    Before, I had achieved that by hacking the internal implementation details (parsing children of contentItem, setting different text proprties) like this:

    import QtQuick.Dialogs 1.3
    MessageDialog {
        id: messageDialogItem
    // elsewhere
    messageDialogItem.contentItem.children[i].text = newYesToAllText

    But this doesn't work any more, probably because the MessageDialog seems to be native on Windows now (see different post).


Log in to reply