Results 1 to 4 of 4

Thread: bug: setLineWrapMode

  1. #1
    Join Date
    Feb 2007
    Location
    Philadelphia, USA
    Posts
    255
    Thanks
    43
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default bug: setLineWrapMode

    I am using Qt 4.3.0 on Windows

    There seems to be a serious problem with QTextEdit when using
    Qt Code:
    1. setLineWrapMode(QTextEdit::NoWrap)
    To copy to clipboard, switch view to plain text mode 

    The problem is that when typing toward the bottom of a moderately large text file, the interface starts dragging and becomes very slow - the difference is striking between the top and bottom of the document, and I think it gets worse for larger files.

    If I remove the "setLineWrapMode" line, then everything works fine.

    For a long time, I blamed it on my syntax highlighter, but now I'm quite certain that it's a Qt bug... Anyone encounter this kind of behaviour, or have an idea for a workaround?

    Not sure if it's 4.3.0-specific, Windows-specific (or even my-particular-computer-specific )

    Thanks.

    edit: Here's a sample program that produces the behaviour:

    Qt Code:
    1. #include <QApplication>
    2. #include <QTextEdit>
    3.  
    4. int main(int argc, char *argv[]) {
    5. QApplication app(argc, argv);
    6.  
    7. QTextEdit edit;
    8.  
    9. edit.setLineWrapMode(QTextEdit::NoWrap);
    10. edit.showNormal();
    11.  
    12. bool ret=app.exec();
    13. return ret;
    14. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by magland; 23rd July 2007 at 21:36.

  2. #2
    Join Date
    May 2006
    Location
    Bangalore,India
    Posts
    235
    Thanks
    7
    Thanked 25 Times in 24 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: bug: setLineWrapMode

    I have tested your code. it seems a bug in Qt.
    after using setLineWrapMode(QTextEdit::NoWrap); I have entered a huge text then It become slow.
    you can report to trolltech.

  3. The following user says thank you to rajesh for this useful post:

    magland (24th July 2007)

  4. #3
    Join Date
    Feb 2007
    Location
    Philadelphia, USA
    Posts
    255
    Thanks
    43
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: bug: setLineWrapMode

    Quote Originally Posted by rajesh View Post
    I have tested your code. it seems a bug in Qt.
    after using setLineWrapMode(QTextEdit::NoWrap); I have entered a huge text then It become slow.
    you can report to trolltech.
    Thanks for the confirmation that it's not just my computer . I am using the following workaround in my project, which does the job, at least untill the bug is fixed...

    Qt Code:
    1. setLineWrapMode(QTextEdit::FixedPixelWidth);
    2. setLineWrapColumnOrWidth(10000);
    To copy to clipboard, switch view to plain text mode 

  5. #4
    Join Date
    Jul 2009
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: bug: setLineWrapMode

    Now, I have this problem,too. It seems even newest Qt version hasn't fixed this problem,yet.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.