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

QFormLayout: takeRow and removeRow takes or removes the wrong row

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.9.0 Beta 2
    • 5.8.0
    • Widgets: Layout
    • None

    Description

      The implementation of takeRow(int row) is wrong. It takes the wrong row, because it takes the row from the wrong item.

      In the function "takeRow(int row)" the storageIndex and storageRow is taken from "d->m_things.value(row)" which is wrong. The items of "m_things" are index based not row based. For example a Layout with 50 rows has 100 items stored in "m_things".
      You can see the right usage at "getItemPosition" or "takeAt".

      It works with this approach:

      layout->takeRow(layout->indexOf(widget))
      

      Attachments

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

        Activity

          People

            mmutz Marc Mutz
            mwaldi Michael Waldmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes