PDA

View Full Version : How to make layout dynamical?



rambo83
6th January 2010, 14:13
Hello,

I have the following problem:
I would like to add multiple QwtPlots into a QFrame (within a for loop), so that as soon as in first row of frame no further QwtPlot fits in, then the nex added QwtPlots should be placed on the second row and so on. Is there a flag I can set, so that the "line break" is done automatically? I don't want to use GridLayout, because then I have to define after which number of QwtPlots the line break should come, but I would like to use Horizontal Layout. Help me please.

Thank you.

best regards,

Vitali

mattc
6th January 2010, 14:40
Maybe the "Flow Layout Example" is what you are looking for:

http://qt.nokia.com/doc/4.6/layouts-flowlayout.html

(I have never used it)

rambo83
6th January 2010, 15:05
Thank you. It does exactly what I want! Great