The code you have posted is used in many applications ( f.e Qwt examples ) without any problems - so there has to be something special in your code. But when you insist on not posting code ...

Uwe