Jencek
7th September 2009, 19:53
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:
tableFormat.setPosition(QTextFrameFormat::FloatLef t);
tableFormat.setAlignment(Qt::AlignLeft);
tableFormat2.setPosition(QTextFrameFormat::InFlow) ;
tableFormat2.setAlignment(Qt::AlignRight);
QTextCursor cursor=text->textCursor();
table=cursor.insertTable(1,1,tableFormat);
cursor=table->cellAt(0,0).firstCursorPosition();
cursor.movePosition(QTextCursor::Right);
table2=cursor.insertTable(1,1,tableFormat2);
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.
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:
tableFormat.setPosition(QTextFrameFormat::FloatLef t);
tableFormat.setAlignment(Qt::AlignLeft);
tableFormat2.setPosition(QTextFrameFormat::InFlow) ;
tableFormat2.setAlignment(Qt::AlignRight);
QTextCursor cursor=text->textCursor();
table=cursor.insertTable(1,1,tableFormat);
cursor=table->cellAt(0,0).firstCursorPosition();
cursor.movePosition(QTextCursor::Right);
table2=cursor.insertTable(1,1,tableFormat2);
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.