pythonqt:嵌入的html错误?

pythonqt:嵌入的html错误?,python,html,qt,html-table,Python,Html,Qt,Html Table,这里发生了一件奇怪的事情。。。我使用嵌入html和Qt Python在GUI/小部件中显示表单。问题是,如果单元格有更多内容,它会在该单元格/表格的右侧显示一个黑色阴影,如方框 下面是代码正常工作的示例: html += ("<BR><BR><table border='0' cellspacing='0' cellpadding='0'>" "<tr>"

这里发生了一件奇怪的事情。。。我使用嵌入html和Qt Python在GUI/小部件中显示表单。问题是,如果单元格有更多内容,它会在该单元格/表格的右侧显示一个黑色阴影,如方框

下面是代码正常工作的示例:

    html += ("<BR><BR><table border='0' cellspacing='0' cellpadding='0'>"
                    "<tr>"
                        "<td bgcolor='#000000'>"

                        "<table border='0' cellspacing='1' cellpadding='4'>"
                        "<tr>"
                            "<TD WIDTH=837 bgcolor='#FFFFFF'><font size='4' color='black'><DIV align=center><B> StackOverFlow Forum<BR>YOUR FAVORITE WEB SITE</DIV></font></td>"
                        "</tr>"
                        "</table>"

                        "</td>"
                    "</tr>"
                "</table>"
                )
然后在序列中,使用相同的代码,但该单元格的内容稍多一些:

    html += ("<table border='0' cellspacing='0' cellpadding='0'>"
                    "<tr>"
                        "<td bgcolor='#000000'>"

                        "<table border='0' cellspacing='1' cellpadding='4'>"
                        "<tr>"
                            "<TD WIDTH=837 bgcolor='#FFFFFF'><font size='4' color='black'><DIV align=center><B>STACKOVERFLOW FORUM STACKOVERFLOW FORUM STACKOVERFLOW FORUM STACKOVERFLOW FORUM STACKOVERFLOW FORUM<BR>YOUR FAVORITE WEB SITE </DIV></font></td>"
                        "</tr>"
                        "</table>"

                        "</td>"
                    "</tr>"
                "</table>"
                )
所以,很奇怪,考虑到它是完全相同的代码,只有第二个代码里面有更多的文本


有什么建议吗?

如果这是您的代码片段,那么问题可能与您没有关闭标记有关。如果没有帮助,请尝试删除
并将
align='center'
添加到

    html += ("<table border='0' cellspacing='0' cellpadding='0'>"
                    "<tr>"
                        "<td bgcolor='#000000'>"

                        "<table border='0' cellspacing='1' cellpadding='4'>"
                        "<tr>"
                            "<TD WIDTH=837 bgcolor='#FFFFFF'><font size='4' color='black'><DIV align=center><B>STACKOVERFLOW FORUM STACKOVERFLOW FORUM STACKOVERFLOW FORUM STACKOVERFLOW FORUM STACKOVERFLOW FORUM<BR>YOUR FAVORITE WEB SITE </DIV></font></td>"
                        "</tr>"
                        "</table>"

                        "</td>"
                    "</tr>"
                "</table>"
                )
+----------------------------------------------------+||||  
|     STACKOVERFLOW FORUM STACKOVERFLOW FORUM ...    |||||  
|           YOUR FAVORITE WEB SITE                   |||||  
+----------------------------------------------------+||||