Thanks Atilla and Pelago I will give the eval function a try, sounds like exec() might also be useful. Is there no way to globally set QpushButton attributes? for instance I can change the style of QpushButtons globally with a single method