Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QML Android Layout Artifacts on Orientation Change - Intermittent Issues
Forum Updated to NodeBB v4.3 + New Features

QML Android Layout Artifacts on Orientation Change - Intermittent Issues

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 39 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Grumegargler
    wrote last edited by Grumegargler
    #1

    Hello Qt Community,

    I'm experiencing frustrating layout artifacts in my Qt/QML Android application that occur intermittently during orientation changes. The layout works correctly about 9 out of 10 times, but occasionally displays distorted or incorrectly sized elements.

    Environment:

    • Qt 6.8.3
    • Android NDK 27.0.12077973
    • Simple ApplicationWindow with ColumnLayout structure

    Problem:

    • Layout renders perfectly in portrait mode
    • Most orientation changes work fine
    • ~10% of orientation changes result in visual artifacts (incorrect sizing, element positioning)
    • No console errors or warnings

    Current QML Structure:
    ApplicationWindow {
    visible: true
    title: qsTr("Business Assistant")

      ColumnLayout {
          anchors.fill: parent
          anchors.margins: 20
          spacing: 10
    
          Text { /* title */ }
    
          RowLayout {
              Layout.fillWidth: true
              TextField { Layout.fillWidth: true }
              Button { /* fixed width */ }
          }
    
          ScrollView {
              Layout.fillWidth: true
              Layout.fillHeight: true
              TextArea { /* content */ }
          }
      }
    

    }

    What I've Tried:

    1. Pure Layout-based approach (no mixed anchors)
    2. ApplicationWindow instead of Window
    3. Layout.fillWidth/fillHeight instead of explicit sizing
    4. Adding orientation change timers (workaround)
    5. Wrapping in Item containers

    Questions:

    1. Is this a known Qt Android orientation handling bug?
    2. Are there differences between debug vs release mode for orientation handling?
    3. What's the recommended approach for reliable orientation layouts in Qt 6.8.3?
    4. Should I consider switching to Flutter for mobile development?

    The intermittent nature makes this particularly frustrating - users randomly experience broken layouts. Any insights or proven solutions would be greatly appreciated.

    Qt Version: 6.8.3
    Android NDK: 27.0.12077973

    Thanks in advance for any guidance!

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved