Re: Layout and spacing

2010-03-06 Thread Aaron J. Seigo
On March 6, 2010, Cédric Bellegarde wrote: > self.__layout.addItem (self.__prevButton) > self.__layout.addItem (self.__playButton) > self.__layout.addItem (self.__pauseButton) > self.__layout.addItem (self.__stopButton) > self.__layout.addItem (self.__nextBut

Re: Layout and spacing

2010-03-06 Thread Cédric Bellegarde
Le Samedi 06 Mars 2010 18:42:09, Andrzej JR Hunt a écrit : > Yes, there is a simpler solution: assuming you are using a layout > supporting insertion of stretches you can use: > layout.addStretch(1); > after adding the buttons and before adding the LineEdit onto the layout, > which pushes the lined

Re: Layout and spacing

2010-03-06 Thread Andrzej JR Hunt
Yes, there is a simpler solution: assuming you are using a layout supporting insertion of stretches you can use: layout.addStretch(1); after adding the buttons and before adding the LineEdit onto the layout, which pushes the linedit to the other side of the layout, by inserting a spacer that res

Layout and spacing

2010-03-06 Thread Cédric Bellegarde
Hello, on the attached screenshot, you will see an horizontal layout with buttons and a LineEdit. What i want is buttons on the left and LineEdit on the right. The only solution i see is calculate layout size, and items size and do: layout.setItemSpacing (LastButtonIndex, (layoutWidth - ItemsWi