Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-111773

Quick StackLayout doesn't reflect correct size to children on maximize/normal

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.2.7, 6.4.2
    • None
    • Ubuntu Desktop 22.04 LTS (x64), macOS Ventura 13.2 (arm64)
    • Linux/X11, macOS

    Description

      Application environment: In a Qt Quick application using ApplicationWindow, having a StackLayout inside which has multiple pages, one at least having a QQuickPaintedItem component.

       

      How to tigger: Maximize window or return back from maximized window.

       

      Expected outcome: In QQuickPaintedItem:: paint() callback width() and height() are correct. Instead width and/or height is bogus and sometimes swapped. Results in incorrectly painted component.

       

      Notes: Normal window resize made from window corner works correctly. Also QQuickPaintedItem:: paint() works correctly when not placed in a StackLayout. So conclusion is that there's a bug in StackLayout resize in above case. Also painter->device()>width() and painter>device()->height() return wrong values in such case.

       

      This may apply to other components contained in a StackLayout as well, but tested only with QQuickPaintedItem derived components. Happens at least on both Linux and macOS. renderTarget() being Image or FrameBuffer doesn't change this behavior.

       

      Attachments

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            jlaako Jussi Laako
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: