Layout and spacing
Cédric Bellegarde
gnumdk at gmail.com
Sat Mar 6 21:44:05 CET 2010
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 linedit to the other side of the layout, by inserting a
> spacer that resizes to be as wide as possible.
>
Thanks to you , code looks now like this:
self.__layout.addItem (self.__prevButton)
self.__layout.addItem (self.__playButton)
self.__layout.addItem (self.__pauseButton)
self.__layout.addItem (self.__stopButton)
self.__layout.addItem (self.__nextButton)
self.__layout.addStretch (1)
self.__layout.addItem (self.__label)
self.__layout.addItem (self.__lineEdit)
But, it doesn't work :( I'm using a QGraphicsLinearLayout, do i miss
something?
--
Cédric
More information about the Plasma-devel
mailing list