[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyKDE] X Error: BadWindow (invalid Window parameter) 3
From:       Pete Ware <ware () cis ! ohio-state ! edu>
Date:       2000-07-21 22:31:16
[Download RAW message or body]

The following code gives "X Error: BadWindow (invalid Window parameter) 3"
It's the "removeChild() that causes the problem.  Any ideas?

[PyQt-0.13pre1 (with sundry patches), qt-2.1.1, python 1.5.2]

Thanks,
--pete

#! /bin/env python
#				-*- Python -*-
import sys

import qt

class Test (qt.QFrame):
	def __init__ (self, parent = None, name = ''):
		qt.QFrame.__init__ (self, parent, name)
		cols = 10
		top = qt.QLabel ('whatsup', self)
		self.removeChild (top)
		top.hide ()
		#del top
w = None
def test ():
	global w
	app = qt.QApplication (sys.argv)

	w = Test (None, 'Table')
	app.setMainWidget (w)
	w.show ()

	return app

if __name__ == '__main__':
	print 'starting app...',
	app = test ()
	print 'done'
	app.exec_loop ()


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic