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

segfault in QGridLayout.takeAt ( -1 )

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 4.8.0
    • Widgets: Layout
    • None
    • Linux (32-bit Fedora Core 11 and 64-bit Ubuntu 11.04)

    Description

      This was originally filed as PySide bug 23.

      Here is a simple test program to reproduce the crash:

      import sys
      from PySide.QtGui import *
      
      app = QApplication ( sys.argv )
      window = QFrame()
      layout = QGridLayout ( window )
      widget = layout.takeAt ( -1 )
      window.show()
      sys.exit ( app.exec_() )
      

      Admittedly, -1 is not a valid index, but other layout classes handle the error
      more gracefully. If QGridLayout is replaced by QVBoxLayout, for example,
      takeAt(-1) returns None.

      Although it may seem contrived to pass -1 to takeAt(), -1 is returned by
      QGridLayout.indexOf() when passed an invalid widget.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            nmelchior Nik Melchior
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes