Project

General

Profile

Actions

Bug #14871

open
AR

WImage breaks layout in GridLayout

Bug #14871: WImage breaks layout in GridLayout

Added by Achim Reutelsterz about 1 month ago. Updated 25 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
Start date:
10/08/2026
Due date:
% Done:

0%

Estimated time:

Description

I'm using a Wimage inside a WGridlayout which is displayed within a container in a dialog.

If I don't explicitly set the image size with image->resize(100, 100); before adding the image to the grid layout, the dialog height is not calculated correctly on the initial display.
After reloading the page, or when the dialog is opened a second time, the height is rendered correctly.
The issue occurs most of the time on the first display, although occasionally the layout is already correct on the initial load.
It seems that the image dimensions are not always taken into account when the layout size is calculated for the first rendering.

See attached example.


Files

main.cpp (2.63 KB) main.cpp Achim Reutelsterz, 10/08/2026 12:09 PM
Test.jpg (1.2 KB) Test.jpg Achim Reutelsterz, 10/08/2026 12:09 PM

RM Updated by Romain Mardulyn 25 days ago Actions #1

  • Target version set to 4.16.0

This is likely because the image is not yet loaded when the layout is calculated. An image being loaded should trigger a layout adjustment.

Actions

Also available in: PDF Atom