spraff
26th November 2008, 16:54
Hi there. I have a QWidget which contains a QScrollArea which contains a MyList which has a QVBoxLayout. MyList has a slot
void MyList :: add_new () {
MyWidget * w = new MyWidget (this);
layout () -> addWidget (w);
}
I can call add_new repeatedly from the MyList constructor and the behaviour is as expected: a new widget is added to the end of the list and eventually a scroll bar appears as the MyList widget grows.
If I call add_new later as the result of a user action, the height of the MyList widget is fixed and everything is squashed to accomadate the new MyWidget.
Is this a bug or do I need to change some setting?
void MyList :: add_new () {
MyWidget * w = new MyWidget (this);
layout () -> addWidget (w);
}
I can call add_new repeatedly from the MyList constructor and the behaviour is as expected: a new widget is added to the end of the list and eventually a scroll bar appears as the MyList widget grows.
If I call add_new later as the result of a user action, the height of the MyList widget is fixed and everything is squashed to accomadate the new MyWidget.
Is this a bug or do I need to change some setting?