[Qt-interest] Child Inherit Size of Parent

velociraptor Genjix aphidia at hotmail.com
Mon Nov 1 16:10:30 CET 2010


QGraphicsLayout - that's great :) Just what I was looking for. Thank you!!

----------------------------------------
> From: sean.harmer at maps-technology.com
> To: qt-interest at trolltech.com
> Date: Mon, 1 Nov 2010 08:24:20 +0000
> Subject: Re: [Qt-interest] Child Inherit Size of Parent
>
> Hi,
>
> On Sunday 31 October 2010 21:29:22 velociraptor Genjix wrote:
> > That won't work because when you add a layout, it resizes the content to
> > fit. I mean placing the TextBox *ON TOP* of the QGraphicsView :), not
> > besides it (shrinking the QGraphicsView).
>
> Well for a start you never mentioned that you were using QGraphicsView. In
> fact you specifically said "widget".
>
> Secondly, you can still use a QGraphicsLayout subclass. In this case set the
> layout on a parent QGraphicsWidget rather than a QWidget.
>
> This will *NOT* rescale your content but will only alter the size of your
> QGraphicsWidget. I do this all of the time so I know that it works.
>
> If you can still not get this to work please post a small *compilable* example
> that shows the problem and we can help to modify it to make it work.
>
> Cheers,
>
> Sean
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
 		 	   		  



More information about the Qt-interest-old mailing list