Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    [SOLVED]How to set the default button of a MessageDialog in QML?

    General and Desktop
    2
    3
    823
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      CoderJeff last edited by CoderJeff

      The default button is "Yes", but I want to set the button "No" as the default button.

      How to do it?

      p3c0 1 Reply Last reply Reply Quote 0
      • p3c0
        p3c0 Moderators @CoderJeff last edited by

        Hi @CoderJeff,
        I guess currently there's no way to do so in QML. You can create your own Dialog, add Buttons to it and set focus to the required one.

        157

        C 1 Reply Last reply Reply Quote 0
        • C
          CoderJeff @p3c0 last edited by

          Hi @p3c0,

          Thank you stop me looking for the solution in time. I have spent so much time on this problem.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post