Hi,

i trying to Port a GUI from QT3 to QT4.

The Scrolling in my Widget was implemented using QScrollview.

The painting works correct, but the Pixmap is painted in the background (not the correct widget) in full size and there are no scrollbars.

I think, that the setting of the widget is not happening correct..

The painting is done on viewport()..

Here's the piece of code I think the problem lies:
Qt Code:
  1. xxx::xxx(..* , ..* ..) : QScrollArea(parent) {
  2. ...
  3.  
  4. QWidget* widget = new QWidget;
  5. QVBoxLayout* layout = new QVBoxLayout(this);
  6.  
  7. widget->setLayout(layout);
  8. setWidget(widget);
  9.  
  10. setBackgroundRole(QPalette::Dark);
  11.  
  12. ...
  13.  
  14.  
  15. }
To copy to clipboard, switch view to plain text mode 


Thx in advance
--
bensh