http://doc.qt.io/qt-4.8/qgridlayout.html#QGridLayout-2
What does the following quote mean?
You must insert this grid into another layout. You can insert widgets and layouts into this layout at any time, but laying out will not be performed before this is inserted into another layout.
I have not inserted it into any layout nor I have set the parent. Why is this working?
void Screen::displayWordOnScreen()
{
for (uint i = 0; i < NumOfBlanks; i++)
{
blank[i] = createBlank (SLOT (blankFilled (QString)));
}
QGridLayout *mainLayout = new QGridLayout;
mainLayout->setSizeConstraint (QLayout::SetFixedSize);
for (uint i = 0; i < NumOfBlanks; i++)
{
mainLayout->addWidget (blank[i], 0, i);
}
setLayout (mainLayout);
}