Thanks for the quick reply...But When I use that code I am getting errors


error: variable ‘QTextCursor tc’ has initializer but incomplete type
error: ‘QTextCursor* QTextEdit::textCursor() const’ is protected
error: incomplete type ‘QTextCursor’ used in nested name specifier

I tried to find an header file for QTextCursor but failed ... What am I missing...