[vtkusers] Qt with QVTKWidget: Setting a QLabel's parent widget to a QVTKWidget Problem

Steven Ferrell ferr.mail at gmail.com
Mon Jan 4 15:29:58 EST 2010


Just call winId() on it?  No visible change.

On Mon, Jan 4, 2010 at 1:12 PM, Clinton Stimpson <clinton at elemtech.com>wrote:

>
> Can you try calling winId() on the QLabel to force Qt to let the operating
> system do the image composition for those widgets.
>
> Clint
>
> On Monday 04 January 2010 11:02:20 am Steven Ferrell wrote:
> > *(including VTK Users in the discussion)*
> >
> > http://imgur.com/8OU4E
> >
> > Brief on what you're seeing: this is a Qt window that uses QDockWidgets.
> > The center widget is a qt mdi actor which holds four QVTKWidgets.  Each
> of
> > those widgets has two renderers, one for the actor and one for the xyz
> axis
> > actor.  There is a label for each vtkwidget which you can see in the top
> > left of each of the four render windows.. they are for some reason
> rendered
> > as black and no text is visible.
> >
> > The first image is what it looks like when it starts up.  Just a black
> area
> > where the label should be, no text.  When I resize the left dock widget,
> > something happens with the text (garbled) in the label as you can see in
> > the second image.
> >
> > Based on your responses so far I would imagine that this is unusual and
> > that it should be fine as I have described it.  I have encountered
> similar
> > things before in Qt/VTK and they tend to just clear themselves up almost
> > randomly (e.g. among a couple of other weird things I've run into so far,
> > for some reason titles weren't displayed in my dock widgets for a while
> > until I removed a few unused and seemingly unrelated event handlers for
> > other processes).  I was looking to find out if there was some obvious
> > behaviour I didn't know about that Qt/VTK required in order to properly
> > display a widget within a QVTKWidget, but it's not looking like that's
> the
> > case.
> >
> > On Mon, Jan 4, 2010 at 11:37 AM, Clinton Stimpson
> <clinton at elemtech.com>wrote:
> > > It should work except maybe if you're setting a transparent background
> > > for the label.  What platform is this problem on?
> > >
> > > Clint
> > >
> > >
> > > On 01/04/2010 09:08 AM, Steven Ferrell wrote:
> > >
> > > I have created a QLabel which has as its parent a QVTKWidget, ie
> > > QLabel *renderTitle = new QLabel(title, vtkWidget);
> > >
> > > The label text does not render at all normally.  If I resize the
> windows
> > > and play around with their size it will eventually show some of the
> text,
> > > but it becomes garbled.
> > >
> > > Do I need to perform some sort of update within some sort of event in
> > > order to have a QLabel within a QVTKWidget display properly?
> > >
> > >
> > > _______________________________________________
> > > 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100104/a03128f9/attachment.htm>


More information about the vtkusers mailing list