[vtkusers] VTK with Qt 4.2.1

Clinton Stimpson clinton at elemtech.com
Sat Nov 25 23:45:09 EST 2006


In 4.2.0, they delete all descending underlying windows when reparenting 
a widget.  As that is a regression, they have it fixed for 4.2.2.
Two possible workarounds:
1. Don't reparent any parent or grandparents or...  of a QVTKWidget, or 
set up the parents the way you want before calling 
QVTKWidget::SetRenderWindow.
2. If you must reparent, then you can set the QVTKWidget parent to NULL, 
and set it back to its real parent, so that the VTK window can be 
recreated on the new underlying window.

Clint

Anja Ende wrote:
> Hey,
>
> Thanks for the information Clint. Is there a workaround? I do not need 
> to upgrade and I have access to the snapshot but I am wondering if the 
> snapshot version is stable enough.
>
> Cheers,
> Anja
>
>
> On 25/11/06, *Clinton Stimpson* <clinton at elemtech.com 
> <mailto:clinton at elemtech.com>> wrote:
>
>
>     I ran into the same problem.
>     It is a bug in Qt 4.2.0 and 4.2.1.  Trolltech has a fix in the soon to
>     be released 4.2.2.  The latest snapshots have the fix too.
>     I've got more details about the problem if you need to know more.
>
>     Clint
>
>     > Hi all,
>     >
>     > I just installed Qt 4.2.1 along side my 4.1.4 version and ran a
>     very simple
>     > program. I am using VTK along with Qt and this worked without
>     any problems
>     > before.
>     >
>     > However, when I run the program now, I get the following error:
>     >
>     > X Error: BadWindow (invalid Window parameter) 3
>     >  Major opcode: 3 (X_GetWindowAttributes)
>     >  Resource id:  0x0
>     > X Error: BadValue (integer parameter out of range for operation) 2
>     >  Major opcode: 1 (X_CreateWindow)
>     >  Resource id:  0x0
>     > X Error: BadWindow (invalid Window parameter) 3
>     >  Major opcode: 20 (X_GetProperty)
>     >  Resource id:  0x0
>     > X Error: BadWindow (invalid Window parameter) 3
>     >  Major opcode: 3 (X_GetWindowAttributes)
>     >  Resource id:  0x3c00002
>     > Segmentation fault
>     >
>     > This happens when I call the QVTKWidget SetRenderWindow method.
>     Has anything
>     >
>     > substantial changed that could cause this error?
>     >
>     > Anyone else here using Qt 4.2.1 successfully with VTK?
>     >
>     > Cheers,
>     >
>     > Anja
>
>
>
>
>
> -- 
> Cheers,
>
> Anja 




More information about the vtkusers mailing list