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

GridLayout does not emit property changes when changing some properties

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.13.0
    • Quick: Layouts
    • None
    • All

    Description

      This is the case for

      onColumnSpacingChanged, onLayoutDirectionChanged and possibly more. The code for emitting seems to be simply missing.

       

      import QtQuick 2.12
      import QtQuick.Window 2.1
      import QtQuick.Layouts 1.3Window {
          visible: true
          GridLayout {
              id: grid
              columns: 3
              columnSpacing: 5
              Text { text: "Three"; font.bold: true; }
              Text { text: "words"; color: "red" }
              Text { text: "in"; font.underline: true }
              Text { text: "a"; font.pixelSize: 20 }
              Text { text: "row"; font.strikeout: true }
              onColumnSpacingChanged: console.log("column spacing Changed")        // No Output
              layoutDirection: Qt.RightToLeft
              onLayoutDirectionChanged: console.log("Layout Direction Changed")    // No Output
          }   Timer
         {
             interval: 500
             running: true
             onTriggered: {
                 grid.columnSpacing=20
                 grid.layoutDirection=Qt.LeftToRight
             }
         }
      } 

      Attachments

        Issue Links

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

          Activity

            People

              smd Jan Arve
              smd Jan Arve
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes