View Full Version : do the QGraphicsTextItem have a function to set the cursor width?
robertkun
7th August 2009, 03:18
void QTextEdit::setCursorWidth(int width)
{
Q_D(QTextEdit);
d->control->setCursorWidth(width);
}
In the QTextEdit class there have a function to set the Cursor'width for the user.
But In the QGraphisTextItem there is nothing .
How can I to change it ? thanks.
yogeshgokul
7th August 2009, 06:15
There is no straight way, you my need to sub class QTextCursor and change the paintEvent.
Then set this customized cursor to your QGraphicsTextItem by calling this method:
QGraphicsTextItem::setTextCursor ( const QTextCursor & cursor );
But the effort not worth, why this cursor width is so important ?
Can you please tell me what is this? Is this some kind of advance programming or what ?:):)
Q_D(QTextEdit);
d->control->setCursorWidth(width);
robertkun
10th August 2009, 05:12
But the effort not worth, why this cursor width is so important ?
Can you please tell me what is this? Is this some kind of advance programming or what ?
oh , I am developing a project likes the soft of the pemier( video edit ),
when you want to input some text ,there have a problem ,the cursor in the edit too thin to find it ...
so it is a trouble .
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.