[Qt-interest] How can I set to position in QPlainTextEdit?

Iurii Gordiienko hordi at ukr.net
Wed Dec 31 16:43:18 CET 2008


Yes, now it worked (I forget call _te->setTextCursor(c);)    Thank you for you help. But I think this is a bug, because after text-changing (for example, after clean()) QPlainTextEdit should remove cursors internaly.        
--- Original Message ---    
From: "Daniel V?rit?" <daniel.verite at gmail.com>    
To: qt-interest at trolltech.com    
Date: 31 december, 16:41:53    
Subject: Re: [Qt-interest] How can I set to position in QPlainTextEdit?    
    
    Iurii Gordiienko writes    
    
> Any changes... :(    
    
You mean no change?    
If I modify your example to add this code, which clears the selection:    
    
void Widget::load()    
{    
_te->clear();    
QTextCursor c = _te->textCursor();    
c.clearSelection();    
_te->setTextCursor(c);    
    
QString s = "aaa XXXX bbbb YYYY XXXX ffff bbbb dhhhhd XXXXX fhfjhdf    
YYYY";    
    
then I definitely no longer see the "all green" behavior. This is with    
Qt-4.4.3, BTW.    
    
Best regards,    
--    
Daniel    
PostgreSQL-powered mail user agent and storage:    
http://www.manitou-mail.org    
_______________________________________________    
Qt-interest mailing list    
Qt-interest at trolltech.com    
http://lists.trolltech.com/mailman/listinfo/qt-interest    
    
    
    
    
--    
    Твой новогодний номер InternetUA тут .  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081231/ab5cdec5/attachment.html 


More information about the Qt-interest-old mailing list