Hello!

I'm using Qwt to draw a graph and doing it by code I need to uset setParent() function to a QWidget inside my form. But if I simply do that, QwtPlot appears very small; don't acquire the QWidget's size.
To solve this, I inserted the line
Qt Code:
  1. graphplot->resize(ui->graphWidget->size())
To copy to clipboard, switch view to plain text mode 
just after the creation of QwtPlot object and it seems everything was fine. But then I noticed that each time my app's window was resized (e.g. from normal size to Maximized, etc.), while the widget was resized, the QwtPlot remained in the original size after that line of code I wrote.
So I went to mainwindow->resizeEvent(QResizeEvent *) and add the line
Qt Code:
  1. graphPlot->resize(ui->graphWidget->size());
To copy to clipboard, switch view to plain text mode 
; immediately this last problem was solved, but now a new one appear: each time the software is opened, the QwtPlot is not ajusted to its parent's size: it's as if the two parts of the code were somehow collapsing.

Any ideas about how to fix this?


Thanks,

Momergil