Hi all,
I have some parent widget QVBox containing child widget QScrollView. Now the parent needs to shrink sometimes and even become 0 height if there's no more space, but no matter what size policy I set, QScrollView stops shrinkinkg at some 100px. Any ideas what makes QScrollView stop from shrinking?

Qt Code:
  1. class Parent : public QVBox
  2. {
  3. QScrollView* child;
  4.  
  5. public:
  6. Parent() {
  7. child = new QScrollView( this);
  8. child->setResizePolicy( QScrollView::AutoOneFit); // need this one for sub-child to expand
  9. child->setMinimumHeight( 0); // ignored?
  10. }
  11.  
  12. void Shrink() {
  13. setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Maximum, 1, 0));
  14. }
  15. }
To copy to clipboard, switch view to plain text mode