Hi,
I want to put 2 widgets (a QwtPlot and a QTableWidget) on the same mainwindow with a QVBoxLayout, but I see nothing when I try with this code:
{
double *buffer=NULL;
plot=new Plot(100,250,buffer,buffer+1,p);
data = new Data(250,buffer,p);
layout->addWidget(plot);
layout->addWidget(data);
//Start of on_watcher
data->on_watcher();
}
mainwindow::mainwindow(QWidget*p)
{
double *buffer=NULL;
plot=new Plot(100,250,buffer,buffer+1,p);
data = new Data(250,buffer,p);
QVBoxLayout* layout = new QVBoxLayout(p);
layout->addWidget(plot);
layout->addWidget(data);
//Start of on_watcher
data->on_watcher();
}
To copy to clipboard, switch view to plain text mode
And here's my construcors:
data .h:
Data
(int _periode,
double* &_voies,
QWidget*parent
=0);
Data(int _periode,double* &_voies,QWidget*parent=0);
To copy to clipboard, switch view to plain text mode
data.cpp:
Data
::Data(int _periode,
double * &_voies,
QWidget *parent
):QTableWidget(parent
),periode
( _periode
)
Data::Data(int _periode,double * &_voies,QWidget *parent):QTableWidget(parent),periode( _periode )
To copy to clipboard, switch view to plain text mode
plot.h:
Plot
( int duree,
int periode,
double * _time,
double * _voie,
QWidget * p
= NULL );
Plot( int duree, int periode,double * _time, double * _voie, QWidget * p = NULL );
To copy to clipboard, switch view to plain text mode
plot.cpp:
Plot
::Plot(int duree,
int periode,
double* _time,
double* _voie,
QWidget*p
): QwtPlot(p
)
Plot::Plot(int duree,int periode,double* _time,double* _voie,QWidget*p): QwtPlot(p)
To copy to clipboard, switch view to plain text mode
Thanks for your help !
Bookmarks