Skip to content

EImage Image ​

import EUI 1.0

Examples ​

Thumbnails, flip and download ​

QML sourceQML
Preview
Run the code to try the component

Edit text, properties, or events, then select Run.

Code runs in this browser Licenses

Hide download action ​

QML sourceQML
Preview
Run the code to try the component

Edit text, properties, or events, then select Run.

Code runs in this browser Licenses

Multiple previews, zoom, rotation and keyboard navigation ​

QML sourceQML
Preview
Run the code to try the component

Edit text, properties, or events, then select Run.

Code runs in this browser Licenses

Image ​

QML sourceQML
Preview
Run the code to try the component

Edit text, properties, or events, then select Run.

Code runs in this browser Licenses

Properties ​

PropertyDescriptionValues and default
closeOnPressEscapebool

Allow Escape to close the component.

Defaulttrue
enabledbool

Allow interaction; false disables the control.

Defaulttrue
errorDelegateComponent

Component slot for custom error state; null uses the default content. See this page’s examples for delegate context.

Defaultnull
errorTextstring

Error or loading-failure text.

DefaultLocalized text
fillModeint

How the image scales and fills its available space.

Image.Stretch
Image.PreserveAspectFit
Image.PreserveAspectCrop
Image.Tile
Image.TileVertically
Image.TileHorizontally
Image.Pad

DefaultImage.PreserveAspectFit
heightreal

Component size in pixels; may be bound to its parent layout.

DefaultimplicitHeight
hideOnClickModalbool

Close image preview when its backdrop is clicked.

Defaulttrue
infinitebool

Allow image preview to wrap between the first and last images.

Defaulttrue
initialIndexint

Initially displayed item index, starting at 0.

Default0
lazybool

Create content or load data on demand; data controls use load / lazyLoad.

Defaultfalse
maxScalereal

Minimum or maximum image preview scale.

Default7
minScalereal

Minimum or maximum image preview scale.

Default0.2
placeholderDelegateComponent

Component slot for custom image loading placeholder; null uses the default content. See this page’s examples for delegate context.

Defaultnull
previewbool

Enable image preview.

Defaultfalse
previewSrcListvar

Array of image URLs for preview.

Default[]
showProgressbool

Show image loading progress.

Defaulttrue
sourceurl

Image or media resource URL supported by Qt.

Default""
toolbarDelegateComponent

Component slot for custom preview toolbar; null uses the default content. See this page’s examples for delegate context.

Defaultnull
viewerDelegateComponent

Component slot for custom image viewer; null uses the default content. See this page’s examples for delegate context.

Defaultnull
visiblebool

Whether the component is visible.

Defaulttrue
widthreal

Component size in pixels; may be bound to its parent layout.

DefaultimplicitWidth
zoomRatereal

Image zoom multiplier per step.

Default1.2
previewIndexintRead only

Current preview image index.

DefaultComputed at runtime
previewRotationrealRead only

Current preview image rotation.

DefaultComputed at runtime
previewScalerealRead only

Current preview image scale.

DefaultComputed at runtime
previewSourcesvarRead only

Resolved preview image URL array.

DefaultComputed at runtime
previewVisibleboolRead only

Whether image preview is open.

DefaultComputed at runtime
statusintRead only

Current image loading status.

Image.Null
Image.Ready
Image.Loading
Image.Error

DefaultComputed at runtime
allowDownloadbool

Show and enable saving the preview image.

Defaulttrue
showThumbnailsbool

Show thumbnail navigation during image preview.

Defaultfalse
downloadBusyboolRead only

Whether an image network download is running.

DefaultimageFiles.busy
previewFlippedVerticalboolRead only

Whether the preview image is flipped vertically.

Defaultinternal.flippedVertical
previewFlippedHorizontalboolRead only

Whether the preview image is flipped horizontally.

Defaultinternal.flippedHorizontal

Signals ​

SignaturePurpose
loaded()

Emitted after the image loads successfully.

loadError()

Emitted when the image fails to load; use it to show fallback content.

previewShown()

Emitted after the image preview opens.

previewClosed()

Emitted after the image preview closes.

previewRotated(real angle)

Emitted after rotating the preview; angle is the current rotation angle.

previewSwitched(int index)

Emitted after switching preview images; index is the current image index.

downloaded(url destination)

Emitted after saving the image; destination is the saved location.

downloadFailed(string message)

Emitted when an image download fails; message describes the error.

Methods ​

SignaturePurpose
closePreview()

Close the image preview.

loadNow()

Load the image immediately without waiting for viewport visibility.

showPreview(index)

Show the image preview, starting at index.

resetPreview()

Reset preview zoom, rotation, and flip state.

rotatePreview(angle)

Rotate the preview image by angle degrees.

flipPreview(vertical)

Flip the preview image vertically when vertical is true, or horizontally otherwise.

downloadPreview(destination)

Save the current preview image to destination.

zoomPreview(factor)

Scale the preview image by factor.

openPreview(index)

Open the image preview, starting at index.

setActiveItem(index)

Activate the item specified by value or index.

Released under the MIT License. Third-party assets retain their own licenses.