Re: Layout for QwtPlot
Brought to you by:
rathmann
From: Patrick K. <Pat...@ru...> - 2001-11-20 08:41:31
|
On Mon, Nov 19, 2001 at 02:48:54PM +0100, son...@ly... wrote: > QBoxLayout::addWidget seems not to work for QwtPlot, why ? > How can I easily draw many plots inside a single window ? > I've tried to reimplement resizeEvent() like this: > > void MyQWidget::resizeEvent(QResizeEvent *e) > { > int w = e->size().width(); > int h = e->size().height(); > plot1->resize(w,h/2); > plot1->move(0,0); > plot2->resize(w,h/2-1); > plot2->move(0,h/2); > resize(e->size()); > } > > where plot1 and plot2 are QwPlot* > > Is there a more elegant and automatic way to do it ? What about just trying resize(e->size()) within a wrapper or derived plot widget and using the normal layout classes then? Works fine for me. Bye, Patrick |