how to create multiple selections in text edit box in qt4?

Posted by Ronny on Stack Overflow See other posts from Stack Overflow or by Ronny
Published on 2010-04-04T10:55:44Z Indexed on 2010/04/04 11:03 UTC
Read the original article Hit count: 222

Filed under:
|
|
|

Qt3.3 used to allow for multiple selections in the QTextEdit widget by calling the setSelection() function and specifying a different selection id (selNum) as the last argument in that function.

In Qt4, to create a selection, I do it by creating a QTextCursor object and call the setPosition() or movePosition() methods. I have no problems being able to create a single selection of text. I am, however, unable to find a way to create multiple selections. The methods in Qt4 do not have an argument which allows you to set a selection id, nor can i find any other function in the QTextCursor or QTextEdit which looks like it might allow me to do so.

Has this feature been completely removed from Qt4? or has is there a new and different way of doing it?

Thanks.

Ronny

© Stack Overflow or respective owner

Related posts about qt4

Related posts about qt