Results 1 to 3 of 3

Thread: wordwrap question

  1. #1
    Join Date
    Oct 2006
    Posts
    13
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default wordwrap question

    Hi there!
    Tell me please is there any way to setup wordwrap by characters for text added in
    QTextEdit in table. Here some strings from sample:

    qtext->setLineWrapMode (QTextEdit::FixedPixelWidth);
    ...
    constraints << QTextLength(QTextLength::PercentageLength,10);
    ...
    orderTableFormat.setColumnWidthConstraints(constra ints);
    ...
    orderTable= mycursor.insertTable(1, 3, orderTableFormat);

    --
    Thanks!
    Last edited by igor_x; 2nd November 2006 at 06:45.

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: wordwrap question

    If you use a monospaced font you can limit on the width yeilding the right number of characters per line. Perhaps that is the way to go.

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

    igor_x (2nd November 2006)

  4. #3
    Join Date
    Oct 2006
    Posts
    13
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: wordwrap question

    I found an answer!!
    qtext->setWordWrapMode ( QTextOption::WrapAnywhere );

  5. The following user says thank you to igor_x for this useful post:

    hyling (2nd November 2006)

Similar Threads

  1. QTextEdit simple question
    By Marcopolo in forum Qt Tools
    Replies: 4
    Last Post: 11th October 2007, 00:01
  2. QThread exit()/quit() question
    By TheKedge in forum Qt Programming
    Replies: 1
    Last Post: 28th August 2006, 14:38
  3. Replies: 6
    Last Post: 19th March 2006, 18:41
  4. QTextEdit Qt4: simple question
    By TheKedge in forum Qt Programming
    Replies: 4
    Last Post: 18th January 2006, 12:03
  5. xml with binary question
    By TheKedge in forum Qt Programming
    Replies: 7
    Last Post: 12th January 2006, 23:21

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.