Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.3.5
-
None
Description
The following example results in an assertion:
QWidget w;
QGridLayout *layout = new QGridLayout(&w);
QPushButton *a = new QPushButton("A");
QPushButton *b = new QPushButton("B");
layout->addWidget(a, 0, 0);
layout->addWidget(b, 1, 0, -1, 1);
w.show();
When built against a release version of Qt, it is possible to resize widget "w" so that push button "b" appears on top of push button "a".
The assertion does not occur if a third widget is added to the grid layout:
QWidget w;
QGridLayout *layout = new QGridLayout(&w);
QPushButton *a = new QPushButton("A");
QPushButton *b = new QPushButton("B");
QPushButton *c = new QPushButton("C");
layout->addWidget(a, 0, 0);
layout->addWidget(b, 1, 0, -1, 1);
layout->addWidget(c, 2, 1);
w.show();
Update: A negative row span gives undefined results; this is clearly a bug in user code that is easy to work around. We will see if we can fix this but we cannot give it a high priority.