Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

The target platform uses Qt v5.6.3 with tslib via LinuxFB n the v4.14 linux kernel built with yocto rocko



  • Hi
    white-space:nowrap, text-overflow: ellipsis work in html donot work with qt in QTableView with html model data.
    But able to see results in Online html editor. here is the example

    <!DOCTYPE html>
    <html>
    <head>
    </head>
    <body>

    <h2>Styling Tables</h2>

    <table>
    <tr>
    <td style=width:300px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;>John John John John John John John John John</td>
    </tr>
    </table>

    </body>
    </html>

    , How to make css properties : white-space:nowrap, text-overflow: ellipsis work in html table in qt? Appreciate for the suggestions in this regard.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    QTableView does not have a full html rendering engine behind it. At best you will have the support provided by Qt's rich text capabilities.

    If you need more then you should search for custom QStyledItemDelegate with html support.


Log in to reply