Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-77213

RichText table border uses obsolete syntax



    • Type: Suggestion
    • Status: Open
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: 5.13.0
    • Fix Version/s: None
    • Component/s: GUI: Text handling
    • Labels:


      If I want a <table> to have 1-pixel grid lines in a RichText QML Text object, I need to do two things: I need to specify <table cellspacing=-1 style="border-width: 1px">. Neither of these is valid HTML, I believe. First of all, cellspacing is gone in HTML5, but I don't think negative values were ever really legal. Second, as far as I can tell, border-width is intended for other tags, not tables-it does bupkis in Firefox. To do this in a real browser, you have to do <table style="border-spacing: 0; border-collapse: collapse;"> and also <td style="border: solid 1px;">, although this can be simplified in a stylesheet with:

      table.foo { border-spacing: 0; border-collapse: collapse; }

      table.foo td { border: solid 1px; }

      (sorry, can't figure out how to get something with braces displayed in monospace) and then just useĀ class="foo" on the table. None of these styling properties seem to be supported in RichText. So if I want certain HTML text to be usable in both RichText and in a real browser, I have to include both sets of properties and the cellspacing attribute. It would be nice if this were cleaned up once and for all. The infrastructure is already there for handling composite styling selectors, and the underlying formatting parameters other than border-collapse are already there, they just need to be accessed by the proper styling properties.


        No reviews matched the request. Check your Options in the drop-down menu of this sections header.



            esabraha Eskil Abrahamsen Blomfeldt
            pderocco Paul DeRocco
            0 Vote for this issue
            2 Start watching this issue



                Gerrit Reviews

                There are no open Gerrit changes