Adding layout to another layout in Qt [C++]
<p>Could anyone tell me why I'm getting error and how to fix it?</p>

<pre><code>        QGridLayout* mainLayout = new QGridLayout;
        QGridLayout *leftLayout = new QGridLayout;
        QGridLayout *rightLayout = new QGridLayout;
        mainLayout-&gt;addLayout(leftLayout);
        mainLayout-&gt;addLayout(rightLayout);
        setLayout(mainLayout);
</code></pre>

<p>error I'm getting:
'error: no matching function for call to 'QGridLayout::addLayout(QGridLayout*&amp;)'<br>
Thank you for any help.</p>
