If you didn't read it in the first 2.5 minutes after the posting got visible, there was no more edits after that. (Normally I only use spaces, but the existing lines contained tabs already. When I was typing in tabs to format the code consistently the forum editor was reacting weirdly and posted it prematurely without me clicking.)
Though the main point was calling setTextureRect before drawing.