Results 1 to 2 of 2

Thread: QTextTable flow options

  1. #1
    Join Date
    Sep 2009
    Location
    Czech Republic
    Posts
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QTextTable flow options

    Hi there,
    I'm quite new to Qt and I have encountered this problem:

    After I insert two QTextTables into QTextEdit next to each other (first flow option is FlowLeft, second InFlow), inserting text to these tables changes layout.

    Bassically I want two one-column tables horrizontaly next to each other.
    Somehow like this:
    Qt Code:
    1. tableFormat.setPosition(QTextFrameFormat::FloatLeft);
    2. tableFormat.setAlignment(Qt::AlignLeft);
    3.  
    4. tableFormat2.setPosition(QTextFrameFormat::InFlow);
    5. tableFormat2.setAlignment(Qt::AlignRight);
    6.  
    7. QTextCursor cursor=text->textCursor();
    8. table=cursor.insertTable(1,1,tableFormat);
    9. cursor=table->cellAt(0,0).firstCursorPosition();
    10. cursor.movePosition(QTextCursor::Right);
    11. table2=cursor.insertTable(1,1,tableFormat2);
    To copy to clipboard, switch view to plain text mode 
    Appending lines to each table works perfectly, but after I insert some text, tables become alligned verticaly - not horrizontaly. Almost like flow options were somehow changed.

    Any Ideas?

    I'm using Qt 4.5.2 in unix.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QTextTable flow options

    What do you mean by vertically alligned? One moves under the other?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QTextCursor Find QTextTable ok and !QTextImageFormat
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 12th September 2006, 16:29
  2. Zoom Options
    By Kapil in forum Qt Programming
    Replies: 2
    Last Post: 9th March 2006, 11:19

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.