The base class of native dialogs. 更多...
| import 语句: | import Qt.labs.platform 1.1 | 
| Since: | Qt 5.8 | 
| 继承: | |
| 继承者: | 
								 ColorDialog , FileDialog , FolderDialog , FontDialog ,和 MessageDialog  | 
						
The Dialog type provides common QML API for native platform dialogs.
To show a native dialog, construct an instance of one of the concrete Dialog implementations, set the desired properties, and call open() . Dialog emits accepted() or rejected() when the user is done with the dialog.
注意: Types in Qt.labs modules are not guaranteed to remain compatible in future versions.
| 
								 [default] data : list < 对象 >  | 
						
This default property holds the list of all objects declared as children of the dialog.
						This property holds the window flags of the dialog. The default value is
						
Qt.Dialog
						
						.
					
						This property holds the modality of the dialog. The default value is
						
Qt.WindowModal
						
						.
					
Available values:
| 常量 | 描述 | 
|---|---|
								
Qt.NonModal
								
							 | 
							The dialog is not modal and does not block input to other windows. | 
								
Qt.WindowModal
								
							 | 
							The dialog is modal to a single window hierarchy and blocks input to its parent window, all grandparent windows, and all siblings of its parent and grandparent windows. | 
								
Qt.ApplicationModal
								
							 | 
							The dialog is modal to the application and blocks input to all windows. | 
| 
								 parentWindow : Window  | 
						
This property holds the parent window of the dialog.
Unless explicitly set, the window is automatically resolved by iterating the QML parent objects until a Window 或 Item that has a window is found.
| 
								 result : int  | 
						
This property holds the result code.
Standard result codes:
| 常量 | 值 | 
|---|---|
								
Dialog.Accepted
								
							 | 
						|
								
Dialog.Rejected
								
							 | 
						
注意: MessageDialog sets the result to the value of the clicked standard button instead of using the standard result codes.
| 
								 title : string  | 
						
This property holds the title of the dialog.
| 
								 visible : bool  | 
						
						This property holds the visibility of the dialog. The default value is
						
false
						
						.
					
This signal is emitted when the dialog has been accepted either interactively or by calling accept() .
注意: This signal is not emitted when closing the dialog with close() .
						
							注意:
						
						相应处理程序是
						
onAccepted
						
						.
					
另请参阅 rejected() .
This signal is emitted when the dialog has been rejected either interactively or by calling reject() .
注意: This signal is not emitted when closing the dialog with close() .
						
							注意:
						
						相应处理程序是
						
onRejected
						
						.
					
另请参阅 accepted() .
Closes the dialog and emits the accepted() 信号。
另请参阅 reject() .
Closes the dialog.
| 
								 void done ( int result )  | 
						
Closes the dialog and sets the result .
另请参阅 accept() , reject() ,和 result .
Opens the dialog.
Closes the dialog and emits the rejected() 信号。
另请参阅 accept() .