Results 1 to 3 of 3

Thread: multicolumn in QTextEdit

  1. #1
    Join Date
    Aug 2007
    Posts
    244
    Thanks
    42
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default multicolumn in QTextEdit

    Hi,
    is it possible arrange text in a QTextEdit in columns, like in any word processor? I have set

    Qt Code:
    1. textEdit->setLineWrapMode(QTextEdit::FixedColumnWidth);
    2. textEdit->setLineWrapColumnOrWidth(150);
    To copy to clipboard, switch view to plain text mode 

    but it doesn't works, text is not wrapped in columns.

    Thanks
    Giuseppe CalÃ

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: multicolumn in QTextEdit

    I don't think it will work that way.
    What about creating a two columns html template(maybe a two columns table, or two divs, or whatever works ), inserting text in the template, and inserting this html into the text edit with setHtml or insertHtml?

    If you're going to use div's, then make sure you set their floating style to "left" and maybe set a fixed width for them
    Anyway, I think using an html table is the way to go.

    Regards

  3. #3
    Join Date
    Aug 2007
    Posts
    244
    Thanks
    42
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: multicolumn in QTextEdit

    It seems simple.. Ok marcel, I give it a try.

    Thanks
    Giuseppe CalÃ

Similar Threads

  1. QTextEdit, sizeHint, QWidget
    By TheKedge in forum Qt Programming
    Replies: 1
    Last Post: 3rd February 2007, 08:25
  2. Re-implement mouse events of QTextEdit
    By Ankitha Varsha in forum Qt Programming
    Replies: 2
    Last Post: 14th October 2006, 16:55
  3. QTextEdit API questions (plain text)
    By Gaspar in forum Qt Programming
    Replies: 4
    Last Post: 16th May 2006, 06:03
  4. [QT 4] QTextEdit performance
    By fellobo in forum Qt Programming
    Replies: 8
    Last Post: 6th March 2006, 19:27
  5. Painting to QTextEdit
    By gesslar in forum Qt Programming
    Replies: 8
    Last Post: 18th February 2006, 18:40

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.