ok, thanks !!
when I put this code:
{
double *buffer=NULL;
plot=new Plot(100,250,buffer,buffer+1,this);
data = new Data(250,buffer,this);
layout->addWidget(plot);
layout->addWidget(data);
central->setLayout(layout);
setCentralWidget(central);
data->on_watcher();
}
mainwindow::mainwindow(QWidget*p)
{
double *buffer=NULL;
plot=new Plot(100,250,buffer,buffer+1,this);
data = new Data(250,buffer,this);
QWidget *central = new QWidget(0); // a central widget.
QVBoxLayout *layout = new QVBoxLayout(this);
layout->addWidget(plot);
layout->addWidget(data);
central->setLayout(layout);
setCentralWidget(central);
data->on_watcher();
}
To copy to clipboard, switch view to plain text mode
I have exaclty what I want, but suddently the program shuts down with a code -1073741819 and I still get the error about the QLayout that Zlatomir talked about:
Starting C:\Users\Genevieve\Desktop\DETECTION\debug\DETECTION.exe...
QLayout: Attempting to add
QLayout "" to mainwindow
"", which already has a layout
C:\Users\Genevieve\Desktop\DETECTION\debug\DETECTION.exe exited with code -1073741819
Starting C:\Users\Genevieve\Desktop\DETECTION\debug\DETECTION.exe...
QLayout: Attempting to add QLayout "" to mainwindow "", which already has a layout
C:\Users\Genevieve\Desktop\DETECTION\debug\DETECTION.exe exited with code -1073741819
To copy to clipboard, switch view to plain text mode
When I debbuged with Visual it says:
Unhandled exception at 0x004056bc in DETECTION.exe: 0xC0000005: Access violation reading location 0x00000004.
Bookmarks