Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Showing Qml Message Diaglog while closing qml application (solved)
Forum Updated to NodeBB v4.3 + New Features

Showing Qml Message Diaglog while closing qml application (solved)

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 2.0k Views 1 Watching
  • 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.
  • T Offline
    T Offline
    Tân Ngọc Đỗ
    wrote on last edited by
    #1

    Hello,

    I want to show a qml message dialog and let user choose "saving some thing" while exit qml application . I try to show the message diaglog at Component.onDestruction or ApplicationWindow.onClosing.

    With: Component.onDestruction: no message dialog was shown.

    With: ApplicationWindow.onClosing: the message diaglog show but the application window disappeared

    Could you please help me ?

    Thank you!

    1 Reply Last reply
    1
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      IMO Component.onDestruction wont be useful here.

      bq. With: ApplicationWindow.onClosing: the message diaglog show but the application window disappeared

      Did you set close.accepted = false before calling the MessageDialog in onClosing handler?

      157

      1 Reply Last reply
      1
      • T Offline
        T Offline
        Tân Ngọc Đỗ
        wrote on last edited by
        #3

        Hi p3c0,

        I forgot this. Thanks to your guide, I can do it.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved