Of course the cursor is in the same place, since you are giving it the current cursor position.QLine cursor(this->cursorRect().x(), this->cursorRect().y(), this->cursorRect().x() , this->cursorRect().y()+ this->cursorRect().height() -1);
You need to give your cursor the position you want it to be in!
this->cursorRect().x() + ofsset
Bookmarks