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

Cannot change window width by onPressed on wayland

    XMLWordPrintable

Details

    • Linux/Wayland

    Description

      The window's width or height cannot be adjusted when triggering onPressed for the first time.

      This issue can be consistently reproduced under the following conditions:

      • Platform: Wayland
      • Scenario: Two windows are displayed simultaneously
      • Trigger: Width is modified using onPressed, not onClicked

      The problem can be demonstrated with the provided code.

      import QtQuick
      
      Window {
          id: root
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")    
          MouseArea {
              anchors.fill: parent
              onPressed: root.width = 1000        
              Text {
                  anchors.centerIn: parent
                  text: "press to change window's width"
              }
          }    
          Window {
              id: dialog
              width: 300
              height: 200
              visible: true
          }
      }
       

      A demo has been uploaded as an attachment for reference.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            warindy yi wang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes