[vtkusers] QVTKWidget problem with Qt 5.3

Simon ESNEAULT simon.esneault at gmail.com
Wed Dec 31 05:54:36 EST 2014


Hi Waldo,

Could you please explain how you modified the QVTKWidget::resizeEvent(
QResizeEvent* ) function to solve this problem?
I and some other people are affected by this bug with QVTKWIdget and retina
displays, see :

http://vtk.1045678.n5.nabble.com/QVTKWidget-and-MacOS-problems-td5729620.html
http://vtk.1045678.n5.nabble.com/imageViewer-size-within-QVTKWidget-td5729578.html

Tried something like :

--------------------------------------------------------
QWidget::resizeEvent( a_event ); if( !this->mRenWin ){ return; }
this->mRenWin->vtkRenderWindow::SetSize( this->width()*devicePixelRatio(),
this->height()*devicePixelRatio() ); if( this->mRenWin->GetInteractor() ){
mIrenAdapter->ProcessEvent( a_event, this->mRenWin->GetInteractor() ); }
this->markCachedImageAsDirty();
--------------------------------------------------------
But it doesn't work...

Thanks
-Simon


2014-05-31 19:15 GMT+02:00 Waldo Valenzuela <waldo.valenzuela at hotmail.com>:

> Hi Guys,
>
> I figure out what is the problem, I was testing the program in a macbook
> retina, and the QVTKWidget is not checking the pixel ratio.
>
> I had to modified the resize function on my child function of QVTKWidget.
>
> Best regards,
>
> Waldo.
>
> On 31 May 2014, at 00:37, Waldo Valenzuela <waldo.valenzuela at hotmail.com>
> wrote:
>
> > Hi Guys,
> >
> > I compiled VTK 6.1.0 with Qt 5.3, and I compiled the vtk example
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/RenderWindowUIMultipleInheritance
> ,
> >
> >
> > and I have a problem when I resize the main window, seems that the
> render resize of QVTKWidget is not called.
> >
> > Any ideas about this problem?
> >
> >
> > Best regards,
> >
> >
> > Waldo.
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
------------------------------------------------------------------
Simon Esneault
Rennes, France
------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141231/3c603d36/attachment.html>


More information about the vtkusers mailing list