In QT mode the showText dialog can take HTML content and render it. Unfortunately the content is not restricted by the fixed width of the container and does not wrap. So unless I manually add an arbitrary line-break (<br />) at the end of any line that might overflow the width it just forces me to scroll horizontally which is nonsensical. CSS colors seem to be respected but not width or padding and yet I can find no documentation that addresses what aspects of HTML components are valid and how to control overflow in a reasonable way. Does anyone have insight into this? Shouldn't it actually be able to render true HTML? I know QT widgets do/can.

asked 08 Dec '11, 14:22

clinuz's gravatar image

accept rate: 50%

Currently, the <showText> action does not allow configuring the wrapping but we have added your request of improvement to our bug tracking system.

In addition, the widget used to render the HTML is a QTextEdit, which has some limitations when displaying HTML. You can find a reference of the supported subset here


answered 09 Dec '11, 06:45

juanjo's gravatar image

juanjo ♦♦
accept rate: 23%


@juanjo Thank you, the information is exactly what I needed (not the inability to wrap but that was useful to know as well).

As an ugly hack for anyone interested, one can use a table-cell to force a container-width-constraint for wrapping text automatically since that is the only container whose width property is observed by the QT rich text engine. Its ironic because the CSS line-wrap is observed but currently there is no width constraint from the dialog (showText) on its content.

(09 Dec '11, 09:24) clinuz
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 08 Dec '11, 14:22

Seen: 1,787 times

Last updated: 09 Dec '11, 09:24