I found the problem. The flag f you give KTMainWindow says wether to destructive close it or not. It is probably set to 0 in BT so the window is never deleted. When not setting it it works. -- best regards, Torsten Uhlmann ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TUhlmann@gmx.de TUhlmann@debis.com http://www.tuhlmann.purespace.de http://www.bibletime.de ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Wise men still seek him!