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

Documentation - HorizontalHeaderView ColumnWidthProvider confusion

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • None
    • Documentation
    • All

      According to the documentation
      ColumnWidthProvider This property can hold a function that returns the column width for each column in the model.

      Not Working - I defined method called columnWidth & gave method name. This did not work.

      Working - If I define method directly with property value, then it works. e.g uncomment the following commented code & comment another line.

      Based on the above documentation, I did the following.
      Code snippet below.

       

      Window {
         id : root
        function columnWidth(column)
      {         console.log(" Value...."+column)         return 50     }
          HorizontalHeaderView {
              id: horizontalHeader
              width: parent.width
              height: 100
              // columnWidthProvider: function(column)
      {         //        return 50;         //    }
              columnWidthProvider : root.columnWidth(column)
            }
      }
      

       

        For Gerrit Dashboard: QTBUG-131357
        # Subject Branch Project Status CR V

            dheerendra Dheerendra Purohit
            dheerendra Dheerendra Purohit
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change