I know this code was there already and you just moved it, but it seems to me taht setting d->orientation is redundant with the setProperty above, which should trigger onPropertySet(), which is turn calls onOrientationPropertySet(), which should set d->orientation. Can you check this is what happens ? And if yes, please remove the d->orientation assignement lines : less code, less bugs :)