EImageViewer Image viewer
Examples
Thumbnails, flip and download
Hide download action
Standalone image viewer
Properties
closeOnPressEscapeboolAllow Escape to close the component.
trueenabledboolAllow interaction; false disables the control.
trueerrorDelegateComponentComponent slot for custom error state; null uses the default content. See this page’s examples for delegate context.
nullerrorTextstringError or loading-failure text.
Localized textfillModeintHow the image scales and fills its available space.
Image.StretchImage.PreserveAspectFitImage.PreserveAspectCropImage.TileImage.TileVerticallyImage.TileHorizontallyImage.Pad
Image.PreserveAspectFitheightrealComponent size in pixels; may be bound to its parent layout.
0hideOnClickModalboolClose image preview when its backdrop is clicked.
trueinfiniteboolAllow image preview to wrap between the first and last images.
trueinitialIndexintInitially displayed item index, starting at 0.
0lazyboolCreate content or load data on demand; data controls use load / lazyLoad.
falsemaxScalerealMinimum or maximum image preview scale.
7minScalerealMinimum or maximum image preview scale.
0.2placeholderDelegateComponentComponent slot for custom image loading placeholder; null uses the default content. See this page’s examples for delegate context.
nullpreviewboolEnable image preview.
truepreviewSrcListvarArray of image URLs for preview.
[]showProgressboolShow image loading progress.
truesourceurlImage or media resource URL supported by Qt.
Dynamic bindingtoolbarDelegateComponentComponent slot for custom preview toolbar; null uses the default content. See this page’s examples for delegate context.
nullurlListaliasArray of image URLs for preview.
Alias: control.previewSrcListviewerDelegateComponentComponent slot for custom image viewer; null uses the default content. See this page’s examples for delegate context.
nullvisibleboolWhether the component is visible.
truewidthrealComponent size in pixels; may be bound to its parent layout.
0zoomRaterealImage zoom multiplier per step.
1.2previewIndexintRead onlyCurrent preview image index.
Computed at runtimepreviewRotationrealRead onlyCurrent preview image rotation.
Computed at runtimepreviewScalerealRead onlyCurrent preview image scale.
Computed at runtimepreviewSourcesvarRead onlyResolved preview image URL array.
Computed at runtimepreviewVisibleboolRead onlyWhether image preview is open.
Computed at runtimestatusintRead onlyCurrent image loading status.
Image.NullImage.ReadyImage.LoadingImage.Error
Computed at runtimeallowDownloadboolShow and enable saving the preview image.
trueshowThumbnailsboolShow thumbnail navigation during image preview.
falsedownloadBusyboolRead onlyWhether an image network download is running.
imageFiles.busypreviewFlippedVerticalboolRead onlyWhether the preview image is flipped vertically.
internal.flippedVerticalpreviewFlippedHorizontalboolRead onlyWhether the preview image is flipped horizontally.
internal.flippedHorizontalSignals
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
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.