Unsolved QTextTable percentage column width constraints are not kept
-
Greetings everyone.
I have a
QTextTable
with two columns.
I applied percentage column width constraints to it like this:QTextTable* const pTable = currentTextCursor.currentTable(); ... QVector<QTextLength> vLens; vLens.pushBack(QTextLength::PercentageLength, 5); vLens.pushBack(QTextLength::PercentageLength, 95); QTextTableFormat fmt = pTable->format(); fmt.setColumnWidthConstraints(vLens); pTable->setFormat(fmt); ...
After that I launch my application and try to fill first column of the table that has five percent width with some letter key pressed for example. Width of this column increases (and width of second column decreases) until becoming almost equal to table width. After that columns restore their specified sizes. However I printed constraints during this process and output showed constraints that I specified.
But if I use
QTextLength::FixedLength
instead then columns' widths remain unchanged always.The question is if it is possible to keep percentage-constrained columns' widths unchanged.
If this information is not sufficient I will provide more of it with great pleasure but at the moment I don't see any stuff I could miss.
If it is impossible at all It would be nice to know about reason of that impossibility too.
Thanks in advance.