Hello ,
I am using a QGraphicsTextItem ,but the cursor in it is too thin to find it .
And I Find the QGraphicsTextItem doesn't supports the method of " setCursorWidth( ) ".
Does anybody know how to change it tell me please.
Thanks.
Printable View
Hello ,
I am using a QGraphicsTextItem ,but the cursor in it is too thin to find it .
And I Find the QGraphicsTextItem doesn't supports the method of " setCursorWidth( ) ".
Does anybody know how to change it tell me please.
Thanks.
Code:
#include "cgTextItem.h" #include <QPlainTextDocumentLayout> { newFont.setPointSize(24); setFont(newFont); setDefaultTextColor(Qt::blue); QPlainTextDocumentLayout *plainLayout = new QPlainTextDocumentLayout(document()); plainLayout->setCursorWidth(100); document()->setDocumentLayout(plainLayout); setTextInteractionFlags(Qt::TextEditorInteraction); setPlainText("New Item"); }
this is my construct function ,the QPlainTextDocumentLayout have a function setCursorWidth can be change the cursor width in the QGraphicsTextItem ,
but the effect is not good,it becomed very small. I don't know the reason .can you help me ?
And changed the setCursorWidth's value ,the effect is still .