Using VTK (QVTKWidget) in combination with Qt 4.2.0 or Qt 4.2.1, which is included in the SuSe 10.2 distribution, can cause the following errors:
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 is a bug introduced in Qt 4.2.0 where they delete all descending underlying windows when reparenting a widget. This is fixed in Qt 4.2.2. More information here.