Hey Bamiel,

2011/8/5 Bamiel <[email protected]>:
> I solved this using the float property indeed, my problem was that I was
> using WLayout inside my widget,
> and using WLayout seems to be the best way to loose control on the CSS
> (I thought using layouts will make
> the behaviour control easier, guess I was wrong).

You could have done this use a WHBoxLayout however, using:
 hbox->addWidget(logo);
 hbox->addStretch();
 hbox->addWidget(btn1);
 hbox->addWidget(btn2);

You would need to set this boxlayout in a container, which defaults to
expanding in width to available width.

There is however a subtle difference between the CSS solution and a
WHBoxLayout: when the width of the container becomes less wide than
the total width of your three widget, then using CSS floats will start
the stack the floats vertically. This is usually a more web-friendly
solution since it allows the user to reduce window size without
getting a horizontal scroll bar.

Wt's layout managers are not really there to displace CSS, but rather
to complement it with functionality not available or possible using
CSS only, and that is certain things related to vertical layout, and
also the possibility to provide resize bars.

Regards,
koen

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to