EDynamicDialog Dynamic dialog
Examples
Dynamic content
Pass parameters
Result callback
Cancel and close
Reopen and cleanup
Properties
contentaliasContent slot; declare QML child objects directly inside the component.
dialogContent.datatextstringDisplayed text.
Native or target defaulttoprealDialog top position in pixels, used when not vertically centered.
0openDelayintDelay, throttling or automatic close time in milliseconds; 0 means no delay or no timed close.
0closeDelayintDelay, throttling or automatic close time in milliseconds; 0 means no delay or no timed close.
0centerboolCenter the layout or text.
falseautofocusboolFocus automatically when shown, subject to availability and popup lifecycle.
truedialogRadiusrealCorner radius in pixels.
8showCloseboolShow a close or remove button.
truebeforeClosevarCallback before closing; dialogs complete asynchronous checks through done(cancel).
nullexitDurationintAnimation or display duration in milliseconds; the component binding identifies its use.
180showHeaderboolShow the header area.
truewindowMarginrealMinimum dialog margin from the window edges in pixels.
16enterDurationintAnimation or display duration in milliseconds; the component binding identifies its use.
220fullscreenboolUse full-screen display or a full-window overlay.
falsecloseOnEscapeboolAllow Escape to close the component.
truedestroyOnCloseboolDestroy Component-loaded content after closing.
truecloseIconintIcon used by the component.
EIcons.*
0 (no icon)
EIcons.XMARKmodalPenetrableboolAllow input to pass through the non-modal overlay.
falseshowCancelButtonboolShow the cancel button.
trueshowConfirmButtonboolShow the confirm button.
truecloseOnClickOutsideboolClose when clicking outside the popup.
truecontentComponentComponentComponent slot for custom body content; null uses the default content. See this page’s examples for delegate context.
Show default value
Item { id: content property var item: null function create() { if (item) { item.destroy() item = null } if (!control.component) return const properties = {} Object.keys(control.parameters || {}).forEach(function(key) { properties[key] = control.parameters[key] }) item = control.component.createObject(content, properties) if (!item) { control.loadFailed("component-creation-failed") return } if ("dialogRef" in item) item.dialogRef = control item.width = Qt.binding(function() { return content.width }) } implicitHeight: item ? Math.max(item.implicitHeight || 0, item.height || 0) : 0 Component.onCompleted: create() Connections { function onComponentChanged() { content.create() } function onParametersChanged() { content.create() } target: control } }confirmStyleTypeintSemantic color style.
EStyle.DefaultEStyle.PrimaryEStyle.SuccessEStyle.InfoEStyle.WarningEStyle.Danger
EStyle.PrimarymodalOverlayColorcolorModal or non-modal overlay color.
EPaletteManager.BasePalette.modalOverlaytextColorcolorText color.
EPaletteManager.ThemePalette.textRegular(ETheme.dark)modelessOverlayColorcolorModal or non-modal overlay color.
EPaletteManager.BasePalette.modelessOverlaytitleColorcolorTitle color.
EPaletteManager.ThemePalette.textPrimary(ETheme.dark)borderColorcolorBorder color.
EPaletteManager.ThemePalette.borderDefault(ETheme.dark)cancelTextstringCancel button text.
EControlConfig.textFor(control, "Cancel2", ELocale.texts)overflowboolAllow the dialog to be dragged beyond the window bounds.
EControlConfig.optionFor(control, "dialog", "overflow", false)confirmTextstringConfirm button text.
EControlConfig.textFor(control, "Confirm2", ELocale.texts)draggableboolAllow entries to be moved by dragging.
EControlConfig.optionFor(control, "dialog", "draggable", false)backgroundColorcolorBackground color.
EPaletteManager.ThemePalette.surfaceComponent(ETheme.dark)alignCenterboolCenter the layout or text.
EControlConfig.optionFor(control, "dialog", "alignCenter", true)loadedContentaliasRead onlyActual content item instantiated from a Component.
contentLoader.itemmaximumDialogWidthrealRead onlyMaximum dialog width after subtracting window margins.
Show default value
Overlay.overlay && Overlay.overlay.width > 0 ? Overlay.overlay.width - windowMargin * 2 : implicitWidthcallbackvarCompletion callback(result, accepted).
nullparametersvarInitial properties injected when creating dynamic content.
({})componentComponentQML Component to instantiate dynamically.
nullresultDatavarData returned by the dynamic dialog through resolve(value).
undefinedinstancevarRead onlyCreated dynamic content instance; null before creation.
loadedContent ? loadedContent.item : nullSignals
closeRejected()Emitted when beforeClose rejects a close request.
openAutoFocused()Emitted after the popup opens and finishes focusing its content.
closeAutoFocused()Emitted after the popup closes and restores focus.
loadFailed(string message)Emitted when loading data fails; message explains why.
finished(var result, bool accepted)Emitted when the dynamic dialog finishes; result is its returned data and accepted indicates confirmation.
Methods
close()Close the component panel or popup.
open()Open the component panel or popup.
resetPosition()Restore the dialog to its initial position.
requestClose()Request popup closure and run the beforeClose check.
resolve(value)Accept the dynamic dialog with value as its result.
finish(accepted)Finish the dynamic dialog; accepted indicates confirmation or cancellation.
openComponent(source, properties)Load and show dialog content from source using the initial properties.