Hi,

I know that there are a lot of threads related to QScrollArea, but I'm can't find the solution to my problem. I want to show a QWt3DPlot (SurfacePlot) inside a Dock. In way that if you zoom the graph, then the scroll bars are shown, and let you move through the graph.

The code is:

Qt Code:
  1. SurfacePlot *my3dPlot = new SurfacePlot(this);
  2.  
  3. QVBoxLayout * m_layoutForWidget = new QVBoxLayout(my3dPlot);
  4. m_layoutForWidget->setAlignment(Qt::AlignTop);
  5.  
  6. QScrollArea * myscroll3d = new QScrollArea;
  7.  
  8. myscroll3d->setWidgetResizable(true);
  9. myscroll3d->setWidget(my3dPlot);
  10.  
  11. //my3dDock was previously defined and initilized
  12. my3dDock->setWidget(myscroll3d);
To copy to clipboard, switch view to plain text mode 

But It doesn't work, any idea please??

Thanks!