Hey Hadass, 2009/2/24 HADASS YAARI <[email protected]>: > Hi, > Here is my code: > *****Note:My class inherits from WContatinerWidget. > > WContatinerWidget *contatiner = new WContatinerWidget(); > addWidget(container); > > WHBoxLayout *hbox = new WHBoxLayout (); > Container->setLayout(hbox); > Hbox->addWidget(new Wtext(tr("home.intro2"))); > Hbox->addwidget(new WImage("picture.jpg")); > > It seems that on the screen a place is saved for the picture - but the > picture was not loaded.
I've tried this and it works for me, but ... you should be careful with the vertical layout behavior: the image will be reduced in height based on the height of other contents. This is because the layout manager will try to constrain the contents to fit inside the parent, but that parent has not been given an explicit size (it can be given an explicit size either by setting its size through CSS or by containment in another layout manager). To get to the behavior you probably want, you need to indicate that you do not want to adjust vertically: Container->setLayout(hbox, AlignTop | AlignJustify); Regards, koen ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
