QVBoxLayout and QGridLayout Problem
Code:
for(int row=0;row<4;row++)
{
for(int column =0;column<4;column++)
{
grid->addWidget(new LCDRange,row,column);
}
}
layout->addWidget(close);
layout->addWidget(grid);//ERROR
setLayout(layout);
Could someone please tell me how to get rid of this error. Thanks.
Re: QVBoxLayout and QGridLayout Problem
The function name is addLayout(...) the addWidget function can add only widgets
Re: QVBoxLayout and QGridLayout Problem
Thanks, that worked - but now I have another error
QWidget::setLayout: Attempting to set QLayout "" on grid "grid", which already has a layout on the same line