How to set cursor shape to '>' in a QTextEdit?
问题 I am trying to mimic a command-line client. I wish to set the cursor shape to '>', to show messages to user. I don't see that shape in the options provided by QCursor. Is there a way to set custom shapes to widget cursors? 回答1: You need to set the QTextEdit's viewport's cursor: http://doc.qt.nokia.com/stable/qtextedit.html "The shape of the mouse cursor on a QTextEdit is Qt::IBeamCursor by default. It can be changed through the viewport()'s cursor property." e.g. To hide the cursor completely