[vtkusers] size of QVTKWidget

Jesús Spí­nola jspinola at gmail.com
Fri Sep 15 07:11:41 EDT 2006


On the qt resize event i call the GetRenderWindow()->GetSize() method from
the qvtkwidget and i get the right size

2006/8/26, Clinton Stimpson <clinton at elemtech.com>:
>
>
> > From: "Anja Ende" <anja.ende at googlemail.com>
> > Subject: Re: [vtkusers] size of QVTKWidget
> > To: vtkusers at vtk.org
> >
> > Hi Clint,
> >
> > Thanks for your reply. I really tried calling ensurePolished() and it
> still
> > returns the same window size.
> >
> > Actually if I query the window size after the exec() has returned, then
> it
> > returns the correct value... But my then it is too late :(
> >
> > Here is a bit of code, to see when I am actually querying for the
> size...
> >
> > QHBoxLayout * mainLayout = new QHBoxLayout;
> > mainLayout->addLayout(viewersLayout);
> > mainLayout->addLayout(toolbarLayout);
> >
> > mainWindow.AddLayout(mainLayout);
> > mainWindow.Pack();
> > // As you can see, I call show before I query the size...
> > mainWindow.showFullScreen();
> >
> > // totally bogus values....
> > int * size = xyViewer->GetSize();
> >
> > Is there a way yo override some of these creation events....???
> >
> > Cheers and thanks,
> >
> > Anja
> >
>
> It appears the full screen thing makes the difference.  The reason why,
> I'm not sure.
> Delayed initialization is done by getting the polish event.  But in this
> case, the resize appears to be done after the polish event.  I expect
> the resize to be before the polish.
> It behaves the same whether it is a normal QWidget or the QVTKWidget.
> So I suggest you take your question to the qt interest list, and ask
> them for more information or for a solution.
>
> Clint
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060915/434c474b/attachment.htm>


More information about the vtkusers mailing list