Qt Quick Components

Dialog

A Dialog is a top-level window mostly used for short-term tasks and brief communications with the user. More...

Inherited by CommonDialog and QueryDialog.

  • List of all members, including inherited members
  • Properties

    Signals

    Methods

    Detailed Description

    Popup dialogs float above the top layer of the application view, usually overlapping the area reserved for the application content. An application can use a dialog to provide information, give warnings, and ask the user to answer a question or select an option.

    Property Documentation

    buttons : list<Item>

    An item for the button area of the dialog. Generally, you would use a Row of Button elements but you could use other Item-based elements instead.


    content : list<Item>

    An item for the content area of the dialog. This can be made up of any other components that are based on Item. For example, you could use a ListView so that the user can select from a list of names.


    status : int

    This indicates the stage of the dialog in the dialog lifecycle. The value is from the DialogStatus enumeration.

    • Opening - the dialog is in the process of opening
    • Open - the dialog is open and visible to the user
    • Closing - the dialog is in the process of closing
    • Closed - the dialog is closed and no longer visible to the user

    title : list<Item>

    An item for the title area of the dialog. Generally, you would use a Text element but, because it is an Item elemnt, you can use any other components that are based on Item. For example, you could use an Image element instead of Text element.


    visualParent : Item

    This determines what other item the dialog is 'on top of'.


    Signal Documentation

    Dialog::accepted ()

    This signal is emitted if the user accepts the dialog's request.

    See also rejected().


    Dialog::rejected ()

    This signal is emitted if the user rejects the dialog's request.

    See also accepted().


    Method Documentation

    Dialog::accept ()

    You can use this method to accept the dialog's request without any user interaction. The dialog will close and the accepted() signal will be emitted as though the user had accepted the dialog's request.


    Dialog::close ()

    You can use this method to close the dialog without any user interaction.


    Dialog::open ()

    You need to call this method to show the dialog to the user.


    Dialog::reject ()

    You can use this method to reject the dialog's request without any user interaction. The dialog will close and the rejected() signal will be emitted as though the user had rejected the dialog's request.