Could anyone tell me why I'm getting error and how to fix it?
QGridLayout* mainLayout = new QGridLayout;
QGridLayout *leftLayout = new QGridLayout;
QGridLayout *rightLayout = new QGridLayout;
mainLayout->addLayout(leftLayout);
mainLayout->addLayout(rightLayout);
setLayout(mainLayout);
error I'm getting:
'error: no matching function for call to 'QGridLayout::addLayout(QGridLayout*&)'
Thank you for any help.
Qt4 Reference says:
void addLayout ( QLayout * layout, int row, int column, Qt::Alignment alignment = 0 )
So you have to do:
mainLayout->addLayout(leftLayout, 0, 0);
mainLayout->addLayout(rightLayout, 0, 1);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With