[Qt-interest] Layout segmentation fault

Nicholas Torr nicholast at goldcircle.co.za
Tue Mar 3 10:30:58 CET 2009


Hi all,

Im sure this is a simple problem, but i cant seem to find the cause. All 
Im trying to do is set a layout for a QMainWindow

this class is a subclass of qmainwindow, with this function being called 
from the main immediately after construction

void LeftWindow::SetupWindow()
{
    if (layout() != 0)
        delete layout();
    else
        qDebug() << "No Layout to Destroy.";
    QGridLayout* gridLayout = new QGridLayout(this);
}

this causes an immediate segmentation fault. Any ideas?

Nicholas



More information about the Qt-interest-old mailing list